Advertisement
Guest User

Untitled

a guest
Jun 28th, 2012
142
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.25 KB | None | 0 0
  1. / This is a comment
  2. // uncomment the line below if you want to write a filterscript
  3. //#define FILTERSCRIPT
  4.  
  5. #include <a_samp>
  6. #include <sscanf2>
  7. #include <ZCMD>
  8.  
  9. #define TERMINATOR 2
  10. #define HUMAN 1
  11. #define COLOR_GREY 0xAFAFAFAA
  12.  
  13.  
  14.  
  15. #define HOLDING(%0) \
  16. ((newkeys & (%0)) == (%0))
  17. #define PRESSED(%0) \
  18. (((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))
  19. #define RELEASED(%0) \
  20. (((newkeys & (%0)) != (%0)) && ((oldkeys & (%0)) == (%0)))
  21.  
  22.  
  23.  
  24. new gTeam[MAX_PLAYERS];
  25. new Jump[MAX_PLAYERS];
  26.  
  27.  
  28. #if defined FILTERSCRIPT
  29.  
  30. public OnFilterScriptInit()
  31. {
  32. print("\n--------------------------------------");
  33. print("Terminator Filterscript 1.0");
  34. print("--------------------------------------\n");
  35. return 1;
  36. }
  37.  
  38. public OnFilterScriptExit()
  39. {
  40. return 1;
  41. }
  42.  
  43. #else
  44. #endif
  45.  
  46. public OnPlayerRequestClass(playerid, classid)
  47. {
  48. SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
  49. SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
  50. SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
  51. return 1;
  52. }
  53.  
  54. public OnPlayerConnect(playerid)
  55. {
  56. SendClientMessage(playerid, COLOR_GREY, "This is a basic script, only made due to lack of time");
  57. SendClientMessage(playerid, COLOR_GREY, "and to contribute to the filterscripts, it's quite random though, bare with me");
  58. }
  59.  
  60. public OnPlayerDisconnect(playerid, reason)
  61. {
  62. return 1;
  63. }
  64.  
  65. public OnPlayerSpawn(playerid)
  66. {
  67. return 1;
  68. }
  69.  
  70. public OnPlayerDeath(playerid, killerid, reason)
  71. {
  72. return 1;
  73. }
  74.  
  75. public OnVehicleSpawn(vehicleid)
  76. {
  77. return 1;
  78. }
  79.  
  80. public OnVehicleDeath(vehicleid, killerid)
  81. {
  82. return 1;
  83. }
  84.  
  85. public OnPlayerText(playerid, text[])
  86. {
  87. return 1;
  88. }
  89.  
  90. public OnPlayerCommandText(playerid, cmdtext[])
  91. {
  92. return 1;
  93. }
  94.  
  95. COMMAND:setteam(playerid, params[])
  96. {
  97. new setrace, target, string[128];
  98. if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You're not authorized as an adminstrator, sorry");
  99. if(sscanf(params, "ud", target, setrace)) return SendClientMessage(playerid, COLOR_GREY, "/setteam [playerid][TEAM]");
  100. {
  101. gTeam[playerid] = setrace;
  102. format(string, sizeof(string), "You've set the following player, %s to be the specified race.", GetName(target));
  103. SendClientMessage(playerid, COLOR_GREY, string);
  104. format(string, sizeof(string), "Your team has been set to team %d by %s", setrace,GetName(playerid) );
  105. SendClientMessage(target, COLOR_GREY, string);
  106. if(setrace == TERMINATOR)
  107. {
  108. SetPlayerSkin(playerid, 123);
  109. }
  110. }
  111. return 1;
  112. }
  113. COMMAND:speed(playerid, params[])
  114. {
  115. ApplyAnimation(playerid,"PED","sprint_civi",4.1,1,1,1,1,1);
  116. SendClientMessage(playerid, COLOR_GREY, "Terminator speed has been activated");
  117. return 1;
  118. }
  119. public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
  120. {
  121. return 1;
  122. }
  123.  
  124. public OnPlayerExitVehicle(playerid, vehicleid)
  125. {
  126. return 1;
  127. }
  128.  
  129. public OnPlayerStateChange(playerid, newstate, oldstate)
  130. {
  131. return 1;
  132. }
  133.  
  134. public OnPlayerEnterCheckpoint(playerid)
  135. {
  136. return 1;
  137. }
  138.  
  139. public OnPlayerLeaveCheckpoint(playerid)
  140. {
  141. return 1;
  142. }
  143.  
  144. public OnPlayerEnterRaceCheckpoint(playerid)
  145. {
  146. return 1;
  147. }
  148.  
  149. public OnPlayerLeaveRaceCheckpoint(playerid)
  150. {
  151. return 1;
  152. }
  153.  
  154. public OnRconCommand(cmd[])
  155. {
  156. return 1;
  157. }
  158.  
  159. public OnPlayerRequestSpawn(playerid)
  160. {
  161. return 1;
  162. }
  163.  
  164. public OnObjectMoved(objectid)
  165. {
  166. return 1;
  167. }
  168.  
  169. public OnPlayerObjectMoved(playerid, objectid)
  170. {
  171. return 1;
  172. }
  173.  
  174. public OnPlayerPickUpPickup(playerid, pickupid)
  175. {
  176. return 1;
  177. }
  178.  
  179. public OnVehicleMod(playerid, vehicleid, componentid)
  180. {
  181. return 1;
  182. }
  183.  
  184. public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
  185. {
  186. return 1;
  187. }
  188.  
  189. public OnVehicleRespray(playerid, vehicleid, color1, color2)
  190. {
  191. return 1;
  192. }
  193.  
  194. public OnPlayerSelectedMenuRow(playerid, row)
  195. {
  196. return 1;
  197. }
  198.  
  199. public OnPlayerExitedMenu(playerid)
  200. {
  201. return 1;
  202. }
  203.  
  204. public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
  205. {
  206. return 1;
  207. }
  208.  
  209. public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
  210. {
  211. if(gTeam[playerid] == 2)
  212. if(PRESSED(KEY_JUMP))
  213. {
  214. if((GetTickCount() - Jump[playerid]) < 2000)
  215. {
  216. SendClientMessage(playerid, COLOR_GREY, "Please wait before using this command again(( 2 Seconds))");
  217. return 1;
  218. }
  219. Jump[playerid] = GetTickCount();
  220. {
  221. new Float: x,Float: y,Float: z;
  222. GetPlayerVelocity(playerid, x, y, z);
  223. SetPlayerVelocity(playerid,x + 0.0,y - 0.0 ,z + 0.40);
  224. }
  225. }
  226. return 1;
  227. }
  228.  
  229. public OnRconLoginAttempt(ip[], password[], success)
  230. {
  231. return 1;
  232. }
  233.  
  234. public OnPlayerUpdate(playerid)
  235. {
  236. if(IsPlayerConnected(playerid))
  237. {
  238. new Float:Health;
  239. GetPlayerHealth(playerid,Health);
  240. if(Health < 100)
  241. SetPlayerHealth(playerid,Health+10);
  242. }
  243. return 1;
  244. }
  245.  
  246. public OnPlayerStreamIn(playerid, forplayerid)
  247. {
  248. return 1;
  249. }
  250.  
  251. public OnPlayerStreamOut(playerid, forplayerid)
  252. {
  253. return 1;
  254. }
  255.  
  256. public OnVehicleStreamIn(vehicleid, forplayerid)
  257. {
  258. return 1;
  259. }
  260.  
  261. public OnVehicleStreamOut(vehicleid, forplayerid)
  262. {
  263. return 1;
  264. }
  265.  
  266. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  267. {
  268. return 1;
  269. }
  270.  
  271. public OnPlayerClickPlayer(playerid, clickedplayerid, source)
  272. {
  273. return 1;
  274. }
  275. stock GetName(playerid)
  276. {
  277. new Name[MAX_PLAYER_NAME];
  278.  
  279. if(IsPlayerConnected(playerid))
  280. {
  281. GetPlayerName(playerid, Name, sizeof(Name));
  282. }
  283. else
  284. {
  285. Name = "Disconnected/Nothing";
  286. }
  287.  
  288. return Name;
  289. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement