Advertisement
Guest User

Untitled

a guest
May 31st, 2016
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 5.36 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 <zcmd>
  7. new killstreak[MAX_PLAYERS];
  8. #define red         0x990000
  9.  
  10. #if defined FILTERSCRIPT
  11.  
  12. public OnFilterScriptInit()
  13. {
  14.     print("\n--------------------------------------");
  15.     print(" Gun Game made by Digglet");
  16.     print("--------------------------------------\n");
  17.     return 1;
  18. }
  19.  
  20. public OnFilterScriptExit()
  21. {
  22.     return 1;
  23. }
  24.  
  25. #else
  26.  
  27. main()
  28. {
  29.     print("\n----------------------------------");
  30.     print(" Gun Game made by Digglet");
  31.     print("----------------------------------\n");
  32. }
  33.  
  34. #endif
  35.  
  36. public OnGameModeInit()
  37. {
  38.     // Don't use these lines if it's a filterscript
  39.     SetGameModeText("Gun Game");
  40.     AddPlayerClass(101, 1958.3783, 1343.1572, 15.3746, 269.1425, 24, 0, 0, 0, 0, 0);
  41.     return 1;
  42. }
  43.  
  44. public OnGameModeExit()
  45. {
  46.     return 1;
  47. }
  48.  
  49. public OnPlayerRequestClass(playerid, classid)
  50. {
  51.     SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
  52.     SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
  53.     SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
  54.     return 1;
  55. }
  56.  
  57. public OnPlayerConnect(playerid)
  58. {
  59.     killstreak[playerid] = 0; //To reset their killstreak.
  60.     return 1;
  61. }
  62.  
  63. public OnPlayerDisconnect(playerid, reason)
  64. {
  65.     return 1;
  66. }
  67.  
  68. public OnPlayerSpawn(playerid)
  69. {
  70.     return 1;
  71. }
  72.  
  73. public OnPlayerDeath(playerid, killerid, reason)
  74. {
  75.     Killstreak(playerid,killerid);
  76.     killstreak[playerid] = 0;
  77.     return 1;
  78. }
  79.  
  80. public OnVehicleSpawn(vehicleid)
  81. {
  82.     return 1;
  83. }
  84.  
  85. public OnVehicleDeath(vehicleid, killerid)
  86. {
  87.     return 1;
  88. }
  89.  
  90. public OnPlayerText(playerid, text[])
  91. {
  92.     return 1;
  93. }
  94.     stock Killstreak(playerid, killerid)
  95. {
  96.     killstreak[playerid] = 0;
  97.     killstreak[killerid] ++;
  98.  
  99.     new msg1[64], msg2[64], name1[MAX_PLAYER_NAME], name2[MAX_PLAYER_NAME];
  100.  
  101.     GetPlayerName(playerid, name1, strlen(name1));
  102.     GetPlayerName(killerid, name2, strlen(name2));
  103.  
  104.     format(msg1, sizeof(msg1), "%s has killed %s and is one kill closer to victory!", name2, name1);
  105.     format(msg2, sizeof(msg2), "%s is now on a killstreak of %i kills!", name2, killstreak[killerid]);
  106.  
  107.     SendClientMessageToAll(-1, msg1);
  108.     SendClientMessageToAll(-1, msg2);
  109.  
  110.     switch(killstreak[killerid])
  111.     {
  112.         case 2:
  113.         {
  114.             ResetPlayerWeapons(playerid);
  115.             GivePlayerWeapon(playerid, 25, 999);
  116.         }
  117.         case 4:
  118.         {
  119.             ResetPlayerWeapons(playerid);
  120.             GivePlayerWeapon(playerid, 29, 999);
  121.         }
  122.         case 6:
  123.         {
  124.             ResetPlayerWeapons(playerid);
  125.             GivePlayerWeapon(playerid, 30, 999);
  126.         }
  127.         case 8:
  128.         {
  129.             ResetPlayerWeapons(playerid);
  130.             GivePlayerWeapon(playerid, 31, 999);
  131.         }
  132.         case 10:
  133.         {
  134.             ResetPlayerWeapons(playerid);
  135.             GivePlayerWeapon(playerid, 28, 999);
  136.         }
  137.         case 12:
  138.         {
  139.             ResetPlayerWeapons(playerid);
  140.             GivePlayerWeapon(playerid, 35, 999);
  141.         }
  142.         case 13:
  143.         {
  144.             ResetPlayerWeapons(playerid);
  145.             GivePlayerWeapon(playerid, 4, 0);
  146.         }
  147.         case 14:
  148.         {
  149.             ResetPlayerWeapons(playerid);
  150.             SendClientMessageToAll(0x99FF00, "%s has won the gun game!");
  151.             IsPlayerInRangeOfPoint(playerid, 100.0, 2737.6333, -1760.2142, 44.1486);
  152.         }
  153.     }
  154.     return 1;
  155. }
  156. public OnPlayerCommandText(playerid, cmdtext[])
  157. {
  158.     if (strcmp("/mycommand", cmdtext, true, 10) == 0)
  159.     {
  160.         // Do something here
  161.         return 1;
  162.     }
  163.     return 0;
  164. }
  165. public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
  166. {
  167.     return 1;
  168. }
  169.  
  170. public OnPlayerExitVehicle(playerid, vehicleid)
  171. {
  172.     return 1;
  173. }
  174.  
  175. public OnPlayerStateChange(playerid, newstate, oldstate)
  176. {
  177.     return 1;
  178. }
  179.  
  180. public OnPlayerEnterCheckpoint(playerid)
  181. {
  182.     return 1;
  183. }
  184.  
  185. public OnPlayerLeaveCheckpoint(playerid)
  186. {
  187.     return 1;
  188. }
  189.  
  190. public OnPlayerEnterRaceCheckpoint(playerid)
  191. {
  192.     return 1;
  193. }
  194.  
  195. public OnPlayerLeaveRaceCheckpoint(playerid)
  196. {
  197.     return 1;
  198. }
  199.  
  200. public OnRconCommand(cmd[])
  201. {
  202.     return 1;
  203. }
  204.  
  205. public OnPlayerRequestSpawn(playerid)
  206. {
  207.     return 1;
  208. }
  209.  
  210. public OnObjectMoved(objectid)
  211. {
  212.     return 1;
  213. }
  214.  
  215. public OnPlayerObjectMoved(playerid, objectid)
  216. {
  217.     return 1;
  218. }
  219.  
  220. public OnPlayerPickUpPickup(playerid, pickupid)
  221. {
  222.     return 1;
  223. }
  224.  
  225. public OnVehicleMod(playerid, vehicleid, componentid)
  226. {
  227.     return 1;
  228. }
  229.  
  230. public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
  231. {
  232.     return 1;
  233. }
  234.  
  235. public OnVehicleRespray(playerid, vehicleid, color1, color2)
  236. {
  237.     return 1;
  238. }
  239.  
  240. public OnPlayerSelectedMenuRow(playerid, row)
  241. {
  242.     return 1;
  243. }
  244.  
  245. public OnPlayerExitedMenu(playerid)
  246. {
  247.     return 1;
  248. }
  249.  
  250. public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
  251. {
  252.     return 1;
  253. }
  254.  
  255. public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
  256. {
  257.     return 1;
  258. }
  259.  
  260. public OnRconLoginAttempt(ip[], password[], success)
  261. {
  262.     return 1;
  263. }
  264.  
  265. public OnPlayerUpdate(playerid)
  266. {
  267.     return 1;
  268. }
  269.  
  270. public OnPlayerStreamIn(playerid, forplayerid)
  271. {
  272.     return 1;
  273. }
  274.  
  275. public OnPlayerStreamOut(playerid, forplayerid)
  276. {
  277.     return 1;
  278. }
  279.  
  280. public OnVehicleStreamIn(vehicleid, forplayerid)
  281. {
  282.     return 1;
  283. }
  284.  
  285. public OnVehicleStreamOut(vehicleid, forplayerid)
  286. {
  287.     return 1;
  288. }
  289.  
  290. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  291. {
  292.     return 1;
  293. }
  294.  
  295. public OnPlayerClickPlayer(playerid, clickedplayerid, source)
  296. {
  297.     return 1;
  298. }
  299. CMD:gungame(playerid,params[])
  300. {
  301.     SetPlayerVirtualWorld(playerid, 123000);
  302.     GivePlayerWeapon(playerid, 24, 999);
  303.     SetPlayerPos(playerid, 2737.6333, -1760.2142, 44.1486);
  304.     return 1;
  305. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement