Advertisement
Guest User

tdm

a guest
Feb 17th, 2013
348
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 24.17 KB | None | 0 0
  1. /* Script created by Kris Yellow
  2.    Everything is Original & Nothing is copied */
  3.  
  4. #pragma tabsize 0
  5. #include <a_samp>
  6. #include <core>
  7. #include <float>
  8. #include <zcmd>
  9. #include <sscanf2>
  10. #include <time>
  11. #include <file>
  12.  
  13.  
  14. #define Prisoners 1
  15. #define Guards 2
  16.  
  17. #define PrisonersColor 0x00FF00FF
  18. #define GuardsColor 0xFF8000FF
  19.  
  20. //========================[Colors]==============================================
  21. #define COLOR_BITEM         0xE1B0B0FF
  22. #define COLOR_GRAD1         0xB4B5B7FF
  23. #define COLOR_GRAD2         0xBFC0C2FF
  24. #define COLOR_GRAD3         0xCBCCCEFF
  25. #define COLOR_GRAD4         0xD8D8D8FF
  26. #define COLOR_GRAD5         0xE3E3E3FF
  27. #define COLOR_GRAD6         0xF0F0F0FF
  28. #define COLOR_GREY          0xAFAFAFAA
  29. #define COLOR_GREEN         0x33AA33AA
  30. #define COLOR_RED           0xAA3333AA
  31. #define COLOR_BLACK         0x000001FF
  32. #define COLOR_BLUE          0x007BD0FF
  33. #define COLOR_LIGHTORANGE   0xFFA100FF
  34. #define COLOR_FLASH         0xFF000080
  35. #define COLOR_LIGHTRED      0xFF6347AA
  36. #define COLOR_LIGHTBLUE     0x33CCFFAA
  37. #define COLOR_LIGHTGREEN    0x9ACD32AA
  38. #define COLOR_YELLOW        0xFFFF00AA
  39. #define COLOR_LIGHTYELLOW   0xFFFF91FF
  40. #define COLOR_YELLOW2       0xF5DEB3AA
  41. #define COLOR_WHITE         0xFFFFFFAA
  42. #define COLOR_FADE1         0xE6E6E6E6
  43. #define COLOR_FADE2         0xC8C8C8C8
  44. #define COLOR_FADE3         0xAAAAAAAA
  45. #define COLOR_FADE4         0x8C8C8C8C
  46. #define COLOR_FADE5         0x6E6E6E6E
  47. #define COLOR_PURPLE        0xC2A2DAAA
  48. #define COLOR_DBLUE         0x2641FEAA
  49. #define COLOR_DOC           0xFF8282AA
  50. #define COLOR_DCHAT         0xF0CC00FF
  51. #define COLOR_NEWS          0xFFA500AA
  52. #define COLOR_OOC           0xE0FFFFAA
  53. #define TEAM_BLUE_COLOR     0x8D8DFF00
  54. #define TEAM_GROVE_COLOR    0x00AA00FF
  55. #define TEAM_AZTECAS_COLOR  0x01FCFFC8
  56. #define NEWBIE_COLOR        0x7DAEFFFF
  57. #define COLOR_HOUSETEXT     0xBDB388FF
  58. #define COLOR_ORANGE        0xFF830000
  59. #define BIZ_COLOR           0xBDB388FF
  60. #define SAMP_COLOR          0xAAC4E5FF
  61. #define COLOR_BIZ           0xE85D00FF
  62. //===========================[Neon]======================================
  63. #define NEON_RED            18647
  64. #define NEON_BLUE           18648
  65. #define NEON_GREEN          18649
  66. #define NEON_YELLOW         18650
  67. #define NEON_PINK           18651
  68. #define NEON_WHITE          18652
  69. //==============================================================================
  70. #define TCOLOR_NEWS         0xAD99BE00
  71. #define TCOLOR_VIP          0xECFF0000
  72. #define TCOLOR_WHITE        0xFFFFFF00
  73. #define TCOLOR_LIGHTGREEN   0x9ACD3200
  74. #define TCOLOR_NAVYBLUE     0x8D8DFF00
  75. #define TCOLOR_BEIGE        0xA5937000
  76. #define TCOLOR_GREY         0xBFC0C200
  77. #define TCOLOR_DARKGREY     0x52545900
  78. #define TCOLOR_BLUE         0x2641FE00
  79. #define TCOLOR_LIGHTBLUE    0x2B77A100
  80. #define TCOLOR_YELLOW       0xFFFF0000
  81. #define TCOLOR_HELP         0x00D700FF
  82. #define TCOLOR_FIND         0x9B0000AA
  83. #define TCOLOR_WANTED       0xFF0000AA
  84. #define TCOLOR_PRISON       0xF4A41900
  85. #define TCOLOR_APRISON      0xFD01FD00
  86. #define TCOLOR_HOSPITAL     0xAFAFAF00
  87. #define TCOLOR_PARAMEDIC    0xFF828200
  88. #define TCOLOR_SENATE       0x58585800
  89. //==============================================================================
  90. #define SCOLOR_RED          0xD9000000
  91. #define SCOLOR_PINK         0xFE81FE00
  92. #define SCOLOR_ORANGE       0xFF6A2200
  93. #define SCOLOR_YELLOW       0xF0F00000
  94. #define SCOLOR_CYAN         0x00E6E600
  95. #define SCOLOR_GREEN        0x00CA0000
  96. #define SCOLOR_BLUE         0x0058B000
  97. #define SCOLOR_BLACK        0x00000000
  98. #define SCOLOR_WHITE        0xFFFFFF00
  99. #define SCOLOR_MARKER       0xD90000FF
  100.  
  101. new Float:PrisonerRandomSpawns[4][3] = {
  102.     {2835.6602,3203.8933,4.5640},
  103.     {2835.6602,3203.8933,4.5640},
  104.     {2835.6602,3203.8933,4.5640},
  105.     {2835.6602,3203.8933,4.5640}
  106. };
  107.  
  108.  
  109. new Float:GuardRandomSpawns[4][3] = {
  110.     {2909.9231,3149.5176,3.6151},
  111.     {2909.9231,3149.5176,3.6151},
  112.     {2909.9231,3149.5176,3.6151},
  113.     {2909.9231,3149.5176,3.6151}
  114. };
  115.  
  116.  
  117. #if defined filterscript
  118.  
  119. public OnFilterScriptInIt()
  120. {
  121.  
  122.     print("\n--------------------------------------");
  123.     print(" Blank Filterscript by your name here");
  124.     print("--------------------------------------\n");
  125.     return 1;
  126. }
  127.  
  128. public OnFilterScriptExit()
  129. {
  130.     return 1;
  131. }
  132.  
  133. #else
  134.  
  135. main()
  136. {
  137.     print("\n-----------------------------------------------------");
  138.     print("Team Deathmatch, Created by Kris Yellow.");
  139.     print("If your not Kris Yellow & you see this message, go die.");
  140.     print("-------------------------------------------------------\n");
  141. }
  142.  
  143. #endif
  144.  
  145. public OnGameModeInit()
  146. {
  147.     // Don't use these lines if it's a filterscript
  148.     SetGameModeText("TDM v1.1");
  149.     AddPlayerClass(287, 2835.6602,3203.8933,4.5640,236.2004, 0, 0, 0, 0, 0, 0);
  150.     AddPlayerClass(50, 2909.9231,3149.5176,3.6151,16.7188, 0, 0, 0, 0, 0, 0);
  151.     CreateObject(16113, 2798, 3142.8999023438, 2.9000000953674, 0, 0, 0);
  152.     CreateObject(16118, 2879.3000488281, 3126.3000488281, -1.2000000476837, 0, 0, 270);
  153.     CreateObject(16122, 2791.3999023438, 3237.6000976563, 0.89999997615814, 0, 0, 20);
  154.     CreateObject(16120, 2820.3000488281, 3299.8000488281, 3.5, 0, 0, 270);
  155.     CreateObject(16118, 2795.6000976563, 3180.6999511719, 2.2999999523163, 0, 0, 0);
  156.     CreateObject(16118, 2838.599609375, 3123.599609375, -1.2999999523163, 0, 0, 269.99450683594);
  157.     CreateObject(16118, 2954.6999511719, 3203.5, 2.7999999523163, 0, 0, 220);
  158.     CreateObject(16118, 2910, 3128.7998046875, -1.2000000476837, 0, 0, 269.99450683594);
  159.     CreateObject(16118, 2961, 3129.2998046875, 0, 0, 0, 90);
  160.     CreateObject(16118, 2968.599609375, 3163.099609375, 0.10000000149012, 0, 0, 179.99450683594);
  161.     CreateObject(16327, 2949.3994140625, 3166.19921875, 3.2000000476837, 0, 0, 180);
  162.     CreateObject(16327, 2822.1999511719, 3169.3999023438, 3.2000000476837, 0, 0, 0);
  163.     CreateObject(6205, 2879.8000488281, 3175.3000488281, 11.300000190735, 0, 0, 90);
  164.     CreateObject(16118, 2917.3000488281, 3242.6999511719, 6.4000000953674, 0, 0, 219.99572753906);
  165.     CreateObject(16118, 2902.6999511719, 3264.6999511719, 5.6999998092651, 0, 0, 250);
  166.     CreateObject(7046, 2926.5, 3251.8000488281, 4.4000000953674, 0.999755859375, 0, 0);
  167.     CreateObject(16120, 2855.3000488281, 3291.1999511719, 2.2999999523163, 0, 0, 24);
  168.     CreateObject(16327, 2822.19921875, 3169.3994140625, 3.2000000476837, 0, 0, 0);
  169.     CreateObject(6295, 2832.8000488281, 3274.6000976563, 28.5, 0, 0, 200);
  170.     CreateObject(5309, 2856.3000488281, 3217, 8.8000001907349, 0, 0, 0);
  171.     CreateObject(3928, 2838.7958984375, 3216.8115234375, 13.138463973999, 0, 0, 0);
  172.     CreateObject(373, 2905.3999023438, 3176.1999511719, 3.2999999523163, 0, 0, 0);
  173.     CreateObject(1240, 2905.3000488281, 3177.1000976563, 3.2999999523163, 0, 0, 0);
  174.     Create3DTextLabel("Use /building to enter the building.", 0xAA3333AA, 2902.9429,3163.3945,3.8573, 30.0, 0, 0);
  175.     Create3DTextLabel("Use /leave to leave the building.", 0xAA3333AA, 1403.1464,5.7318,1000.9064, 30.0, 0, 0);
  176.     Create3DTextLabel("Use /building to go up the tower.", 0xAA3333AA, 2825.7295,3169.5178,3.9641, 30.0, 0, 0); //tower1
  177.     Create3DTextLabel("Use /leave to go down the tower.", 0xAA3333AA, 2822.8540,3169.4224,14.2436, 30.0, 0, 0); //tower1
  178.     Create3DTextLabel("Use /building to go up the tower.", 0xAA3333AA, 2945.9050,3166.4016,3.9097, 30.0, 0, 0); //tower2
  179.     Create3DTextLabel("Use /leave to go down the tower.", 0xAA3333AA, 2949.1851,3166.5325,14.2436, 30.0, 0, 0); //tower2
  180.     Create3DTextLabel("Use /building to go up the tower.", 0xAA3333AA, 2834.3372,3270.9084,7.2224, 30.0, 0, 0); //lighthouse
  181.     Create3DTextLabel("Use /leave to go down the tower.", 0xAA3333AA, 2832.7791,3274.3074,49.9688, 30.0, 0, 0); //lighthouse
  182.     Create3DTextLabel("Use /buy for a list of available items to purchase.", 0x00FFFFFF, 2906.3232,3178.5508,4.1217, 30.0, 0, 0); //lighthouse
  183.  
  184.     {
  185.     UsePlayerPedAnims();
  186.     }
  187.    
  188.  
  189.     return 1;
  190. }
  191.  
  192. public OnGameModeExit()
  193. {
  194.     return 1;
  195. }
  196.  
  197. public OnPlayerRequestClass(playerid, classid)
  198. {
  199.     SetPlayerPos(playerid,2812.2883,3180.3645,4.1534);
  200.     SetPlayerCameraPos(playerid,2817.0037,3180.6880,4.1590);
  201.     SetPlayerCameraLookAt(playerid,2820.5540,3180.8335,4.1616);
  202.     SetPlayerFacingAngle(playerid, 180);
  203.     ApplyAnimation(playerid,"DANCING","dnce_M_a",4.0,1,0,0,0,0);
  204.  
  205.     switch(classid)
  206.     {
  207.         case 0:
  208.         {
  209.               SetPlayerTeam(playerid, Prisoners);
  210.               GameTextForPlayer(playerid, "~b~Prisoners", 1000, 3);
  211.         }
  212.  
  213.         case 1:
  214.         {
  215.               SetPlayerTeam(playerid, Guards);
  216.               GameTextForPlayer(playerid, "~r~Guards", 1000, 3);
  217.         }
  218.     }
  219.     return 1;
  220. }
  221.  
  222. public OnPlayerConnect(playerid)
  223. {
  224.  
  225.         new name[MAX_PLAYER_NAME+1], string[24+MAX_PLAYER_NAME+1];
  226.         GetPlayerName(playerid, name, sizeof(name));
  227.    
  228.         format(string, sizeof(string), "Welcome to Team Deathmatch, %s.", name);
  229.         SendClientMessage(playerid,0xFFFFFFAA, string);
  230.  
  231.         format(string, sizeof(string), "%s has now joined the server.", name);
  232.         SendClientMessageToAll(0xFFFFFFAA, string);
  233.    
  234.         SendClientMessage(playerid, 0x00FFFFFF, "Please select a team then spawn.");
  235.         SendClientMessage(playerid, 0x00FFFFFF, "Use /cmds for a list of available commands. Use /weapons for weapon tiers.");
  236.  
  237.         return 1;
  238. }
  239.  
  240. public OnPlayerDisconnect(playerid, reason)
  241. {
  242.     new
  243.     string[64],
  244.     name[MAX_PLAYER_NAME];
  245.     GetPlayerName(playerid,name,MAX_PLAYER_NAME);
  246.     switch(reason)
  247.     {
  248.         case 0: format(string,sizeof string,"%s has left the server. (Time Out)",name);
  249.         case 1: format(string,sizeof string,"%s has left the server. (Leaving)",name);
  250.         case 2: format(string,sizeof string,"%s has left the server. (Kicked/Banned)",name);
  251.     }
  252.     SendClientMessageToAll(0xFFFFFFAA,string);
  253.  
  254.     return 1;
  255. }
  256.  
  257. public OnPlayerSpawn(playerid)
  258. {
  259.     if(GetPlayerTeam(playerid) == Prisoners)
  260.     {
  261.         SetPlayerColor(playerid, PrisonersColor);
  262.         SetPlayerRandomPrisonerSpawn(playerid);
  263.  
  264.     }
  265.     else if(GetPlayerTeam(playerid) ==Guards)
  266.     {
  267.         SetPlayerColor(playerid, GuardsColor);
  268.         SetPlayerRandomGuardSpawn(playerid);
  269.     }
  270.    
  271.     return 1;
  272. }
  273.  
  274. public OnPlayerDeath(playerid, killerid, reason)
  275. {
  276.     ResetPlayerWeapons(playerid);
  277.     SendClientMessage(playerid, 0xFF66FFAA, "You have died and therfore lost $1000.");
  278.     GivePlayerMoney(playerid, -1000);
  279.     if(playerid != INVALID_PLAYER_ID) SetPlayerScore(playerid, GetPlayerScore(playerid) - 1);
  280.     SetPlayerPos(playerid,2819.9048,3189.3564,4.3103);
  281.     SetPlayerInterior(playerid, 0);
  282.  
  283.  
  284.     new name[MAX_PLAYER_NAME+1], string[24+MAX_PLAYER_NAME+1];
  285.     GetPlayerName(playerid, name, sizeof(name));
  286.     format(string, sizeof(string), "You have killed %s and earnt $2500.", name);
  287.     SendClientMessage(killerid, 0xFF66FFAA, string);
  288.     GivePlayerMoney(killerid, 2500);
  289.     if(killerid != INVALID_PLAYER_ID) SetPlayerScore(killerid, GetPlayerScore(killerid) + 1);
  290.    
  291.     return 1;
  292. }
  293.  
  294. public OnVehicleSpawn(vehicleid)
  295. {
  296.     return 1;
  297. }
  298.  
  299. public OnVehicleDeath(vehicleid, killerid)
  300. {
  301.     return 1;
  302. }
  303.  
  304. public OnPlayerText(playerid,text[])
  305. {
  306.     if(text[0] == '#')
  307.     {
  308.         new string[128];  GetPlayerName(playerid, string, sizeof(string));
  309.         format(string, sizeof(string), "[Team] %s: %s", string, text[1]);
  310.         printf("%s", string);
  311.  
  312.         for(new i = 0; i < MAX_PLAYERS; i++)
  313.         {
  314.             if(IsPlayerConnected(i) && GetPlayerTeam(i) == GetPlayerTeam(playerid)) SendClientMessage(i, GetPlayerColor(playerid), string);
  315.         }
  316.         return 0;
  317.     }
  318.  
  319.     return 1;
  320. }
  321.     CMD:lspd(playerid, params[])
  322.     {
  323.         SetPlayerPos(playerid, 1543.4667,-1676.3910,13.5565); //Quick CMD to TP me to LSPD for CCTV shit
  324.     }
  325.  
  326.     CMD:removenos(playerid, params[])
  327.     {
  328.         if(!IsPlayerInAnyVehicle(playerid))
  329.         {
  330.              SendClientMessage(playerid,COLOR_RED,"Error: You are not in a vehicle.");
  331.         }
  332.         else
  333.         {
  334.             new vid = GetPlayerVehicleID(playerid);
  335.             RemoveVehicleComponent(vid, 1010); //10x nos
  336.             RemoveVehicleComponent(vid, 1009); //2x nos
  337.             RemoveVehicleComponent(vid, 1008); //5x nos
  338.         }
  339.         return 1;
  340.     }
  341.  
  342.  
  343.     CMD:nos(playerid, params[])
  344.     {
  345.         if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,COLOR_RED,"Error: You are not in a vehicle.");
  346.         {
  347.             new vid = GetPlayerVehicleID(playerid);
  348.             AddVehicleComponent(vid, 1010);
  349.             PlayerPlaySound(playerid,1133,0.0,0.0,0.0);
  350.             return 1;
  351.         }
  352.     }
  353.  
  354.     CMD:veh(playerid, params[])
  355.     {
  356.         ShowPlayerDialog(playerid, 4, DIALOG_STYLE_LIST, "Vehicle Menu", "Cheetah\nBanshee\nBullet\nHydra", "Select", "Cancel");
  357.         return 1;
  358.     }
  359.  
  360.     CMD:hq(playerid, params[])
  361.     {
  362.         if(IsPlayerInRangeOfPoint(playerid, 200, 2869.8030,3190.5867,4.3318))
  363.         {
  364.             SendClientMessage(playerid, 0xFF66FFAA, "You are already at base.");
  365.         }
  366.         else
  367.         {
  368.             SetPlayerPos(playerid,2869.8030,3190.5867,4.3318);
  369.         }
  370.         return 1;
  371.     }
  372.  
  373.     CMD:fixvw(playerid, params[])
  374.     {
  375.         if(GetPlayerVirtualWorld(playerid) < 1)
  376.         {
  377.             SetPlayerVirtualWorld(playerid, 0);
  378.             SendClientMessage(playerid, 0xFF66FFAA, "Your virtual world was fixed.");
  379.         }
  380.         else
  381.         {
  382.             SendClientMessage(playerid, 0xFF66FFAA, "Your virtual world is not bugged.");
  383.         }
  384.  
  385.     }
  386.  
  387.     CMD:building(playerid, params[])
  388.     {
  389.         if(IsPlayerInRangeOfPoint(playerid, 4.0, 2902.7942, 3163.8582, 3.8653))
  390.         {
  391.             SetPlayerInterior(playerid,1);
  392.             SetPlayerPos(playerid,1398.7748,-21.3895,1000.9068);
  393.         }
  394.         if(IsPlayerInRangeOfPoint(playerid, 4.0, 2825.7295,3169.5178,3.9641))
  395.         {
  396.             SetPlayerInterior(playerid,0);
  397.             SetPlayerPos(playerid, 2822.8540,3169.4224,14.2436);
  398.         }
  399.         if(IsPlayerInRangeOfPoint(playerid, 4.0, 2945.9050,3166.4016,3.9097))
  400.         {
  401.             SetPlayerInterior(playerid,0);
  402.             SetPlayerPos(playerid, 2949.1851,3166.5325,14.2436);
  403.         }
  404.         if(IsPlayerInRangeOfPoint(playerid, 4.0, 2834.3372,3270.9084,7.2224))
  405.         {
  406.             SetPlayerInterior(playerid,0);
  407.             SetPlayerPos(playerid, 2832.7791,3274.3074,49.9688);
  408.         }
  409.         return 1;
  410.     }
  411.  
  412.     CMD:leave(playerid, params[])
  413.     {
  414.         if(IsPlayerInRangeOfPoint(playerid, 4.0, 1402.4431,6.1827,1000.9063))
  415.         {
  416.             SetPlayerInterior(playerid,0);
  417.             SetPlayerPos(playerid,2902.6458,3163.9446,3.8669);
  418.         }
  419.         if(IsPlayerInRangeOfPoint(playerid, 4.0, 2822.8540,3169.4224,14.2436))
  420.         {
  421.             SetPlayerInterior(playerid, 0);
  422.             SetPlayerPos(playerid, 2825.7295,3169.5178,3.9641);
  423.         }
  424.         if(IsPlayerInRangeOfPoint(playerid, 4.0, 2949.1851,3166.5325,14.2436))
  425.         {
  426.             SetPlayerInterior(playerid, 0);
  427.             SetPlayerPos(playerid, 2945.9050,3166.4016,3.9097);
  428.         }
  429.         if(IsPlayerInRangeOfPoint(playerid, 4.0, 2832.7791,3274.3074,49.9688))
  430.         {
  431.             SetPlayerInterior(playerid, 0);
  432.             SetPlayerPos(playerid, 2834.3372,3270.9084,7.2224);
  433.         }
  434.         return 1;
  435.     }
  436.  
  437.     CMD:buy(playerid, params[])
  438.     {
  439.         if(IsPlayerInRangeOfPoint(playerid, 5.0, 2906.3232,3178.5508,4.1217))
  440.         {
  441.             ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "Available Items", "Health (100) - $2000\nArmour(100) - $4000", "Purchase", "Cancel");
  442.         }
  443.         else
  444.         {
  445.             ShowPlayerDialog(playerid, 2, DIALOG_STYLE_MSGBOX, "Checkpoint Marker", "You are not in range to the /buy point,\nWould you like a marker to show where it is?", "Yes", "No");
  446.         }
  447.         return 1;
  448.     }
  449.  
  450.     CMD:weapons(playerid, params[])
  451.     {
  452.         ShowPlayerDialog(playerid, 3, DIALOG_STYLE_LIST, "Weapons Tier", "Weapons Set 1\nWeapons Set 2\nWeapons Set 3", "Equip","Close");
  453.         return 1;
  454.     }
  455.  
  456.     CMD:cmds(playerid, params[])
  457.     {
  458.         SendClientMessage(playerid, 0x00FFFFFF, "");
  459.         SendClientMessage(playerid, 0x00FFFFFF, "List of available commands: (Version v1.1)");
  460.         SendClientMessage(playerid, 0x00FFFFFF, "__________________________________________________________________________________________________________________");
  461.         SendClientMessage(playerid, 0x00FFFFFF, "");
  462.         SendClientMessage(playerid, 0x00FFFFFF, "|  /building  |  /leave  |  /hq  |  /fixvw  |  /weapons  |  /buy  |  /destroycar  |  /veh  |  /version  |  /fix  |  /nos  |  /removenos  |");
  463.         SendClientMessage(playerid, 0x00FFFFFF, "|  /attachments  |");
  464.         SendClientMessage(playerid, 0x00FFFFFF, "__________________________________________________________________________________________________________________");
  465.         SendClientMessage(playerid, 0x00FFFFFF, "");
  466.         return 1;
  467.     }
  468.  
  469.     CMD:admincmds(playerid, params[])
  470.     {
  471.      if (IsPlayerAdmin(playerid))
  472.         {
  473.             SendClientMessage(playerid, COLOR_RED, "Admin Commands: /givemoney  /fine  /specplayer  /specvehicle  /specoff");
  474.             return 1;
  475.         }
  476.         else
  477.         {
  478.             SendClientMessage(playerid, COLOR_RED, "You are not an admin!");
  479.             return 1;
  480.         }
  481.     }
  482.  
  483.     CMD:destroycar(playerid, params[])
  484.     {
  485.           new currentveh;
  486.           currentveh = GetPlayerVehicleID(playerid);
  487.           DestroyVehicle(currentveh);
  488.           return 1;
  489.     }
  490.    
  491.     CMD:version(playerid, params[])
  492.     {
  493.         ShowPlayerDialog(playerid, 5, DIALOG_STYLE_MSGBOX, "Version V2", "\nTransfered script from STRCMP to zCMD (Complete)\nAdded & Perfected /nos & /removenos\nAdded objects, /attachments (Filterscript)\nAdded a Killspree system", "Close", "");
  494.         return 1;
  495.     }
  496.  
  497.     CMD:fix(playerid, params[])
  498.     {
  499.         if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_RED, "You are not in a vehicle!");
  500.         RepairVehicle(GetPlayerVehicleID(playerid));
  501.         SendClientMessage(playerid, COLOR_RED, "You have repaired your vehicle.");
  502.         return 1;
  503.     }
  504.    
  505.     CMD:givemoney(playerid, params[])
  506.     {
  507.         if (IsPlayerAdmin(playerid))
  508.         {
  509.             new
  510.             toplayerid,
  511.             amount;
  512.        
  513.             if (!sscanf(params, "ii", toplayerid, amount))
  514.             {
  515.                 if (toplayerid != INVALID_PLAYER_ID)
  516.                 {
  517.                     new
  518.                     message[40];
  519.                     GivePlayerMoney(toplayerid, amount);
  520.                     format(message, sizeof(message), "You received $%d from an admin.", amount);
  521.                     SendClientMessage(toplayerid, 0x00FF00FF, message);
  522.                 }
  523.                 else SendClientMessage(playerid, 0xFF0000FF, "Error: Player is not active.");
  524.             }
  525.             else SendClientMessage(playerid, COLOR_GRAD1, "Usage: /givemoney <playerid> <amount>");
  526.         }
  527.         else SendClientMessage(playerid, 0xFF0000FF, "Error: Only administrators can use this command.");
  528.         return 1;
  529. }
  530.  
  531.     CMD:fine(playerid, params[])
  532.     {
  533.         if (IsPlayerAdmin(playerid))
  534.         {
  535.             new
  536.             toplayerid,
  537.             amount;
  538.  
  539.             if (!sscanf(params, "ii", toplayerid, amount))
  540.             {
  541.                 if (toplayerid != INVALID_PLAYER_ID)
  542.                 {
  543.                     new
  544.                     message[41];
  545.                     GivePlayerMoney(toplayerid, -amount);
  546.                     format(message, sizeof(message), "You have been fined $%d by an admin.", amount);
  547.                     SendClientMessage(toplayerid, 0x00FF00FF, message);
  548.                 }
  549.                 else SendClientMessage(playerid, 0xFF0000FF, "Error: Player is not active.");
  550.             }
  551.             else SendClientMessage(playerid, COLOR_GRAD1, "Usage: /fine <playerid> <amount>");
  552.         }
  553.         else SendClientMessage(playerid, 0xFF0000FF, "Error: Only administrators can use this command.");
  554.         return 1;
  555.     }
  556.    
  557.    
  558.  
  559. public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
  560. {
  561.     return 1;
  562. }
  563.  
  564. public OnPlayerExitVehicle(playerid, vehicleid)
  565. {
  566.     DestroyVehicle(vehicleid);
  567.     return 1;
  568. }
  569.  
  570. public OnPlayerStateChange(playerid, newstate, oldstate)
  571. {
  572.     return 1;
  573. }
  574.  
  575. public OnPlayerEnterCheckpoint(playerid)
  576. {
  577.     DisablePlayerCheckpoint(playerid);
  578.     return 1;
  579. }
  580.  
  581. public OnPlayerLeaveCheckpoint(playerid)
  582. {
  583.     return 1;
  584. }
  585.  
  586. public OnPlayerEnterRaceCheckpoint(playerid)
  587. {
  588.     return 1;
  589. }
  590.  
  591. public OnPlayerLeaveRaceCheckpoint(playerid)
  592. {
  593.     return 1;
  594. }
  595.  
  596. public OnRconCommand(cmd[])
  597. {
  598.     return 1;
  599. }
  600.  
  601. public OnPlayerRequestSpawn(playerid)
  602. {
  603.     return 1;
  604. }
  605.  
  606. public OnObjectMoved(objectid)
  607. {
  608.     return 1;
  609. }
  610.  
  611. public OnPlayerObjectMoved(playerid, objectid)
  612. {
  613.     return 1;
  614. }
  615.  
  616. public OnPlayerPickUpPickup(playerid, pickupid)
  617. {
  618.     return 1;
  619. }
  620.  
  621. public OnVehicleMod(playerid, vehicleid, componentid)
  622. {
  623.     return 1;
  624. }
  625.  
  626. public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
  627. {
  628.     return 1;
  629. }
  630.  
  631. public OnVehicleRespray(playerid, vehicleid, color1, color2)
  632. {
  633.     return 1;
  634. }
  635.  
  636. public OnPlayerSelectedMenuRow(playerid, row)
  637. {
  638.     return 1;
  639. }
  640.  
  641. public OnPlayerExitedMenu(playerid)
  642. {
  643.     return 1;
  644. }
  645.  
  646. public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
  647. {
  648.     return 1;
  649. }
  650.  
  651. public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
  652. {
  653.     return 1;
  654. }
  655.  
  656. public OnRconLoginAttempt(ip[], password[], success)
  657. {
  658.     return 1;
  659. }
  660.  
  661. public OnPlayerUpdate(playerid)
  662. {
  663.     return 1;
  664. }
  665.  
  666. public OnPlayerStreamIn(playerid, forplayerid)
  667. {
  668.     return 1;
  669. }
  670.  
  671. public OnPlayerStreamOut(playerid, forplayerid)
  672. {
  673.     return 1;
  674. }
  675.  
  676. public OnVehicleStreamIn(vehicleid, forplayerid)
  677. {
  678.     return 1;
  679. }
  680.  
  681. public OnVehicleStreamOut(vehicleid, forplayerid)
  682. {
  683.     return 1;
  684. }
  685.  
  686. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  687. {
  688.  
  689.     if(dialogid == 1)
  690.     {
  691.         if(response)
  692.         {
  693.             if(listitem ==0)
  694.             {
  695.                 if(GetPlayerMoney(playerid) < 1999)
  696.                 {
  697.                     SendClientMessage(playerid, 0x00FF00FF, "You need $2000.");
  698.                 }
  699.                 else
  700.                 {
  701.                     SetPlayerHealth(playerid, 100);
  702.                     GivePlayerMoney(playerid, -2000);
  703.                     SendClientMessage(playerid, 0x00FF00FF, "Health Refilled.");
  704.                 }
  705.             }
  706.             if(listitem ==1)
  707.             {
  708.                 if(GetPlayerMoney(playerid) < 3999)
  709.                 {
  710.                     SendClientMessage(playerid, 0x00FF00FF, "You need $4000.");
  711.                 }
  712.                 else
  713.                 {
  714.                     SetPlayerArmour(playerid, 100);
  715.                     GivePlayerMoney(playerid, -4000);
  716.                     SendClientMessage(playerid, 0x00FF00FF, "Armour Refilled.");
  717.                 }
  718.             }
  719.         }
  720.     }
  721.  
  722.     if(dialogid == 2)
  723.      {
  724.         if(response)
  725.         {
  726.             SetPlayerCheckpoint(playerid, 2906.7595,3178.9297,4.1284, 2.0);
  727.         }
  728.      }
  729.  
  730.  
  731.     if(dialogid == 3)
  732.     {
  733.             if(response)
  734.             {
  735.                 if(listitem == 0)
  736.             {
  737.                 ResetPlayerWeapons(playerid);
  738.                 SendClientMessage(playerid, 0xFF0000AA, "You have selected tier 1.");
  739.                 GivePlayerWeapon(playerid, 4, 1);
  740.                 GivePlayerWeapon(playerid, 22, 9999999);
  741.                 GivePlayerWeapon(playerid, 25, 9999999);
  742.                 GivePlayerWeapon(playerid, 34, 9999999);
  743.                 GivePlayerWeapon(playerid, 16, 2);
  744.             }
  745.                 if(listitem == 1)
  746.             {
  747.                 ResetPlayerWeapons(playerid);
  748.                 SendClientMessage(playerid, 0xFF0000AA, "You have selected tier 2.");
  749.                 GivePlayerWeapon(playerid, 9, 1);
  750.                 GivePlayerWeapon(playerid, 24, 99999999);
  751.                 GivePlayerWeapon(playerid, 28, 99999999);
  752.                 GivePlayerWeapon(playerid, 25, 99999999);
  753.             }
  754.                 if(listitem == 2)
  755.             {
  756.                 ResetPlayerWeapons(playerid);
  757.                 SendClientMessage(playerid, 0xFF0000AA, "You have selected tier 3.");
  758.                 GivePlayerWeapon(playerid, 8, 1);
  759.                 GivePlayerWeapon(playerid, 24, 99999999);
  760.                 GivePlayerWeapon(playerid, 27, 99999999);
  761.                 GivePlayerWeapon(playerid, 31, 99999999);
  762.                 GivePlayerWeapon(playerid, 39, 3);
  763.             }
  764.         }
  765.  
  766. }
  767.     if(dialogid ==4)
  768.     {
  769.         if(listitem ==0)
  770.         {
  771.             new Float:x, Float:y, Float:z;
  772.             GetPlayerPos(playerid,x,y,z);
  773.             CreateVehicle(415,x-3.0,y,z, 0.0, 1,1,15);
  774.             return 1;
  775.         }
  776.         if(listitem ==1)
  777.         {
  778.             new Float:x, Float:y, Float:z;
  779.             GetPlayerPos(playerid,x,y,z);
  780.             CreateVehicle(429,x-3.0,y,z, 0.0, 1,1,15);
  781.             return 1;
  782.         }
  783.         if(listitem ==2)
  784.         {
  785.             new Float:x, Float:y, Float:z;
  786.             GetPlayerPos(playerid,x,y,z);
  787.             CreateVehicle(541,x-3.0,y,z, 0.0, 1,1,15);
  788.             return 1;
  789.         }
  790.         if(listitem ==3)
  791.         {
  792.             if(GetPlayerScore(playerid) < 30)
  793.             {
  794.                 SendClientMessage(playerid, COLOR_RED, "You need a minimum score of 30 to use this.");
  795.             }
  796.             else
  797.             {
  798.                 new Float:x, Float:y, Float:z;
  799.                 GetPlayerPos(playerid,x,y,z);
  800.                 CreateVehicle(520,x-3.0,y,z, 0.0, 1,1,15);
  801.                 return 1;
  802.             }
  803.         }
  804.         else
  805.         {
  806.             SendClientMessage(playerid, COLOR_GRAD1, "You have canceled the vehicle dialog menu.");
  807.         }
  808.     }
  809.     return 1;
  810. }
  811.  
  812. public OnPlayerClickPlayer(playerid, clickedplayerid, source)
  813. {
  814.     return 1;
  815. }
  816.  
  817. forward SetPlayerRandomPrisonerSpawn(playerid);
  818. public SetPlayerRandomPrisonerSpawn(playerid)
  819. {
  820.     new rand = random(sizeof(PrisonerRandomSpawns));
  821.     SetPlayerPos(playerid, PrisonerRandomSpawns[rand][0], PrisonerRandomSpawns[rand][1], PrisonerRandomSpawns[rand][2]);
  822.     return 1;
  823. }
  824.  
  825.  
  826. forward SetPlayerRandomGuardSpawn(playerid);
  827. public SetPlayerRandomGuardSpawn(playerid)
  828. {
  829.     new rand = random(sizeof(GuardRandomSpawns));
  830.     SetPlayerPos(playerid, GuardRandomSpawns[rand][0], GuardRandomSpawns[rand][1], GuardRandomSpawns[rand][2]);
  831.     return 1;
  832. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement