Advertisement
Guest User

Call Of Duty :Dino D Carter

a guest
Dec 14th, 2012
867
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 99.25 KB | None | 0 0
  1. //Credits to Y_Less, Dracoblue and Kush.
  2.  
  3. /*
  4.  
  5.         Some good codes here
  6.     PlayerInfo[playerid][pRank] = 1;  " On this servrer pRank is "XP" to ranks
  7.     PlayerInfo[playerid][pKills] = amount;
  8.  
  9. */
  10.  
  11.  
  12. #include <a_samp>
  13. #include <YSI\y_ini>
  14. #include <zcmd>
  15. #include <sscanf2>
  16.  
  17. #define DIALOG_REGISTER 1
  18. #define DIALOG_LOGIN 2
  19. #define DIALOG_SUCCESS_1 3
  20. #define DIALOG_SUCCESS_2 4
  21.  
  22. #define PATH "/Users/%s.ini"
  23.  
  24. #define COL_WHITE "{FFFFFF}"
  25. #define COL_RED "{F81414}"
  26. #define COL_GREEN "{00FF22}"
  27. #define COL_LIGHTBLUE "{00CED1}"
  28.  
  29. // Colors
  30.  
  31. #define COLOR_WHITE 0xFFFFFFAA
  32. #define white 0xFFFFFFAA
  33. #define yellow 0xFFFFF00AA
  34. #define red 0x660000AA
  35. #define pink 0xFF66FFAA
  36. #define COLOR_LIGHTBLUE 0x33CCFFAA
  37. #define darkred 0x660000AA
  38. #define BLUE 0x375FFFFF
  39. #define COLOR_GREY 0xAFAFAFAA
  40. #define COLOR_GOLD 0xD2691EAA
  41. #define orange 0xFF9900AA
  42. #define nicepink 0xEC13COFF
  43. #define TEAM_GROVE_COLOR 0xB4B5B7AA
  44. #define green 0x7CFC00AA
  45. #define COLOR_RED 0xFF0000AA
  46. #define RED 0xFF0000AA
  47. #define COLOR_DRED 0xFF0000AA //defines red color
  48. #undef MAX_PLAYERS
  49. #define MAX_PLAYERS 32  // Here you need to set the maximum number of players able to play on your server at any given time, I'll put 32 because that's the max players on my server.
  50. #define GREEN                    0x15FF00AA
  51. #define BLUE                     0x375FFFFF
  52. #define WHITE                    0xFFFFFFFF
  53. #define YELLOW                   0xF2FF00AA
  54. #define GREY                     0xAAAAAAAA
  55. #define LIGHTBLUE                0x515BC7AA
  56.  
  57.  
  58.  
  59. new aDuty[MAX_PLAYERS];
  60. new Text:Textdraw2;
  61. new TRank[150];
  62. new sniper,sniper1;
  63. new bomb;
  64. new Float:bombx,Float:bomby,Float:bombz;
  65.  
  66.  
  67.  
  68.  
  69. enum pInfo
  70. {
  71.     pPass,
  72.     pCash,
  73.     pAdmin,
  74.     pKills,
  75.     pDeaths,
  76.     pScore,
  77.     pRank,
  78.     Frozen,
  79.     pBanned,
  80.     pWarn,
  81.     pMuted,
  82.     pMuteTime,
  83.     pVip,
  84.     pMap,
  85.     pKS
  86. }
  87. new PlayerInfo[MAX_PLAYERS][pInfo];
  88. forward AntiSpawnkill(playerid);
  89. forward Map(playerid);
  90. forward Radio(playerid);
  91. forward Radio1(playerid);
  92. forward Radio2(playerid);
  93. forward rSpawn(playerid);
  94. forward Spec(playerid);
  95. forward hittar();
  96.  
  97.  
  98. forward LoadUser_data(playerid,name[],value[]);
  99. public LoadUser_data(playerid,name[],value[])
  100. {
  101.     INI_Int("Password",PlayerInfo[playerid][pPass]);
  102.     INI_Int("Cash",PlayerInfo[playerid][pCash]);
  103.     INI_Int("Admin",PlayerInfo[playerid][pAdmin]);
  104.     INI_Int("Kills",PlayerInfo[playerid][pKills]);
  105.     INI_Int("Deaths",PlayerInfo[playerid][pDeaths]);
  106.     INI_Int("Score",PlayerInfo[playerid][pScore]);
  107.     INI_Int("Rank",PlayerInfo[playerid][pRank]);
  108.     INI_Int("Banned",PlayerInfo[playerid][pBanned]);
  109.     INI_Int("Warns",PlayerInfo[playerid][pWarn]);
  110.     INI_Int("Muted",PlayerInfo[playerid][pMuted]);
  111.     INI_Int("MuteTime",PlayerInfo[playerid][pMuteTime]);
  112.     INI_Int("Vip",PlayerInfo[playerid][pVip]);
  113.     INI_Int("Map",PlayerInfo[playerid][pMap]);
  114.     INI_Int("Killstreak",PlayerInfo[playerid][pKS]);
  115.     return 1;
  116. }
  117.  
  118. stock UserPath(playerid)
  119. {
  120.     new string[128],playername[MAX_PLAYER_NAME];
  121.     GetPlayerName(playerid,playername,sizeof(playername));
  122.     format(string,sizeof(string),PATH,playername);
  123.     return string;
  124. }
  125.  
  126. /*Credits to Dracoblue*/
  127. stock udb_hash(buf[]) {
  128.     new length=strlen(buf);
  129.     new s1 = 1;
  130.     new s2 = 0;
  131.     new n;
  132.     for (n=0; n<length; n++)
  133.     {
  134.        s1 = (s1 + buf[n]) % 65521;
  135.        s2 = (s2 + s1)     % 65521;
  136.     }
  137.     return (s2 << 16) + s1;
  138. }
  139.  
  140. main()
  141. {
  142.     print("\n----------------------------------");
  143.     print(" 10% 20% 30% 40%");
  144.     print(" 50% 60% 70% 80%");
  145.     print(" 90% 95% 98% 99%");
  146.     print(" 100% 100% 100%");
  147.     print(" Server Work Fine Now! ");
  148.     print(" _____________________");
  149.     print(" Dino D Carter");
  150.     print(" Deathmatch.");
  151.     print(" _____________________");
  152.     print("----------------------------------\n");
  153. }
  154.  
  155. public OnGameModeInit()
  156. {
  157.     Textdraw2 = TextDrawCreate(390.000000, 0.000000, "Rank:~r~");
  158.     TextDrawBackgroundColor(Textdraw2, 16711935);
  159.     TextDrawFont(Textdraw2, 1);
  160.     TextDrawLetterSize(Textdraw2, 0.570000, 2.700000);
  161.     TextDrawColor(Textdraw2, 65535);
  162.     TextDrawSetOutline(Textdraw2, 1);
  163.     TextDrawSetProportional(Textdraw2, 1);
  164.    
  165.     sniper = CreatePickup(358, 3, 2321.1763,-84.9634,31.4834);//(model,type,z,x,y);
  166.     sniper1 = CreatePickup(358, 3, 2323.7632,-42.8470,32.7277);
  167.   //  health1 = CreatePickup(1240, 22, 2292.3342,-133.2999,27.4766);
  168.   //  armour1 = CreatePickup(1242, 22, 2332.6990,-144.6696,27.4766);
  169.    
  170.    
  171.     CreateObject(792,2526.00000000,2773.19995117,10.10000038,0.00000000,0.00000000,0.00000000); //object(aw_streettree1) (1)
  172.     CreateObject(792,2530.80004883,2773.30004883,10.10000038,0.00000000,0.00000000,0.00000000); //object(aw_streettree1) (2)
  173.     CreateObject(792,2535.00000000,2773.30004883,10.10000038,0.00000000,0.00000000,0.00000000); //object(aw_streettree1) (3)
  174.     CreateObject(792,2539.00000000,2773.30004883,10.10000038,0.00000000,0.00000000,0.00000000); //object(aw_streettree1) (4)
  175.     CreateObject(792,2543.50000000,2773.30004883,10.10000038,0.00000000,0.00000000,0.00000000); //object(aw_streettree1) (5)
  176.     CreateObject(792,2547.50000000,2773.30004883,10.10000038,0.00000000,0.00000000,0.00000000); //object(aw_streettree1) (6)
  177.     CreateObject(792,2551.80004883,2773.30004883,10.10000038,0.00000000,0.00000000,0.00000000); //object(aw_streettree1) (7)
  178.     CreateObject(792,2555.30004883,2773.30004883,10.10000038,0.00000000,0.00000000,0.00000000); //object(aw_streettree1) (8)
  179.     CreateObject(792,2560.00000000,2773.39990234,10.10000038,0.00000000,0.00000000,0.00000000); //object(aw_streettree1) (9)
  180.     CreateObject(792,2564.00000000,2773.39990234,10.10000038,0.00000000,0.00000000,0.00000000); //object(aw_streettree1) (10)
  181.     CreateObject(792,2568.00000000,2773.39990234,10.10000038,0.00000000,0.00000000,0.00000000); //object(aw_streettree1) (11)
  182.     CreateObject(792,2572.30004883,2773.39990234,10.10000038,0.00000000,0.00000000,0.00000000); //object(aw_streettree1) (12)
  183.     CreateObject(792,2576.30004883,2773.39990234,10.10000038,0.00000000,0.00000000,0.00000000); //object(aw_streettree1) (13)
  184.     CreateObject(792,2577.00000000,2787.89990234,10.10000038,0.00000000,0.00000000,0.00000000); //object(aw_streettree1) (14)
  185.     CreateObject(792,2572.30004883,2788.10009766,10.10000038,0.00000000,0.00000000,0.00000000); //object(aw_streettree1) (15)
  186.     CreateObject(792,2568.50000000,2788.00000000,10.10000038,0.00000000,0.00000000,0.00000000); //object(aw_streettree1) (16)
  187.     CreateObject(792,2564.30004883,2788.19995117,10.10000038,0.00000000,0.00000000,0.00000000); //object(aw_streettree1) (17)
  188.     CreateObject(792,2559.80004883,2788.19995117,10.10000038,0.00000000,0.00000000,0.00000000); //object(aw_streettree1) (18)
  189.     CreateObject(792,2555.80004883,2788.60009766,10.10000038,0.00000000,0.00000000,0.00000000); //object(aw_streettree1) (19)
  190.     CreateObject(792,2551.80004883,2788.50000000,10.10000038,0.00000000,0.00000000,0.00000000); //object(aw_streettree1) (20)
  191.     CreateObject(792,2547.80004883,2788.19995117,10.10000038,0.00000000,0.00000000,0.00000000); //object(aw_streettree1) (21)
  192.     CreateObject(792,2543.80004883,2788.39990234,10.10000038,0.00000000,0.00000000,0.00000000); //object(aw_streettree1) (22)
  193.     CreateObject(792,2539.30004883,2788.60009766,10.10000038,0.00000000,0.00000000,0.00000000); //object(aw_streettree1) (23)
  194.     CreateObject(792,2529.89990234,2764.60009766,10.30000019,0.00000000,0.00000000,0.00000000); //object(aw_streettree1) (24)
  195.     CreateObject(792,2528.39990234,2764.69995117,10.30000019,0.00000000,0.00000000,0.00000000); //object(aw_streettree1) (25)
  196.     CreateObject(792,2545.39990234,2764.10009766,10.30000019,0.00000000,0.00000000,0.00000000); //object(aw_streettree1) (26)
  197.     CreateObject(792,2546.89990234,2764.00000000,10.30000019,0.00000000,0.00000000,0.00000000); //object(aw_streettree1) (27)
  198.     CreateObject(792,2564.89990234,2764.10009766,10.30000019,0.00000000,0.00000000,0.00000000); //object(aw_streettree1) (28)
  199.     CreateObject(792,2563.19995117,2764.19995117,10.30000019,0.00000000,0.00000000,0.00000000); //object(aw_streettree1) (29)
  200.     CreateObject(792,2522.69995117,2755.80004883,10.10000038,0.00000000,0.00000000,0.00000000); //object(aw_streettree1) (31)
  201.     CreateObject(792,2518.39990234,2756.00000000,10.10000038,0.00000000,0.00000000,0.00000000); //object(aw_streettree1) (32)
  202.     CreateObject(792,2526.69995117,2755.80004883,10.10000038,0.00000000,0.00000000,0.00000000); //object(aw_streettree1) (33)
  203.     CreateObject(792,2530.89990234,2755.80004883,10.10000038,0.00000000,0.00000000,0.00000000); //object(aw_streettree1) (34)
  204.     CreateObject(792,2534.89990234,2755.80004883,10.10000038,0.00000000,0.00000000,0.00000000); //object(aw_streettree1) (35)
  205.     CreateObject(792,2539.39990234,2755.80004883,10.10000038,0.00000000,0.00000000,0.00000000); //object(aw_streettree1) (36)
  206.     CreateObject(792,2543.60009766,2755.80004883,10.10000038,0.00000000,0.00000000,0.00000000); //object(aw_streettree1) (37)
  207.     CreateObject(792,2547.80004883,2755.80004883,10.10000038,0.00000000,0.00000000,0.00000000); //object(aw_streettree1) (38)
  208.     CreateObject(792,2551.50000000,2755.80004883,10.10000038,0.00000000,0.00000000,0.00000000); //object(aw_streettree1) (39)
  209.     CreateObject(792,2555.50000000,2755.80004883,10.10000038,0.00000000,0.00000000,0.00000000); //object(aw_streettree1) (40)
  210.     CreateObject(792,2560.00000000,2755.80004883,10.10000038,0.00000000,0.00000000,0.00000000); //object(aw_streettree1) (41)
  211.     CreateObject(792,2564.00000000,2755.80004883,10.10000038,0.00000000,0.00000000,0.00000000); //object(aw_streettree1) (42)
  212.     CreateObject(792,2568.30004883,2755.80004883,10.10000038,0.00000000,0.00000000,0.00000000); //object(aw_streettree1) (43)
  213.     CreateObject(792,2572.80004883,2755.80004883,10.10000038,0.00000000,0.00000000,0.00000000); //object(aw_streettree1) (44)
  214.     CreateObject(792,2576.80004883,2755.80004883,10.10000038,0.00000000,0.00000000,0.00000000); //object(aw_streettree1) (45)
  215.     CreateObject(792,2576.89990234,2750.50000000,10.10000038,0.00000000,0.00000000,0.00000000); //object(aw_streettree1) (46)
  216.     CreateObject(792,2572.10009766,2750.39990234,10.10000038,0.00000000,0.00000000,0.00000000); //object(aw_streettree1) (47)
  217.     CreateObject(792,2568.39990234,2750.50000000,10.10000038,0.00000000,0.00000000,0.00000000); //object(aw_streettree1) (48)
  218.     CreateObject(792,2564.19995117,2750.60009766,10.10000038,0.00000000,0.00000000,0.00000000); //object(aw_streettree1) (49)
  219.     CreateObject(792,2560.00000000,2750.69995117,10.10000038,0.00000000,0.00000000,0.00000000); //object(aw_streettree1) (50)
  220.     CreateObject(792,2555.50000000,2750.39990234,10.10000038,0.00000000,0.00000000,0.00000000); //object(aw_streettree1) (51)
  221.     CreateObject(792,2551.69995117,2750.30004883,10.10000038,0.00000000,0.00000000,0.00000000); //object(aw_streettree1) (52)
  222.     CreateObject(792,2547.69995117,2750.39990234,10.10000038,0.00000000,0.00000000,0.00000000); //object(aw_streettree1) (53)
  223.     CreateObject(792,2543.50000000,2750.50000000,10.10000038,0.00000000,0.00000000,0.00000000); //object(aw_streettree1) (54)
  224.     CreateObject(792,2539.30004883,2750.60009766,10.10000038,0.00000000,0.00000000,0.00000000); //object(aw_streettree1) (55)
  225.     CreateObject(792,2535.10009766,2750.69995117,10.10000038,0.00000000,0.00000000,0.00000000); //object(aw_streettree1) (56)
  226.     CreateObject(792,2530.80004883,2750.60009766,10.10000038,0.00000000,0.00000000,0.00000000); //object(aw_streettree1) (57)
  227.     CreateObject(792,2526.60009766,2750.69995117,10.10000038,0.00000000,0.00000000,0.00000000); //object(aw_streettree1) (58)
  228.     CreateObject(792,2522.60009766,2750.80004883,10.10000038,0.00000000,0.00000000,0.00000000); //object(aw_streettree1) (59)
  229.     CreateObject(792,2518.60009766,2750.89990234,10.10000038,0.00000000,0.00000000,0.00000000); //object(aw_streettree1) (60)
  230.     CreateObject(994,2571.00000000,2756.69995117,9.80000019,0.00000000,0.00000000,0.00000000); //object(lhouse_barrier2) (1)
  231.     CreateObject(994,2563.00000000,2756.80004883,9.80000019,0.00000000,0.00000000,0.00000000); //object(lhouse_barrier2) (2)
  232.     CreateObject(994,2555.30004883,2756.89990234,9.80000019,0.00000000,0.00000000,0.00000000); //object(lhouse_barrier2) (3)
  233.     CreateObject(994,2547.30004883,2757.00000000,9.80000019,0.00000000,0.00000000,0.00000000); //object(lhouse_barrier2) (4)
  234.     CreateObject(994,2539.50000000,2757.10009766,9.80000019,0.00000000,0.00000000,0.00000000); //object(lhouse_barrier2) (5)
  235.     CreateObject(994,2530.30004883,2757.30004883,9.80000019,0.00000000,0.00000000,0.00000000); //object(lhouse_barrier2) (6)
  236.     CreateObject(994,2522.80004883,2757.39990234,9.80000019,0.00000000,0.00000000,0.00000000); //object(lhouse_barrier2) (7)
  237.     CreateObject(994,2525.89990234,2750.19995117,9.80000019,0.00000000,0.00000000,0.00000000); //object(lhouse_barrier2) (8)
  238.     CreateObject(994,2533.39990234,2750.30004883,9.80000019,0.00000000,0.00000000,0.00000000); //object(lhouse_barrier2) (9)
  239.     CreateObject(994,2517.89990234,2750.10009766,9.80000019,0.00000000,0.00000000,358.00000000); //object(lhouse_barrier2) (10)
  240.     CreateObject(994,2542.39990234,2749.80004883,9.80000019,0.00000000,0.00000000,0.00000000); //object(lhouse_barrier2) (12)
  241.     CreateObject(994,2550.39990234,2749.10009766,9.80000019,0.00000000,0.00000000,0.00000000); //object(lhouse_barrier2) (13)
  242.     CreateObject(994,2557.89990234,2749.00000000,9.80000019,0.00000000,0.00000000,0.00000000); //object(lhouse_barrier2) (14)
  243.     CreateObject(994,2565.89990234,2748.89990234,9.80000019,0.00000000,0.00000000,0.00000000); //object(lhouse_barrier2) (15)
  244.     CreateObject(994,2572.39990234,2748.80004883,9.80000019,0.00000000,0.00000000,0.00000000); //object(lhouse_barrier2) (16)
  245.    
  246.     // Mapa (spawn)
  247.  
  248.     CreateObject(987,2269.69995117,-146.10000610,25.29999924,0.00000000,0.00000000,0.00000000); //object(elecfence_bar) (1)
  249.     CreateObject(987,2233.79980469,-145.89941406,25.00000000,0.00000000,0.00000000,0.00000000); //object(elecfence_bar) (2)
  250.     CreateObject(987,2245.79980469,-146.09960938,25.29999924,0.00000000,0.00000000,0.00000000); //object(elecfence_bar) (3)
  251.     CreateObject(987,2257.69921875,-146.09960938,25.29999924,0.00000000,0.00000000,0.00000000); //object(elecfence_bar) (4)
  252.     CreateObject(987,2204.60009766,-108.19999695,24.79999924,0.00000000,0.00000000,308.00000000); //object(elecfence_bar) (5)
  253.     CreateObject(987,2226.50000000,-136.59960938,24.79999924,0.00000000,0.00000000,307.99621582); //object(elecfence_bar) (6)
  254.     CreateObject(987,2219.19921875,-127.29980469,24.70000076,0.00000000,0.00000000,307.99621582); //object(elecfence_bar) (7)
  255.     CreateObject(987,2211.79980469,-117.79980469,24.70000076,0.00000000,0.00000000,307.99621582); //object(elecfence_bar) (8)
  256.     CreateObject(987,2194.19995117,-103.09999847,25.29999924,0.00000000,0.00000000,329.99621582); //object(elecfence_bar) (9)
  257.     CreateObject(987,2184.39990234,-100.80000305,25.79999924,0.00000000,0.00000000,345.99084473); //object(elecfence_bar) (10)
  258.     CreateObject(987,2176.39990234,-92.80000305,25.39999962,0.00000000,0.00000000,317.98693848); //object(elecfence_bar) (11)
  259.     CreateObject(987,2176.19995117,-80.80000305,25.29999924,0.00000000,0.00000000,269.98278809); //object(elecfence_bar) (12)
  260.     CreateObject(987,2176.10009766,-68.80000305,24.89999962,0.00000000,0.00000000,269.97802734); //object(elecfence_bar) (13)
  261.     CreateObject(987,2176.10009766,-56.79999924,24.89999962,0.00000000,0.00000000,269.97802734); //object(elecfence_bar) (14)
  262.     CreateObject(987,2176.10009766,-45.00000000,24.89999962,0.00000000,0.00000000,269.97802734); //object(elecfence_bar) (15)
  263.     CreateObject(987,2176.10009766,-33.00000000,24.89999962,0.00000000,0.00000000,269.97802734); //object(elecfence_bar) (16)
  264.     CreateObject(987,2191.10009766,-13.80000019,24.20000076,0.00000000,0.00000000,3.97802734); //object(elecfence_bar) (17)
  265.     CreateObject(987,2281.69995117,-146.10000610,25.29999924,0.00000000,0.00000000,0.00000000); //object(elecfence_bar) (18)
  266.     CreateObject(987,2293.69995117,-146.10000610,25.29999924,0.00000000,0.00000000,0.00000000); //object(elecfence_bar) (19)
  267.     CreateObject(987,2305.69995117,-146.10000610,25.29999924,0.00000000,0.00000000,0.00000000); //object(elecfence_bar) (20)
  268.     CreateObject(987,2317.69995117,-146.10000610,25.29999924,0.00000000,0.00000000,0.00000000); //object(elecfence_bar) (21)
  269.     CreateObject(987,2383.30004883,-98.59999847,25.39999962,0.00000000,0.00000000,256.00000000); //object(elecfence_bar) (22)
  270.     CreateObject(987,2329.69921875,-146.09960938,25.29999924,0.00000000,0.00000000,0.00000000); //object(elecfence_bar) (23)
  271.     CreateObject(987,2341.09960938,-146.09960938,25.60000038,0.00000000,0.00000000,35.99670410); //object(elecfence_bar) (24)
  272.     CreateObject(987,2351.19921875,-139.19921875,25.79999924,0.00000000,0.00000000,35.99670410); //object(elecfence_bar) (25)
  273.     CreateObject(987,2361.09960938,-132.19921875,26.39999962,0.00000000,0.00000000,35.99670410); //object(elecfence_bar) (26)
  274.     CreateObject(987,2371.00000000,-125.50000000,27.00000000,0.00000000,0.00000000,35.99670410); //object(elecfence_bar) (27)
  275.     CreateObject(987,2385.89990234,-94.59999847,25.20000076,0.00000000,0.00000000,90.00000000); //object(elecfence_bar) (29)
  276.     CreateObject(987,2386.89990234,-58.70000076,25.50000000,0.00000000,0.00000000,90.00000000); //object(elecfence_bar) (30)
  277.     CreateObject(987,2385.69921875,-82.59960938,25.50000000,0.00000000,0.00000000,90.00000000); //object(elecfence_bar) (31)
  278.     CreateObject(987,2385.89941406,-70.59960938,26.50000000,0.00000000,0.00000000,90.00000000); //object(elecfence_bar) (32)
  279.     CreateObject(987,2176.09960938,-21.00000000,24.89999962,0.00000000,0.00000000,269.97802734); //object(elecfence_bar) (33)
  280.     CreateObject(987,2181.79980469,-10.89941406,24.20000076,0.00000000,0.00000000,243.97338867); //object(elecfence_bar) (34)
  281.     CreateObject(987,2182.09960938,-11.19921875,24.79999924,0.00000000,0.00000000,347.97546387); //object(elecfence_bar) (35)
  282.     CreateObject(987,2205.69995117,-17.00000000,24.70000076,0.00000000,0.00000000,347.97546387); //object(elecfence_bar) (36)
  283.     CreateObject(987,2387.50000000,-46.50000000,26.10000038,0.00000000,0.00000000,90.00000000); //object(elecfence_bar) (37)
  284.     CreateObject(987,2389.89990234,-20.79999924,25.29999924,0.00000000,0.00000000,90.00000000); //object(elecfence_bar) (38)
  285.     CreateObject(987,2389.39990234,-32.79999924,25.29999924,0.00000000,0.00000000,90.00000000); //object(elecfence_bar) (39)
  286.     CreateObject(987,2386.19995117,-18.89999962,25.50000000,0.00000000,0.00000000,180.00000000); //object(elecfence_bar) (40)
  287.     CreateObject(987,2374.19995117,-18.70000076,25.50000000,0.00000000,0.00000000,179.99450684); //object(elecfence_bar) (41)
  288.     CreateObject(987,2362.19995117,-18.39999962,25.50000000,0.00000000,0.00000000,179.99450684); //object(elecfence_bar) (42)
  289.     CreateObject(987,2350.89990234,-18.10000038,25.50000000,0.00000000,0.00000000,179.99450684); //object(elecfence_bar) (43)
  290.     CreateObject(987,2339.10009766,-17.79999924,25.50000000,0.00000000,0.00000000,179.99450684); //object(elecfence_bar) (44)
  291.     CreateObject(987,2304.50000000,-18.00000000,25.50000000,0.00000000,0.00000000,180.00000000); //object(elecfence_bar) (45)
  292.     CreateObject(987,2292.30004883,-17.70000076,25.50000000,0.00000000,0.00000000,179.99450684); //object(elecfence_bar) (46)
  293.     CreateObject(987,2281.00000000,-17.39999962,25.50000000,0.00000000,0.00000000,179.99450684); //object(elecfence_bar) (47)
  294.     CreateObject(987,2269.30004883,-17.60000038,25.50000000,0.00000000,0.00000000,179.99450684); //object(elecfence_bar) (48)
  295.     CreateObject(987,2257.50000000,-17.79999924,25.50000000,0.00000000,0.00000000,179.99450684); //object(elecfence_bar) (49)
  296.     CreateObject(987,2245.80004883,-18.00000000,25.50000000,0.00000000,0.00000000,179.99450684); //object(elecfence_bar) (50)
  297.     CreateObject(987,2234.50000000,-18.20000076,25.50000000,0.00000000,0.00000000,179.99450684); //object(elecfence_bar) (51)
  298.     CreateObject(987,2228.80004883,-18.29999924,25.50000000,0.00000000,0.00000000,191.99450684); //object(elecfence_bar) (52)
  299.     CreateObject(987,2315.69995117,-17.50000000,29.29999924,0.00000000,0.00000000,179.99450684); //object(elecfence_bar) (53)
  300.     CreateObject(987,2321.89990234,-17.20000076,29.29999924,0.00000000,0.00000000,179.99450684); //object(elecfence_bar) (54)
  301.     CreateObject(987,2333.60009766,-16.70000076,29.29999924,0.00000000,0.00000000,179.99450684); //object(elecfence_bar) (55)
  302.     CreateObject(987,2386.89990234,-58.70000076,30.00000000,0.00000000,0.00000000,90.00000000); //object(elecfence_bar) (56)
  303.     CreateObject(987,2386.10009766,-70.40000153,30.00000000,0.00000000,0.00000000,90.00000000); //object(elecfence_bar) (57)
  304.     CreateObject(987,2379.69921875,-118.39941406,27.20000076,0.00000000,0.00000000,90.00000000); //object(elecfence_bar) (58)
  305.     CreateObject(987,2386.80004883,-91.59999847,25.79999924,0.00000000,0.00000000,245.99719238); //object(elecfence_bar) (59)
  306.     CreateObject(987,2390.39990234,-18.89999962,25.50000000,0.00000000,0.00000000,179.99450684); //object(elecfence_bar) (60)
  307.     CreateObject(987,2197.19995117,-10.39999962,24.10000038,0.00000000,0.00000000,321.97546387); //object(elecfence_bar) (61)
  308.     CreateObject(987,2176.10009766,-21.00000000,29.20000076,0.00000000,0.00000000,269.97802734); //object(elecfence_bar) (62)
  309.     CreateObject(987,2176.10009766,-32.20000076,29.20000076,0.00000000,0.00000000,269.97802734); //object(elecfence_bar) (63)
  310.     CreateObject(987,2176.10009766,-43.70000076,29.20000076,0.00000000,0.00000000,269.97802734); //object(elecfence_bar) (64)
  311.     CreateObject(987,2176.10009766,-55.40000153,29.20000076,0.00000000,0.00000000,269.97802734); //object(elecfence_bar) (65)
  312.     CreateObject(987,2176.10009766,-66.90000153,29.20000076,0.00000000,0.00000000,269.97802734); //object(elecfence_bar) (66)
  313.     CreateObject(987,2176.10009766,-78.59999847,29.20000076,0.00000000,0.00000000,269.97802734); //object(elecfence_bar) (67)
  314.     CreateObject(987,2176.10009766,-82.59999847,29.20000076,0.00000000,0.00000000,269.97802734); //object(elecfence_bar) (68)
  315.     CreateObject(987,2176.39990234,-92.80000305,28.70000076,0.00000000,0.00000000,317.98278809); //object(elecfence_bar) (69)
  316.     CreateObject(987,2184.39990234,-100.80000305,28.79999924,0.00000000,0.00000000,345.98693848); //object(elecfence_bar) (70)
  317.     CreateObject(987,2194.19995117,-103.09999847,28.60000038,0.00000000,0.00000000,329.99084473); //object(elecfence_bar) (71)
  318.     CreateObject(987,2204.60009766,-108.19999695,28.29999924,0.00000000,0.00000000,307.99621582); //object(elecfence_bar) (72)
  319.     CreateObject(987,2211.80004883,-117.80000305,28.50000000,0.00000000,0.00000000,307.99621582); //object(elecfence_bar) (73)
  320.     CreateObject(987,2219.19995117,-127.30000305,28.50000000,0.00000000,0.00000000,307.99621582); //object(elecfence_bar) (74)
  321.     CreateObject(987,2226.50000000,-136.60000610,28.29999924,0.00000000,0.00000000,307.99621582); //object(elecfence_bar) (75)
  322.     CreateObject(987,2233.80004883,-145.89999390,28.29999924,0.00000000,0.00000000,0.00000000); //object(elecfence_bar) (76)
  323.     CreateObject(987,2245.80004883,-145.80000305,28.29999924,0.00000000,0.00000000,0.00000000); //object(elecfence_bar) (77)
  324.     CreateObject(987,2257.50000000,-145.69999695,28.29999924,0.00000000,0.00000000,0.00000000); //object(elecfence_bar) (78)
  325.     CreateObject(987,2269.19995117,-145.89999390,28.29999924,0.00000000,0.00000000,0.00000000); //object(elecfence_bar) (79)
  326.     CreateObject(987,2281.69995117,-146.10000610,28.10000038,0.00000000,0.00000000,0.00000000); //object(elecfence_bar) (85)
  327.     CreateObject(987,2293.69995117,-146.10000610,28.10000038,0.00000000,0.00000000,0.00000000); //object(elecfence_bar) (86)
  328.     CreateObject(987,2305.69995117,-146.10000610,28.29999924,0.00000000,0.00000000,0.00000000); //object(elecfence_bar) (87)
  329.     CreateObject(987,2317.69995117,-146.10000610,28.10000038,0.00000000,0.00000000,0.00000000); //object(elecfence_bar) (88)
  330.     CreateObject(987,2329.69995117,-146.10000610,28.10000038,0.00000000,0.00000000,0.00000000); //object(elecfence_bar) (89)
  331.     CreateObject(987,2388.89990234,-37.79999924,25.50000000,0.00000000,0.00000000,90.00000000); //object(elecfence_bar) (90)
  332.     CreateObject(987,2181.80004883,-10.89999962,22.20000076,0.00000000,0.00000000,243.97338867); //object(elecfence_bar) (91)
  333.     CreateObject(987,2182.10009766,-11.19999981,22.29999924,0.00000000,0.00000000,347.97546387); //object(elecfence_bar) (92)
  334.  
  335.     UsePlayerPedAnims(); // CJ run stile
  336.     ShowPlayerMarkers(2); // can see players on map
  337.     AllowInteriorWeapons(1);
  338.  //   EnableTirePopping(1);
  339.   //  EnableStuntBonusForAll(1);
  340.     SetWorldTime(2);
  341.     DisableInteriorEnterExits();
  342.     SetGameModeText("Novi DM By: Dino D Carter");
  343.     AddPlayerClass(29,2254.2102,-125.9353,27.3745,353.9657,24,1000,27,1000,0,0); // Team 1
  344.     AddPlayerClass(288,2199.3601,-65.9702,27.4838,280.9817,24,1000,27,1000,0,0); // Team 2
  345.     AddPlayerClass(290,2259.1921,-46.1658,26.4844,352.8803,24,1000,27,1000,0,0); // Team 3
  346.     AddPlayerClass(295,2319.1152,-68.3436,26.4844,166.7821,24,1000,27,1000,0,0); // Team 4
  347.     AddPlayerClass(268,2269.4578,-18.6867,26.4844,183.3165,24,1000,27,1000,0,0); // Team 5
  348.     AddPlayerClass(269,2260.9419,-71.4783,31.6016,256.3965,24,1000,27,1000,0,0); // Team 6
  349.     return 1;
  350. }
  351.  
  352. public OnGameModeExit()
  353. {
  354.     return 1;
  355. }
  356.  
  357. public OnPlayerRequestClass(playerid, classid)
  358. {
  359.     switch (classid) {
  360.  
  361.         case 0:
  362.             {
  363.                 GameTextForPlayer(playerid, "~n~~n~~n~~r~Team 1", 500, 3);
  364.                 {SetPlayerPos(playerid, 1176.287,-1994.802,69.00781);
  365.                  SetPlayerFacingAngle(playerid,730);
  366.                  SetPlayerCameraPos(playerid, 1174.287,-1991.802,69.00781);
  367.                  SetPlayerCameraLookAt(playerid, 1176.287,-1994.802,69.00781);}
  368.             }
  369.         case 1:
  370.             {
  371.                 GameTextForPlayer(playerid, "~n~~n~~n~~b~Team 2", 500, 3);
  372.                 {SetPlayerPos(playerid, 1176.287,-1994.802,69.00781);
  373.                  SetPlayerFacingAngle(playerid,730);
  374.                  SetPlayerCameraPos(playerid, 1174.287,-1991.802,69.00781);
  375.                  SetPlayerCameraLookAt(playerid, 1176.287,-1994.802,69.00781);}
  376.             }
  377.         case 2:
  378.             {
  379.                 GameTextForPlayer(playerid, "~n~~n~~n~~y~Team 3", 500, 3);
  380.                 {SetPlayerPos(playerid, 1176.287,-1994.802,69.00781);
  381.                  SetPlayerFacingAngle(playerid,730);
  382.                  SetPlayerCameraPos(playerid, 1174.287,-1991.802,69.00781);
  383.                  SetPlayerCameraLookAt(playerid, 1176.287,-1994.802,69.00781);}
  384.             }
  385.         case 3:
  386.              {
  387.                 GameTextForPlayer(playerid, "~n~~n~~n~~g~Team 4", 500, 3);
  388.                 {SetPlayerPos(playerid, 1176.287,-1994.802,69.00781);
  389.                  SetPlayerFacingAngle(playerid,730);
  390.                  SetPlayerCameraPos(playerid, 1174.287,-1991.802,69.00781);
  391.                  SetPlayerCameraLookAt(playerid, 1176.287,-1994.802,69.00781);}
  392.             }
  393.         case 4:
  394.              {
  395.                 GameTextForPlayer(playerid, "~n~~n~~n~~r~Team 5", 500, 3);
  396.                 {SetPlayerPos(playerid, 1176.287,-1994.802,69.00781);
  397.                  SetPlayerFacingAngle(playerid,730);
  398.                  SetPlayerCameraPos(playerid, 1174.287,-1991.802,69.00781);
  399.                  SetPlayerCameraLookAt(playerid, 1176.287,-1994.802,69.00781);}
  400.  
  401.             }
  402.         case 5:
  403.              {
  404.                 GameTextForPlayer(playerid, "~n~~n~~n~~r~Team 6", 500, 3);
  405.                 {SetPlayerPos(playerid, 1176.287,-1994.802,69.00781);
  406.                  SetPlayerFacingAngle(playerid,730);
  407.                  SetPlayerCameraPos(playerid, 1174.287,-1991.802,69.00781);
  408.                  SetPlayerCameraLookAt(playerid, 1176.287,-1994.802,69.00781);}
  409.                 }
  410.         }
  411.     return 1;
  412. }
  413.  
  414. public OnPlayerConnect(playerid)
  415. {
  416.     if(fexist(UserPath(playerid)))
  417.     {
  418.         INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
  419.         ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,""COL_WHITE"Login",""COL_WHITE"Type your password below to login.","Login","Quit");
  420.     }
  421.     else
  422.     {
  423.         ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT,""COL_WHITE"Registering...",""COL_WHITE"Type your password below to register a new account.","Register","Quit");
  424.     }
  425.     new string[64], pName[MAX_PLAYER_NAME];
  426.     GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
  427.     new ip[64];
  428.     GetPlayerIp(playerid, ip, sizeof(ip));
  429.     format(string,sizeof string,"%s has joined the server. ( %s )",pName, ip);
  430.     SendClientMessageToAll(green,string);
  431.     aDuty[playerid] = 0; //Set player off duty when connects
  432.     PlayAudioStreamForPlayer(playerid, "http://k003.kiwi6.com/hotlink/ew91ll2ma2/deadmau5_-_a_city_in_florida_original_mix_hd.mp3");
  433.     SetTimerEx("Map",300000,0,"i",playerid); // Start to count to the next map.
  434.     SetTimerEx("Radio",300000,0,"i",playerid); // Audio
  435.     if(PlayerInfo[playerid][pWarn] >= 3)
  436.     {
  437.     Kick(playerid);
  438.     }
  439.     else if(PlayerInfo[playerid][pVip] >= 1)
  440.     {
  441.     SendClientMessageToAll(0x58AB54FF, "Gold VIP has joind server!");
  442.     }
  443.     else if(PlayerInfo[playerid][pVip] >= 2)
  444.     {
  445.     SendClientMessageToAll(0x58AB54FF, "Silver VIP has joind server!");
  446.     }
  447.     else if(PlayerInfo[playerid][pVip] >= 3)
  448.     {
  449.     SendClientMessageToAll(0x58AB54FF, "Bronze VIP has joind server!");
  450.     }
  451.     else if(PlayerInfo[playerid][pAdmin] >= 1338)
  452.     {
  453.     SendClientMessageToAll(0x58AB54FF, "Server Owner has joind the server!");
  454.     }
  455.     return 1;
  456. }
  457.  
  458. public OnPlayerDisconnect(playerid, reason)
  459. {
  460.     new INI:File = INI_Open(UserPath(playerid));
  461.     INI_SetTag(File,"data");
  462.     INI_WriteInt(File,"Cash",GetPlayerMoney(playerid));
  463.     INI_WriteInt(File,"Admin",PlayerInfo[playerid][pAdmin]);
  464.     INI_WriteInt(File,"Kills",PlayerInfo[playerid][pKills]);
  465.     INI_WriteInt(File,"Deaths",PlayerInfo[playerid][pDeaths]);
  466.     INI_WriteInt(File,"Score",PlayerInfo[playerid][pScore]);
  467.     INI_WriteInt(File,"Rank",PlayerInfo[playerid][pRank]);
  468.     INI_WriteInt(File,"Banned",PlayerInfo[playerid][pBanned]);
  469.     INI_WriteInt(File,"Warns",PlayerInfo[playerid][pWarn]);
  470.     INI_WriteInt(File,"Muted",PlayerInfo[playerid][pMuted]);
  471.     INI_WriteInt(File,"MuteTime",PlayerInfo[playerid][pMuteTime]);
  472.     INI_WriteInt(File,"Vip",PlayerInfo[playerid][pVip]);
  473.     INI_WriteInt(File,"Map",PlayerInfo[playerid][pMap]);
  474.     INI_WriteInt(File,"Ks",PlayerInfo[playerid][pKS]);
  475.     INI_Close(File);
  476.     new string[64],
  477.     name[MAX_PLAYER_NAME];
  478.     GetPlayerName(playerid,name,MAX_PLAYER_NAME);
  479.     aDuty[playerid] = 0; //set player off duty when disconnects
  480.     PlayerInfo[playerid][pMap] = 0;
  481.     switch(reason)
  482.     {
  483.         case 0: format(string,sizeof string,"%s left the server. (Timed out)",name);
  484.         case 1: format(string,sizeof string,"%s left the server. (Leaving)",name);
  485.         case 2: format(string,sizeof string,"%s left the server. (Kicked/Banned)",name);
  486.     }
  487.     SendClientMessageToAll(0xFFFFFFAA,string);
  488.     return 1;
  489. }
  490. public OnPlayerSpawn(playerid)
  491. {
  492.     SetPlayerArmour(playerid, 100);
  493.    
  494.     SetPlayerHealth(playerid, 10000000000000.0);
  495.     SetPlayerArmour(playerid, 100.0);
  496.     GivePlayerWeapon(playerid, 30, 800);
  497.     GivePlayerWeapon(playerid, 28, 800);
  498.     GivePlayerWeapon(playerid, 16, 800);
  499.     GivePlayerWeapon(playerid, 4, 800);
  500.     GivePlayerWeapon(playerid, 33, 800);
  501.    
  502.     SendClientMessage(playerid, 0xFF0000AA, "[INFO]:You have 6 seconds of Anti-Spawnkill protection");
  503.     SetPlayerChatBubble(playerid, "[INFO]:Anti-Spawnkill protected player", 0xFF0000AA, 100.0, 10000);
  504.     SetTimerEx("AntiSpawnkill",6000,0,"i",playerid);
  505.   //  SetTimerEx("Map",10000,0,"i",playerid);
  506.     SetPlayerWeather(playerid, 0);
  507.     if(PlayerInfo[playerid][Frozen] == 1) //Get the info outta the enum and check if the player is still frozen
  508.     {
  509.     TogglePlayerControllable(playerid,0); //Won't let the player move
  510.     SendClientMessage(playerid,red,"WARNING: You are still frozen!"); //Send him a message
  511.     }
  512.     if(PlayerInfo[playerid][pMap] == 1)
  513.     {
  514.     SetPlayerPos(playerid, 2527.72,2729.96,10.8203);
  515.     }
  516.     if(PlayerInfo[playerid][pBanned] == 1)
  517.     {
  518.     SendClientMessage(playerid,red,"WARNING: This account is banned from this server. Wisit our forum if you think you have been banned for no reason.");
  519.     Kick(playerid);
  520.     }
  521.     if(PlayerInfo[playerid][pRank] == 1000)
  522.     {
  523.     SendClientMessage(playerid,red,"You are the max level.");
  524.     new message[64], pName[MAX_PLAYER_NAME];
  525.     GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
  526.     new ip[64];
  527.     GetPlayerIp(playerid, ip, sizeof(ip));
  528.     format(message,sizeof message,"%s have 1000 exp. That means %s is highest level.",pName, pName);
  529.     SendClientMessageToAll(green,message);
  530.     }
  531.    
  532.    
  533.     new string[ 128 ];
  534.     if(PlayerInfo[playerid][pRank] >= 1000)
  535.     {
  536.         TRank = "6"; /// The rank name
  537.         TextDrawSetString(Textdraw2, string);
  538.     }
  539.     else if(PlayerInfo[playerid][pRank] >= 700 && PlayerInfo[playerid][pRank] >= 1000)
  540.     {
  541.         TRank = "5"; /// The rank name
  542.         TextDrawSetString(Textdraw2, string);
  543.     }
  544.     else if(PlayerInfo[playerid][pRank] >= 500 && PlayerInfo[playerid][pRank] >= 700)
  545.     {
  546.         TRank = "4"; /// The rank name
  547.         TextDrawSetString(Textdraw2, string);
  548.     }
  549.     else if(PlayerInfo[playerid][pRank] >= 200 && PlayerInfo[playerid][pRank] >= 500)
  550.     {
  551.         TRank = "3"; /// The rank name
  552.         TextDrawSetString(Textdraw2, string);
  553.     }
  554.     else if(PlayerInfo[playerid][pRank] >= 100 && PlayerInfo[playerid][pRank] >= 200)
  555.     {
  556.         TRank = "2"; /// The rank name
  557.         TextDrawSetString(Textdraw2, string);
  558.     }
  559.     else if(PlayerInfo[playerid][pRank] >= 50 && PlayerInfo[playerid][pRank] >= 100)
  560.     {
  561.         TRank = "1"; /// The rank name
  562.         TextDrawSetString(Textdraw2, string);
  563.     }
  564.     else if(PlayerInfo[playerid][pRank] >= 0 && PlayerInfo[playerid][pRank] >= 50)
  565.     {
  566.         TRank = "0"; /// The rank name
  567.         TextDrawSetString(Textdraw2, string);
  568.     }
  569.     format( string, sizeof string, "~y~Rank:~w~ %s",TRank);
  570.     TextDrawSetString(Textdraw2, string);
  571.     TextDrawShowForPlayer( playerid, Textdraw2 );
  572.     return 1;
  573. }
  574.  
  575. public OnPlayerDeath(playerid, killerid, reason)
  576. {
  577.     SendClientMessage(playerid, 0x58AB54FF, "You have been killed! Check out our stunts :) ");
  578.     PlayerInfo[playerid][pDeaths]++;
  579. //  SetPlayerScore(playerid, GetPlayerScore( playerid ) -10 );
  580.     PlayerInfo[killerid][pScore]++;
  581.     GivePlayerMoney(killerid, 7000 );
  582.     SendClientMessage(killerid, 0x58AB54FF, "Good shot you've killed him!");
  583.     PlayerInfo[killerid][pKills]++;
  584.     PlayerInfo[killerid][pRank]++;
  585.     PlayerInfo[killerid][pScore]--;
  586.     SetTimerEx("Spec",10000,0,"i",playerid);
  587.     TogglePlayerSpectating(playerid, 1);
  588.     PlayerSpectatePlayer(playerid, killerid);
  589.     new string[128];
  590.     new rank = PlayerInfo[killerid][pRank];
  591.     new score = PlayerInfo[killerid][pScore];
  592.     format(string, sizeof(string), "You [XP] is now [%i/1000]. and you Level is [%d]", rank,score);
  593.     SendClientMessage(killerid, green, string);
  594. //  SetPlayerScore(killerid, GetPlayerScore( killerid ) +10 );
  595.     SetPlayerWantedLevel(killerid, GetPlayerWantedLevel( killerid ) +1 );
  596.     GivePlayerMoney(killerid, -7000 );
  597.     return 1;
  598. }
  599. public OnVehicleSpawn(vehicleid)
  600. {
  601.     return 1;
  602. }
  603.  
  604. public OnVehicleDeath(vehicleid, killerid)
  605. {
  606.     return 1;
  607. }
  608.  
  609. public OnPlayerText(playerid, text[])
  610. {
  611.     return 1;
  612. }
  613.  
  614. public OnPlayerCommandText(playerid, cmdtext[])
  615. {
  616.     if (strcmp("/stats", cmdtext, true, 10) == 0)
  617.     {
  618.             new virworld = GetPlayerVirtualWorld(playerid); // %i
  619.             new ip[64];
  620.             GetPlayerIp(playerid, ip, sizeof(ip));
  621.             new admin = PlayerInfo[playerid][pAdmin];
  622.             new money = GetPlayerMoney(playerid);
  623.             new skin = GetPlayerSkin(playerid);
  624.             new score = PlayerInfo[playerid][pScore];
  625.             new deaths = PlayerInfo[playerid][pDeaths];
  626.             new kills = PlayerInfo[playerid][pKills];
  627.             new car = GetPlayerVehicleID(playerid);
  628.             new wantedlevel = PlayerInfo[playerid][pRank];
  629.             new Float:armour;
  630.             GetPlayerArmour(playerid, armour);
  631.             new name[MAX_PLAYER_NAME+1];
  632.             GetPlayerName(playerid, name, sizeof(name));
  633.             new IP[16];
  634.             GetPlayerIp(playerid, IP, sizeof(IP));
  635.             new weapon = GetPlayerWeapon(playerid);
  636.             new string[736];
  637.             new coordsstring1[256];
  638.             new coordsstring2[160];
  639.             new coordsstring3[160];
  640.         //  new coordsstring4[160];
  641.             format(coordsstring1, sizeof(coordsstring1), "\n{44A1D0}You Name: {FFFFFF}[%s] \n{44A1D0}Money: {FFFFFF}[$%d] \n\n{44A1D0}AdminLevel: {FFFFFF}[%d] \n{44A1D0}Skin: {FFFFFF}[%d] ", name,money,admin,skin);
  642.             format(coordsstring2, sizeof(coordsstring2), "{44A1D0}Virworld: {FFFFFF}[%d] \n\n{44A1D0}Kills: {FFFFFF}[%d] \n{44A1D0}Deaths: {FFFFFF}[%d] \n\n{44A1D0}XP: {FFFFFF}[%i] ", virworld,kills,deaths,wantedlevel);
  643.             format(coordsstring3, sizeof(coordsstring3), "\n{44A1D0}Car ID: {FFFFFF}[%d] \n{44A1D0}Armour: {FFFFFF}[%0.f] {44A1D0}Score/LvL: {FFFFFF}[%d] \n{44A1D0}Weapon: {FFFFFF}[%d]", car,armour,score,weapon);
  644.         //  format(stats, sizeof stats, "%s", string1,string2);
  645.             format(string, 736," %s%s%s%s",coordsstring1,coordsstring2,coordsstring3);
  646.             ShowPlayerDialog(playerid, 13, DIALOG_STYLE_MSGBOX,"{00C0FF}Hello YouTube! ",string,"Close","");
  647.           //  SetPlayerPos(playerid, 2227.72,-88.380,26.3359);
  648.             return 1;
  649.     }
  650.     return 0;
  651. }
  652.  
  653. CMD:help(playerid, params[])
  654. {
  655.         SendClientMessage(playerid, 0x58AB54FF, "Commands: /kill - /help - /admins - /myrank");
  656.         SendClientMessage(playerid, 0x58AB54FF, "Commands: /nuke - /xp - /accinfo - /stats ");
  657.         SendClientMessage(playerid, 0x58AB54FF, "Commands: /report - /vips - /resstats - /pm");
  658.         SendClientMessage(playerid, 0x58AB54FF, "[Information] - /information. For more Help/Info");
  659.         return true;
  660. }
  661.  
  662. COMMAND:resetmoney(playerid,params[])
  663. {
  664.     if( PlayerInfo[ playerid ][ pAdmin ] < 1 ) return SendClientMessage( playerid, COLOR_RED, "ERROR: This command is only for admins!" );
  665.     {
  666.         if(!IsPlayerConnected(playerid))
  667.         {
  668.             new Target;
  669.             if(!sscanf(params, "u", Target))
  670.             {
  671.                 if(Target == INVALID_PLAYER_ID) return SendClientMessage(playerid,red,"ERROR: Wrong player ID");
  672.                 ResetPlayerMoney(Target);
  673.                 new tname[MAX_PLAYER_NAME];
  674.                 GetPlayerName(Target,tname,sizeof(tname));
  675.                 new pname[MAX_PLAYER_NAME];
  676.                 GetPlayerName(playerid,pname,sizeof(pname));
  677.                 new tstring[256];
  678.                 new pstring[256];
  679.                 format(tstring,sizeof(tstring),"Your money has been reseted by %s",pname);
  680.                 format(pstring,sizeof(pstring),"You have reseted %s´s(%d) money",tname,Target);
  681.                 SendClientMessage(Target,BLUE,tstring);
  682.                 SendClientMessage(playerid,BLUE,pstring);
  683.             }
  684.             else SendClientMessage(playerid,YELLOW,"USAGE: /resetmoney <playerid>");
  685.         }
  686. //      else SendClientMessage(playerid,red,"ERROR: You must be logged in to use this command!");
  687.     }
  688. //  else SendClientMessage(playerid,red,"ERROR: You must be an Admin level 2 or higher to perform this command!");
  689.     return 1;
  690. }
  691.  
  692. CMD:information(playerid, params[])
  693. {
  694.         SendClientMessage(playerid, 0x58AB54FF, "[Information] - /xp (Showing you how much xp you have");
  695.         SendClientMessage(playerid, 0x58AB54FF, "[Information] - /accinfo (Showing you how many warns u have");
  696.         SendClientMessage(playerid, 0x58AB54FF, "[Information] - /myrank (Showing you how witch rank you are");
  697.         SendClientMessage(playerid, 0x58AB54FF, "[Information] - /vips (Showing you how VIPs online");
  698.         SendClientMessage(playerid, 0x58AB54FF, "[Information] - /resstats (Setting you kill/deaths stats to 0)");
  699.         SendClientMessage(playerid, 0x58AB54FF, "[Information] - /nuke (Nuke.. Using a killstreak on somebody");
  700.         SendClientMessage(playerid, 0x58AB54FF, "[Information] - /pm (Send a private message to player(s)");
  701.         SendClientMessage(playerid, 0x58AB54FF, "[Information] - /unlock (Unlocks killstreak. So you can use /nuke..");
  702.         return true;
  703. }
  704.  
  705. CMD:pm(playerid, params[])
  706. {
  707.     new str[256], str2[256], id, Name1[MAX_PLAYER_NAME], Name2[MAX_PLAYER_NAME];
  708.     if(sscanf(params, "us", id, str2))
  709.     {
  710.         SendClientMessage(playerid, 0xFF0000FF, "Usage: /pm <id> <message>");
  711.         return 1;
  712.     }
  713.     if(!IsPlayerConnected(id)) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: Player not connected");
  714.     if(playerid == id) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: You cannot pm yourself!");
  715.     {
  716.         GetPlayerName(playerid, Name1, sizeof(Name1));
  717.         GetPlayerName(id, Name2, sizeof(Name2));
  718.         format(str, sizeof(str), "PM To %s(ID %d): %s", Name2, id, str2);
  719.         SendClientMessage(playerid, 0xFF0000FF, str);
  720.         format(str, sizeof(str), "PM From %s(ID %d): %s", Name1, playerid, str2);
  721.         SendClientMessage(id, 0xFF0000FF, str);
  722.     }
  723.     return 1;
  724. }
  725.  
  726.  
  727.  
  728.  
  729. CMD:vips(playerid, params[])
  730. {
  731.    new count = 0, string[256];
  732.    SendClientMessage(playerid, BLUE,"Current online helpers:");
  733.    for(new i = 0; i < MAX_PLAYERS; i ++)
  734.    {
  735.       if(IsPlayerConnected(i))
  736.       {
  737.           if(PlayerInfo[i][pVip] == 1)
  738.           {
  739.              format(string, sizeof(string),"Gold VIP:[%d] %s", i, PlayerName(i));
  740.              SendClientMessage(playerid, BLUE, string);
  741.              count++;
  742.           }
  743.           if(PlayerInfo[i][pVip] == 2)
  744.           {
  745.              format(string, sizeof(string),"Silver VIP:[%d] %s", i, PlayerName(i));
  746.              SendClientMessage(playerid, BLUE, string);
  747.              count++;
  748.           }
  749.           if(PlayerInfo[i][pVip] == 3)
  750.           {
  751.              format(string, sizeof(string),"Bronze VIP:[%d] %s", i, PlayerName(i));
  752.              SendClientMessage(playerid, BLUE, string);
  753.              count++;
  754.           }
  755.       }
  756.    }
  757.    if(count == 0)
  758.    {
  759.           SendClientMessage(playerid, BLUE,"No vips are online right now!");
  760.    }
  761.    return 1;
  762. }
  763.  
  764.  
  765.  
  766. CMD:kill(playerid, params[])
  767. {
  768.         SetPlayerHealth(playerid, 0);
  769.         PlayerInfo[playerid][pDeaths]++;
  770.         return true;
  771. }
  772. CMD:stats(playerid, params[])
  773. {
  774.         new virworld = GetPlayerVirtualWorld(playerid); // %i
  775.         new ip[64];
  776.         GetPlayerIp(playerid, ip, sizeof(ip));
  777.         new admin = PlayerInfo[playerid][pAdmin];
  778.         new money = GetPlayerMoney(playerid);
  779.         new skin = GetPlayerSkin(playerid);
  780.         new score = PlayerInfo[playerid][pScore];
  781.         new deaths = PlayerInfo[playerid][pDeaths];
  782.         new kills = PlayerInfo[playerid][pKills];
  783.         new car = GetPlayerVehicleID(playerid);
  784.         new wantedlevel = PlayerInfo[playerid][pRank];
  785.         new Float:armour;
  786.         GetPlayerArmour(playerid, armour);
  787.         new name[MAX_PLAYER_NAME+1];
  788.         GetPlayerName(playerid, name, sizeof(name));
  789.         new IP[16];
  790.         GetPlayerIp(playerid, IP, sizeof(IP));
  791.         new weapon = GetPlayerWeapon(playerid);
  792.         new string[736];
  793.         new coordsstring1[256];
  794.         new coordsstring2[160];
  795.         new coordsstring3[160];
  796.     //  new coordsstring4[160];
  797.         format(coordsstring1, sizeof(coordsstring1), "\n{44A1D0}You Name: {FFFFFF}[%s] \n{44A1D0}Money: {FFFFFF}[$%d] \n\n{44A1D0}AdminLevel: {FFFFFF}[%d] \n{44A1D0}Skin: {FFFFFF}[%d] ", name,money,admin,skin);
  798.         format(coordsstring2, sizeof(coordsstring2), "{44A1D0}Virworld: {FFFFFF}[%d] \n\n{44A1D0}Kills: {FFFFFF}[%d] \n{44A1D0}Deaths: {FFFFFF}[%d] \n\n{44A1D0}XP: {FFFFFF}[%i/1000] ", virworld,kills,deaths,wantedlevel);
  799.         format(coordsstring3, sizeof(coordsstring3), "\n{44A1D0}Car ID: {FFFFFF}[%d] \n{44A1D0}Armour: {FFFFFF}[%0.f] {44A1D0}Level: {FFFFFF}[%d] \n{44A1D0}Weapon: {FFFFFF}[%d]", car,armour,score,weapon);
  800.     //  format(stats, sizeof stats, "%s", string1,string2);
  801.         format(string, 736," %s%s%s%s",coordsstring1,coordsstring2,coordsstring3);
  802.         ShowPlayerDialog(playerid, 13, DIALOG_STYLE_MSGBOX,"{00C0FF}Hello YouTube! ",string,"Close","");
  803.         return true;
  804.            
  805.  
  806.  
  807. }
  808.  
  809. CMD:kick(playerid, params[])
  810.     {
  811.         if(PlayerInfo[playerid][pAdmin] >= 3) {
  812.             new PID; //define the playerid we wanna kick
  813.             new reason[64]; //the reason, put into a string
  814.             new str[128]; //a new message string
  815.             new Playername[MAX_PLAYER_NAME], Adminname[MAX_PLAYER_NAME]; //defines the function with the playername we wanna get
  816.             GetPlayerName(playerid, Adminname, sizeof(Adminname)); //defines the function with the adminname we wanna get
  817.             GetPlayerName(PID, Playername, sizeof(Playername));
  818.             if(sscanf(params, "us[64]", PID,reason)) return SendClientMessage(playerid, COLOR_GREY, "USAGE: /kick [playerid] [reason]"); //tell sscanf if the parameters/the syntax is written wrong to return a message (PID and the reason used here)
  819.  
  820.             if(!IsPlayerConnected(PID)) // if the ID is wrong or not connected, return a message! (PID used here)
  821.                 return SendClientMessage(playerid, COLOR_GREY, "Player is not connected!");
  822.  
  823.             format(str, sizeof(str), "'%s' has been kicked by administrator '%s'. Reason: %s ", Playername, Adminname, reason); //format the string we've defined to send the message, playername and adminname are used to receive the information about the names
  824.             SendClientMessageToAll(COLOR_RED, str); //send that message to all
  825.             Kick(PID); //kick the playerid we've defined
  826.  
  827.         }
  828.         else //if he has not got the permissions
  829.         {
  830.             SendClientMessage(playerid, COLOR_GREY, "You have to be level 3 to use that command!"); //return this message
  831.         }
  832.         return 1;
  833.     }
  834.    
  835. CMD:ban(playerid, params[])
  836.     {
  837.         if(PlayerInfo[playerid][pAdmin] >= 3) {
  838.             new PID; //define the playerid we wanna ban
  839.             new reason[64]; //the reason, put into a string
  840.             new str[128]; //a new message string
  841.             new Playername[MAX_PLAYER_NAME], Adminname[MAX_PLAYER_NAME]; //defines the function with the playername we wanna get
  842.             GetPlayerName(playerid, Adminname, sizeof(Adminname)); //defines the function with the adminname we wanna get
  843.             GetPlayerName(PID, Playername, sizeof(Playername));
  844.             if(sscanf(params, "us[64]", PID,reason)) return SendClientMessage(playerid, COLOR_GREY, "USAGE: /ban [playerid] [reason]"); //tell sscanf if the parameters/the syntax is written wrong to return a message (PID and the reason used here)
  845.  
  846.             if(!IsPlayerConnected(PID)) // if the ID is wrong or not connected, return a message! (PID used here)
  847.                 return SendClientMessage(playerid, COLOR_GREY, "Player is not connected!");
  848.  
  849.             format(str, sizeof(str), "'%s' has been banned by administrator '%s'. Reason: %s ", Playername, Adminname, reason); //format the string we've defined to send the message, playername and adminname are used to receive the information about the names
  850.             SendClientMessageToAll(COLOR_RED, str); //send that message to all
  851.             PlayerInfo[PID][pBanned] = 1;
  852.             Ban(PID); //Ban the playerid we've defined
  853.  
  854.         }
  855.         else //if he has not got the permissions
  856.         {
  857.             SendClientMessage(playerid, COLOR_GREY, "You have to be level 5 to use that command!"); //return this message
  858.         }
  859.         return 1;
  860.     }
  861.  
  862. COMMAND:freeze(playerid,params[])
  863. {
  864.     if(PlayerInfo[playerid][pAdmin] >= 5)
  865.     {
  866.             new Target; //defines the playerid we wanna freeze
  867.             if(sscanf(params, "u", Target)) SendClientMessage(playerid, COLOR_LIGHTBLUE, "USAGE: /freeze [playerid]"); //tell sscanf again if the parameters/syntax is wrong to return a special message
  868.             if(!IsPlayerConnected(Target)) //if the ID doesn't exist, return an error-message
  869.                 return SendClientMessage(playerid, COLOR_GREY, "ERROR:Player is not connected!");
  870.             if(!sscanf(params, "u", Target))
  871.             {
  872.                 if(Target == playerid) return SendClientMessage(playerid, COLOR_RED, "ERROR: Cant perform this command on yourself!" ); //I wouldn't add this line, because it won't let you perform this CMD on yourself
  873.                 if(PlayerInfo[Target][pAdmin] > PlayerInfo[playerid][pAdmin]) return SendClientMessage(playerid,red,"ERROR: You cant perform this on Admins that are higher than your level!"); // if the player you're performing this command on has a higher level as you, return a message, you ain't able to freeze him
  874.                 new tname[MAX_PLAYER_NAME]; //define the new target-name of the playerid
  875.                 GetPlayerName(Target,tname,sizeof(tname)); //get the playername with this function
  876.                 new pname[MAX_PLAYER_NAME]; //define the adminname
  877.                 GetPlayerName(playerid,pname,sizeof(pname)); //get the adminname with this function
  878.                 new tstring[128]; //define the string for the player (victim)
  879.                 new pstring[128];// define the string for the admin which is performing
  880.                 new astring[128];//define the string for all the players which are online
  881.                 format(tstring,sizeof(tstring),"You have been frozen by administrator %s! You cant move!",pname); //this is formatting the player-string, while it's also getting the adminname
  882.                 format(pstring,sizeof(pstring),"You have frozen player %s(%d)!",tname,Target); //this is formatting the adminname-string, while it's also getting the playername and his ID(target)
  883.                 format(astring,sizeof(astring),"Administrator %s has frozen %s!",pname,tname); //this is formatting the all-string, while it's sending this message to everybody and is getting admin- and playername
  884.                 SendClientMessage(Target,COLOR_GOLD,tstring);//sends the message to the victim
  885.                 SendClientMessage(playerid,TEAM_GROVE_COLOR,pstring);//sends the message to the admin
  886.                 SendClientMessageToAll(COLOR_LIGHTBLUE,astring);//sends the message to everybody
  887.                 TogglePlayerControllable(Target,0); //with that function, the player won't be able to mov, while we're using the variable "Target" as the playerid
  888.                 PlayerInfo[Target][Frozen] = 1;//IMPORTANT:we're getting the variable "[frozen]" out of the enum, and set it's value to "1', the compiler knows now that the player is frozen
  889.             }
  890.  
  891.     }
  892.  
  893. // if he doesn't have permissions, return that message!
  894.     else return SendClientMessage(playerid,COLOR_RED,"ERROR: You must be level 5 to use this command!");
  895.     return 1;
  896. }
  897.  
  898. COMMAND:unfreeze(playerid,params[])
  899. {
  900.     if(PlayerInfo[playerid][pAdmin] >= 5)
  901.     {
  902.             new Target; //defines the playerid we wanna unfreeze
  903.             if(sscanf(params, "u", Target)) SendClientMessage(playerid, COLOR_LIGHTBLUE, "USAGE: /unfreeze [playerid]"); //tell sscanf again if the parameters/syntax is wrong to return a special message
  904.             if(!IsPlayerConnected(Target)) //if the ID doesn't exist, return an error-message
  905.                 return SendClientMessage(playerid, COLOR_GREY, "ERROR:Player is not connected!");
  906.             if(!sscanf(params, "u", Target))
  907.             {
  908.                 if(Target == playerid) return SendClientMessage(playerid, COLOR_RED, "ERROR: Cant perform this command on yourself!" ); //I wouldn't add this line, because it won't let you perform this CMD on yourself
  909.                 if(PlayerInfo[Target][pAdmin] > PlayerInfo[playerid][pAdmin]) return SendClientMessage(playerid,red,"ERROR: You cant perform this on Admins that are higher than your level!"); // if the player you're performing this command on has a higher level as you, return a message, you ain't able to unfreeze him
  910.                 new tname[MAX_PLAYER_NAME]; //define the new target-name of the playerid
  911.                 GetPlayerName(Target,tname,sizeof(tname)); //get the playername with this function
  912.                 new pname[MAX_PLAYER_NAME]; //define the adminname
  913.                 GetPlayerName(playerid,pname,sizeof(pname)); //get the adminname with this function
  914.                 new tstring[128]; //define the string for the player (victim)
  915.                 new pstring[128];// define the string for the admin which is performing
  916.                 new astring[128];//define the string for all the players which are online
  917.                 format(tstring,sizeof(tstring),"You have been unfrozen by administrator %s! You cant move!",pname); //this is formatting the player-string, while it's also getting the adminname
  918.                 format(pstring,sizeof(pstring),"You have unfrozen player %s(%d)!",tname,Target); //this is formatting the adminname-string, while it's also getting the playername and his ID(target)
  919.                 format(astring,sizeof(astring),"Administrator %s has unfrozen %s!",pname,tname); //this is formatting the all-string, while it's sending this message to everybody and is getting admin- and playername
  920.                 SendClientMessage(Target,COLOR_GOLD,tstring);//sends the message to the victim
  921.                 SendClientMessage(playerid,TEAM_GROVE_COLOR,pstring);//sends the message to the admin
  922.                 SendClientMessageToAll(COLOR_LIGHTBLUE,astring);//sends the message to everybody
  923.                 TogglePlayerControllable(Target,1); //with that function, the player will be able to move again, while we're using the variable "Target" as playerid again
  924.                 PlayerInfo[Target][Frozen] = 0;//IMPORTANT:we're getting the variable "[frozen]" out of the enum, and set it's value to "0", the compiler knows now that the player is unfrozen
  925.             }
  926.  
  927.     }
  928.  
  929. // if he doesn't have permissions, return that message!
  930.     else return SendClientMessage(playerid,COLOR_RED,"ERROR: You must be level 5 to use this command!");
  931.     return 1;
  932. }
  933.  
  934. CMD:ah(playerid,params[])
  935. {
  936.     if( PlayerInfo[ playerid ][ pAdmin ] < 1 ) return SendClientMessage( playerid, COLOR_RED, "ERROR: This command is only for admins!" );
  937.     SendClientMessage(playerid,COLOR_RED,"-- Commands: /kick - /ban - /goto - /gethere - /spec - /endspec --");
  938.     SendClientMessage(playerid,COLOR_RED,"-- Commands: /warn - /unwarn - /ann - /cc - /aduty - /sethp --");
  939.     SendClientMessage(playerid,COLOR_RED,"-- Commands: /givemoney - /setscore - /setarmour - /slap --");
  940.     SendClientMessage(playerid,COLOR_RED,"-- Commands: /armourall -/healall - /freeze - /unfreeze --");
  941.     SendClientMessage(playerid,COLOR_RED,"-- Commands: /giveweapon - /giveallcash - /giveallscore --");
  942.     SendClientMessage(playerid,COLOR_RED,"-- Commands: /giveallweapon - /giveall - /setcash - /setxp --");
  943.     SendClientMessage(playerid,COLOR_RED,"-- Commands: /setvip - /spawn - /explode - /sal - /setskin --");
  944.     SendClientMessage(playerid,COLOR_RED,"-- Commands: /kickall - /unlock - /makeadmin - /unban - /setks --");
  945.     return 1;
  946. }
  947.  
  948. CMD:astop(playerid,params[])
  949. {
  950.     StopAudioStreamForPlayer(playerid);
  951.     return 1;
  952. }
  953.  
  954. CMD:unlock(playerid,params[])
  955. {
  956.     if( PlayerInfo[ playerid ][ pRank ] < 500 ) return SendClientMessage( playerid, COLOR_RED, "ERROR: You need 500 XP! Type : /xp to see how to earn XP" );
  957. //    if( PlayerInfo[ playerid ][ pKS ] < 1 ) return SendClientMessage( playerid, COLOR_RED, "ERROR: You killstreaks is alerdy unlocked. /information" );
  958.     SendClientMessage(playerid,COLOR_RED,"--Information--");
  959.     SendClientMessage(playerid,COLOR_RED,"--You can now use command /nuke--");
  960.     ShowPlayerDialog(playerid, 8, DIALOG_STYLE_MSGBOX, "Killstreaks Unloced", "{DD0000}Killstreaks is now unlocket. You can now use /nuke.\n{006B00}You can use /nuke on players. (ID) Not on all players.\n\n\n{0000B6}Success Have Fun!", "Close", "");
  961.     new string[64], pName[MAX_PLAYER_NAME];
  962.     GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
  963.     format(string,sizeof string,"%s can now use killstreaks.",pName);
  964.     SendClientMessageToAll(COLOR_RED, string);
  965.     PlayerInfo[playerid][pKS] = 1;
  966.     if(PlayerInfo[playerid][pKS] < 1)
  967.     {
  968.     SendClientMessage(playerid, RED, "Alerdy unloced.");
  969.     }
  970.     return 1;
  971. }
  972.  
  973. /*CMD:santahat(playerid)
  974. {
  975.     SetPlayerAttachedObject(playerid, 3, 19065, 2, 0.120000, 0.040000, -0.003500, 0, 100, 100, 1.4, 1.4, 1.4);
  976.     SendClientMessage(playerid, -1, "Merry X-mas");
  977.     return 1;
  978. }
  979. */
  980.  
  981. CMD:report(playerid, params[])
  982. {
  983.    new player1, str[150], reason[66];
  984.    if(sscanf(params,"ds[66]", player1, reason)) return SendClientMessage(playerid, RED,"[USAGE]: /report [playerid] [reason]");
  985.    if(IsPlayerConnected(player1))
  986.    {
  987.       format(str, sizeof(str),"@New Report| Reporter: %s | Victim: %s | Reason: %s", PlayerName(playerid), PlayerName(player1), reason);
  988.       MessageToAdmins(GREEN, str);
  989.       SendClientMessage(playerid, YELLOW,"Your report has been sent to online administrators!");
  990.    }
  991.    else return SendClientMessage(playerid, RED,"[Server]: Player is not connected to this server!");
  992.    return 1;
  993. }
  994.  
  995.  
  996. CMD:spawn(playerid, params[])
  997. {
  998.    new player1;
  999.    if( PlayerInfo[ playerid ][ pAdmin ] < 1 ) return SendClientMessage( playerid, COLOR_RED, "ERROR: This command is only for admins!" );
  1000.    {
  1001.      if(IsPlayerConnected(player1))
  1002.      {
  1003.          new str[100];
  1004.          if(sscanf(params,"d",player1)) return SendClientMessage(playerid, RED,"[USAGE]: /spawn [playerid] ");
  1005.          SpawnPlayer(player1);
  1006.          format(str, sizeof(str),"Administrator %s has spawned you!", PlayerName(player1));
  1007.          SendClientMessage(player1, BLUE, str);
  1008.       //   TargetCMDMessage(playerid, player1, "SPAWN");
  1009.      }
  1010.      else return SendClientMessage(playerid, RED,"[Server]: Player is not connected!");
  1011.    }
  1012.  //  else return SendClientMessage(playerid, RED,"[Server]: You cannot use this command!");
  1013.    return 1;
  1014. }
  1015. CMD:explode(playerid, params[])
  1016. {
  1017.    if( PlayerInfo[ playerid ][ pAdmin ] < 1 ) return SendClientMessage( playerid, COLOR_RED, "ERROR: This command is only for admins!" );
  1018.    {
  1019.       new player1, Float:x, Float:y, Float:z, str[70];
  1020.       if(sscanf(params,"d", player1)) return SendClientMessage(playerid, RED,"[USAGE]: /explode [playerid] ");
  1021.       if(IsPlayerConnected(player1))
  1022.       {
  1023.          GetPlayerPos(player1, x, y, z);
  1024.          CreateExplosion(x, y, z, 7, 10.0);
  1025.          format(str, sizeof(str),"You have exploded %s!", PlayerName(player1));
  1026.          SendClientMessage(playerid, BLUE, str);
  1027.     //   TargetCMDMessage(playerid, player1,"EXPLODE");
  1028.       }
  1029.       else return SendClientMessage(playerid, RED,"[Server]: Player is not connected!");
  1030.    }
  1031.  //  else return SendClientMessage(playerid, RED,"[Server]: You need to be level 2 admin to use this command!");
  1032.    return 1;
  1033. }
  1034.  
  1035.  
  1036.  
  1037. CMD:setxp(playerid, params[])
  1038. {
  1039.   new player1, amount;
  1040.   if( PlayerInfo[ playerid ][ pAdmin ] < 1 ) return SendClientMessage( playerid, COLOR_RED, "ERROR: This command is only for admins!" );
  1041.   {
  1042.     if(sscanf(params,"dd", player1, amount)) return SendClientMessage(playerid, RED,"USAGE: /setxp [playerid][amount]");
  1043.     if(!IsPlayerConnected(player1)) return SendClientMessage(playerid, RED,"[Server]: Player not connected!");
  1044.     PlayerInfo[playerid][pRank] = amount;
  1045. //  TargetCMDMessage(playerid, player1,"SETKILLS");
  1046.     new str[100], str1[100];
  1047.     format(str, sizeof(str),"Administrator %s has setted your xp to %d", PlayerName(playerid),amount);
  1048.     format(str1, sizeof(str1),"You have setted %s's xp(s) to %d", PlayerName(player1), amount);
  1049.     SendClientMessage(player1, BLUE, str);
  1050.     SendClientMessage(playerid, BLUE, str1);
  1051.   }
  1052. //  else return SendClientMessage(playerid, RED,"[Server]: You need to be admin level 4 to use this command!");
  1053.   return 1;
  1054. }
  1055.  
  1056. CMD:setks(playerid, params[])
  1057. {
  1058.   new player1, amount;
  1059.   if( PlayerInfo[ playerid ][ pAdmin ] < 1 ) return SendClientMessage( playerid, COLOR_RED, "ERROR: This command is only for admins!" );
  1060.   {
  1061.     if(sscanf(params,"dd", player1, amount)) return SendClientMessage(playerid, RED,"USAGE: /setks [playerid][amount]");
  1062.     if(!IsPlayerConnected(player1)) return SendClientMessage(playerid, RED,"[Server]: Player not connected!");
  1063.     PlayerInfo[playerid][pKS] = amount;
  1064. //  TargetCMDMessage(playerid, player1,"SETKILLS");
  1065.     new str[100], str1[100];
  1066.     format(str, sizeof(str),"Administrator %s has setted your killstreak (unlock) to %d", PlayerName(playerid),amount);
  1067.     format(str1, sizeof(str1),"You have setted %s's killstreak (unlock) to %d", PlayerName(player1), amount);
  1068.     SendClientMessage(player1, BLUE, str);
  1069.     SendClientMessage(playerid, BLUE, str1);
  1070.   }
  1071. //  else return SendClientMessage(playerid, RED,"[Server]: You need to be admin level 4 to use this command!");
  1072.   return 1;
  1073. }
  1074.  
  1075.  
  1076. CMD:sal(playerid, params[])
  1077. {
  1078.   new player1, amount;
  1079.   if( PlayerInfo[ playerid ][ pAdmin ] < 1338 ) return SendClientMessage( playerid, COLOR_RED, "ERROR: This command is only for admins!" );
  1080.   {
  1081.     if(sscanf(params,"dd", player1, amount)) return SendClientMessage(playerid, RED,"USAGE: /sal [playerid][admin level]");
  1082.     if(!IsPlayerConnected(player1)) return SendClientMessage(playerid, RED,"[Server]: Player not connected!");
  1083.     PlayerInfo[playerid][pAdmin] = amount;
  1084. //  TargetCMDMessage(playerid, player1,"SETKILLS");
  1085.     new str[100], str1[100];
  1086.     format(str, sizeof(str),"Administrator %s has setted your admin level to %d", PlayerName(playerid),amount);
  1087.     format(str1, sizeof(str1),"You have setted %s's admin level to %d", PlayerName(player1), amount);
  1088.     SendClientMessage(player1, BLUE, str);
  1089.     SendClientMessage(playerid, BLUE, str1);
  1090.   }
  1091. //  else return SendClientMessage(playerid, RED,"[Server]: You need to be admin level 4 to use this command!");
  1092.   return 1;
  1093. }
  1094.  
  1095.  
  1096.  
  1097. CMD:setvip(playerid, params[])
  1098. {
  1099.   new player1, amount;
  1100.   if( PlayerInfo[ playerid ][ pAdmin ] < 1 ) return SendClientMessage( playerid, COLOR_RED, "ERROR: This command is only for admins!" );
  1101.   {
  1102.     if(sscanf(params,"dd", player1, amount)) return SendClientMessage(playerid, RED,"USAGE: /setvip [playerid][amount]");
  1103.     if(!IsPlayerConnected(player1)) return SendClientMessage(playerid, RED,"[Server ERROR]: Player not connected!");
  1104.     PlayerInfo[playerid][pVip] = amount;
  1105. //  TargetCMDMessage(playerid, player1,"SETKILLS");
  1106.     new str[100], str1[100];
  1107.     format(str, sizeof(str),"Administrator %s has setted your VIP Level to %d", PlayerName(playerid),amount);
  1108.     format(str1, sizeof(str1),"You have setted %s's VIP level to %d", PlayerName(player1), amount);
  1109.     SendClientMessage(player1, BLUE, str);
  1110.     SendClientMessage(playerid, BLUE, str1);
  1111.   }
  1112. //  else return SendClientMessage(playerid, RED,"[Server]: You need to be admin level 4 to use this command!");
  1113.   return 1;
  1114. }
  1115.  
  1116.  
  1117.  
  1118. CMD:setcash(playerid, params[])
  1119. {
  1120.   new player1, amount;
  1121.   if( PlayerInfo[ playerid ][ pAdmin ] < 1 ) return SendClientMessage( playerid, COLOR_RED, "ERROR: This command is only for admins!" );
  1122.   {
  1123.     if(sscanf(params,"dd", player1, amount)) return SendClientMessage(playerid, RED,"USAGE: /setcash [playerid][amount]");
  1124.     if(!IsPlayerConnected(player1)) return SendClientMessage(playerid, RED,"[Server]: Player not connected!");
  1125.     GivePlayerMoney(player1, amount);
  1126. //  TargetCMDMessage(playerid, player1,"SETCASH");
  1127.     new str[100], str1[100];
  1128.     format(str, sizeof(str),"Administrator %s has setted your cash to $%d", PlayerName(playerid),amount);
  1129.     format(str1, sizeof(str1),"You have setted %s's cash to $%d", PlayerName(player1), amount);
  1130.     SendClientMessage(player1, BLUE, str);
  1131.     SendClientMessage(playerid, BLUE, str1);
  1132.   }
  1133. //  else return SendClientMessage(playerid, RED,"[Server]: You need to be admin level 4 to use this command!");
  1134.   return 1;
  1135. }
  1136.  
  1137. CMD:giveallcash(playerid, params[])
  1138. {
  1139.   for(new i = 0; i < MAX_PLAYERS; i ++)
  1140.   {
  1141.   if( PlayerInfo[ playerid ][ pAdmin ] < 1 ) return SendClientMessage( playerid, COLOR_RED, "ERROR: This command is only for admins!" );
  1142.   {
  1143.      new ammount;
  1144.      if(sscanf(params,"d", ammount)) return SendClientMessage(playerid, RED,"[USAGE]: /giveallcash [ammount]");
  1145.      if(IsPlayerConnected(i))
  1146.      {
  1147.         GivePlayerMoney(i, ammount);
  1148.         new str[150];
  1149.         format(str, sizeof(str),"Administrator %s has given everyone $%d money", PlayerName(playerid), ammount);
  1150.         SendClientMessage(i, BLUE, str);
  1151.      }
  1152.   }
  1153.  // else return SendClientMessage(playerid, RED,"[Server]: You are not high enough level to use this command!");
  1154.   }
  1155.   return 1;
  1156. }
  1157. CMD:giveallscore(playerid, params[])
  1158. {
  1159.   for(new i = 0; i < MAX_PLAYERS; i ++)
  1160.   {
  1161.   if( PlayerInfo[ playerid ][ pAdmin ] < 1 ) return SendClientMessage( playerid, COLOR_RED, "ERROR: This command is only for admins!" );
  1162.   {
  1163.      new ammount;
  1164.      if(sscanf(params,"d", ammount)) return SendClientMessage(playerid, RED,"[USAGE]: /giveallscore [ammount]");
  1165.      if(IsPlayerConnected(i))
  1166.      {
  1167.         SetPlayerScore(i, GetPlayerScore(i)+ammount);
  1168.         new str[150];
  1169.         format(str, sizeof(str),"Administrator %s has given everyone %d score(s)", PlayerName(playerid), ammount);
  1170.         SendClientMessage(i, BLUE, str);
  1171.      }
  1172.   }
  1173. //  else return SendClientMessage(playerid, RED,"[Server]: You are not high enough level to use this command!");
  1174.   }
  1175.   return 1;
  1176. }
  1177. CMD:giveallweapon(playerid, params[])
  1178. {
  1179.   for(new i = 0; i < MAX_PLAYERS; i ++)
  1180.   {
  1181.   if( PlayerInfo[ playerid ][ pAdmin ] < 1 ) return SendClientMessage( playerid, COLOR_RED, "ERROR: This command is only for admins!" );
  1182.   {
  1183.      new weapid, ammo;
  1184.      if(sscanf(params,"dd", weapid, ammo)) return SendClientMessage(playerid, RED,"[USAGE]: /giveallweapon [weapon] [ammo]");
  1185. //   if(IsValidWeapon(weapid))
  1186.      {
  1187.       if(IsPlayerConnected(i))
  1188.       {
  1189.         GivePlayerWeapon(i, weapid, ammo);
  1190.         new str[150];
  1191.         format(str, sizeof(str),"Administrator %s has given everyone %d ammo of weapon %d", PlayerName(playerid), ammo, weapid);
  1192.         SendClientMessage(i, BLUE, str);
  1193.       }
  1194.      }
  1195. //     else return SendClientMessage(playerid, RED,"[Server]: You are not allowed to give this weapon!");
  1196.   }
  1197. //  else return SendClientMessage(playerid, RED,"[Server]: You are not high enough level to use this command!");
  1198.   }
  1199.   return 1;
  1200. }
  1201.  
  1202. CMD:giveweapon(playerid, params[])
  1203. {
  1204.   if( PlayerInfo[ playerid ][ pAdmin ] < 1 ) return SendClientMessage( playerid, COLOR_RED, "ERROR: This command is only for admins!" );
  1205.   {
  1206.      new target, weapid, ammo;
  1207.      if(sscanf(params,"ddd", target, weapid, ammo)) return SendClientMessage(playerid, COLOR_RED,"[USAGE]: /giveweapon [playerid] [weapon] [ammo]");
  1208. //   if(IsValidWeapon(weapid))
  1209.      {
  1210.       if(IsPlayerConnected(target))
  1211.       {
  1212.         GivePlayerWeapon(target, weapid, ammo);
  1213.         new str[150];
  1214.         format(str, sizeof(str),"Administrator %s has given you %d ammo of weapon %d", PlayerName(playerid), ammo, weapid);
  1215.         SendClientMessage(target, BLUE, str);
  1216.     //  TargetCMDMessage(playerid, target,"GIVEWEAPON");
  1217.       }
  1218.       else return SendClientMessage(playerid, COLOR_RED,"[Server]: Player is not connected!");
  1219.      }
  1220. //   else return SendClientMessage(playerid, COLOR_RED,"[Server]: You are not allowed to give this weapon!");
  1221.   }
  1222. //  else return SendClientMessage(playerid, COLOR_RED,"[Server]: You are not high enough level to use this command!");
  1223.   return 1;
  1224. }
  1225.  
  1226. CMD:admins(playerid, params[])
  1227. {
  1228.    new count = 0, string[256];
  1229.    SendClientMessage(playerid, BLUE,"Current online admins:");
  1230.    for(new i = 0; i < MAX_PLAYERS; i ++)
  1231.    {
  1232.       if(IsPlayerConnected(i))
  1233.       {
  1234.           if(PlayerInfo[i][pAdmin] >= 1)
  1235.           {
  1236.              format(string, sizeof(string),"Admin ID:[%d] %s Level: %d", i, PlayerName(i), PlayerInfo[i][pAdmin]);
  1237.              SendClientMessage(playerid, BLUE, string);
  1238.              count++;
  1239.           }
  1240.       }
  1241.    }
  1242.    if(count == 0)
  1243.    {
  1244.           SendClientMessage(playerid, BLUE,"No admins are online right now!");
  1245.    }
  1246.    return 1;
  1247. }
  1248.  
  1249.  
  1250.  
  1251. CMD:healall(playerid, params[])
  1252. {
  1253.  if( PlayerInfo[ playerid ][ pAdmin ] < 1 ) return SendClientMessage( playerid, COLOR_RED, "ERROR: This command is only for admins!" );
  1254.  {
  1255.    for(new i =0; i < MAX_PLAYERS; i ++ )
  1256.    {
  1257.      if(IsPlayerConnected(i))
  1258.      {
  1259.        SetPlayerHealth(i, 100.0);
  1260.        new str[100];
  1261.        format(str, sizeof(str),"Administrator %s has healed all players!", PlayerName(playerid));
  1262.        SendClientMessage(i, COLOR_WHITE, str);
  1263.     //   CMDMessage(playerid,"HEALALL");
  1264.      }
  1265.    }
  1266.  }
  1267. // else return SendClientMessage(playerid, RED,"[Server]: You need to be admin level 3 to use this command!");
  1268.  return 1;
  1269. }
  1270.  
  1271. CMD:goto(playerid, params[])
  1272. {
  1273.      if( PlayerInfo[ playerid ][ pAdmin ] < 1 ) return SendClientMessage( playerid, COLOR_RED, "ERROR: You must be level 1 to use this command!" );
  1274.      new ID;
  1275.      new pn[MAX_PLAYER_NAME];
  1276.      new an[MAX_PLAYER_NAME];
  1277.      new str[128];
  1278.      if(sscanf(params, "u", ID)) return SendClientMessage(playerid, 0xFF0000AA, "USAGE: /goto [ID]"); //This is a long line, "sscanf" is the plugin that search the missing params, "params" is the param that define params LOL, "u" is the PARAM that define the MISSING ID, ID is the param for the targetid
  1279.      if(!IsPlayerConnected(ID)) return SendClientMessage(playerid, 0xFF0000AA, "ERROR: This player is not connected");//Same as !IsPlayerAdmin, but instead of "playerid" we put "ID" because it's the targetid
  1280.      GetPlayerName(playerid, an, MAX_PLAYER_NAME);//Define the playerid's param
  1281.      GetPlayerName(ID, pn, MAX_PLAYER_NAME);//Define the ID's param
  1282.      new Float:x; //Defining float X
  1283.      new Float:y; //Same
  1284.      new Float:z; //Same
  1285.      GetPlayerPos(ID, x, y, z); //This line get the "ID" position
  1286.      SetPlayerPos(playerid, x+1, y+1, z); //This line set the "playerid" position from "ID" position, with some changes(x+1, y+1);
  1287.      format(str, sizeof(str), "You have been teleported to %s", pn); //Showed before, this is the line that give the message to playerid)
  1288.      SendClientMessage(playerid, 0x00FF00AA, str); //This line give the message to playerid
  1289.      if(IsPlayerInAnyVehicle(playerid)) //Mhh, let's give you a question, what should this callback do?
  1290.      {
  1291.           GetPlayerPos(ID, x, y, z);
  1292.           SetVehiclePos(playerid, x+1, y+1, z); //And this one? :D
  1293.      }
  1294.      return 1;
  1295. }
  1296.  
  1297. CMD:makeadmin(playerid, params[])
  1298. {
  1299.     new id, level, string[128], string2[128], name[MAX_PLAYER_NAME], name2[MAX_PLAYER_NAME];
  1300.  
  1301.     if(PlayerInfo[playerid][pAdmin] < 1338) return SendClientMessage(playerid, COLOR_RED, "Error : "COL_WHITE"You don't have the required level to execute this command");
  1302.     if(sscanf(params, "ud", id, level)) return SendClientMessage(playerid, COLOR_RED, "Error : "COL_WHITE"USAGE: /makeadmin [PartOfName/ID] [level]");
  1303.     if(level > 1338) return SendClientMessage(playerid, COLOR_RED, "Error : "COL_WHITE"Level cant be above 1338");
  1304.     if(id == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_RED, "Error : "COL_WHITE"That ID isn't connected");
  1305.     else
  1306.     {
  1307.         GetPlayerName(playerid, name, sizeof(name));
  1308.         GetPlayerName(id, name2, sizeof(name2));
  1309.  
  1310.         PlayerInfo[playerid][pAdmin] = level;
  1311.  
  1312.         format(string, sizeof(string), "Admin %s has promoted you to admin level %d", name, level);
  1313.         format(string2, sizeof(string2), "You have promoted %s to admin level %d", name2, level);
  1314.  
  1315.         SendClientMessage(id, GREEN, string);
  1316.         SendClientMessage(playerid, GREEN, string2);
  1317.     }
  1318.     return true;
  1319. }
  1320.  
  1321. CMD:unban(playerid, params[])
  1322. {
  1323.     new name[MAX_PLAYER_NAME], IP[16], str[64], str1[128];
  1324.     if(PlayerInfo[playerid][pAdmin] < 5) return SendClientMessage(playerid, COLOR_RED, "Error : "COL_WHITE"You don't have the required level to execute this command");
  1325.     if(sscanf(params, "s[16]", IP)) return SendClientMessage(playerid, COLOR_RED, "Error : "COL_WHITE"Uncorrect format. /unban [IP]");
  1326.  
  1327.     GetPlayerName(playerid, name, sizeof(name));
  1328.  
  1329.     format(str, sizeof(str), "unbanip %s", IP);
  1330.  
  1331.     SendRconCommand(str);
  1332.  
  1333.     format(str1, sizeof(str1), "You unbanned IP: "COL_WHITE"%s", IP);
  1334.  
  1335.     SendClientMessage(playerid, GREEN, str1);
  1336.  
  1337.     SendRconCommand("reloadbans");
  1338.     return true;
  1339. }
  1340.  
  1341. CMD:gethere(playerid,params[])
  1342. {
  1343.     if( PlayerInfo[ playerid ][ pAdmin ] < 1 ) return SendClientMessage( playerid, COLOR_RED, "ERROR: This command is only for admins!" );
  1344.     new targetid, Float:x, Float:y, Float:z;//defines floats and [U]targetid(same which we did as id above)[/U]
  1345.     if(sscanf(params, "u", targetid)) return SendClientMessage(playerid, COLOR_RED, "USAGE: /gethere [id]");//checks if there is something written after /gethere if no sends the usage error
  1346.     if(!IsPlayerConnected(playerid)) return SendClientMessage(playerid, 0xFF0000FF, "This player is offline or it is yourself");//checks if the player is conneted or not and also checks that we are not teleporting ourselves to our self :P if we are it sends error
  1347.     GetPlayerPos(playerid, x, y, z);//gets player pos PLAYER POS not targetid
  1348.     SetPlayerPos(targetid, x+1, y+1, z);//gets the TARGETID player to the PLAYERID x+1,y+1 and z remains same as it defines height
  1349.     return 1;
  1350. }
  1351.  
  1352. CMD:myrank(playerid, params[])
  1353. {
  1354.     if(PlayerInfo[playerid][pRank] >= 0 && PlayerInfo[playerid][pRank] >= 100)
  1355.     {
  1356.     SendClientMessage(playerid, COLOR_RED,"Private 1");
  1357.     }
  1358.     if(PlayerInfo[playerid][pRank] >= 100 && PlayerInfo[playerid][pRank] >= 200)
  1359.     {
  1360.     SendClientMessage(playerid, COLOR_RED,"Private 2");
  1361.     }
  1362.     if(PlayerInfo[playerid][pRank] >= 200 && PlayerInfo[playerid][pRank] >= 300)
  1363.     {
  1364.     SendClientMessage(playerid, COLOR_RED,"Head Staff Sergeant");
  1365.     }
  1366.     if(PlayerInfo[playerid][pRank] >= 300 && PlayerInfo[playerid][pRank] >= 400)
  1367.     {
  1368.     SendClientMessage(playerid, COLOR_RED,"Head Sergeant Major");
  1369.     }
  1370.     if(PlayerInfo[playerid][pRank] >= 400 && PlayerInfo[playerid][pRank] >= 500)
  1371.     {
  1372.     SendClientMessage(playerid, COLOR_RED,"Captain 1");
  1373.     }
  1374.     if(PlayerInfo[playerid][pRank] >= 500 && PlayerInfo[playerid][pRank] >= 600)
  1375.     {
  1376.     SendClientMessage(playerid, COLOR_RED,"Captain 2");
  1377.     }
  1378.     if(PlayerInfo[playerid][pRank] >= 600 && PlayerInfo[playerid][pRank] >= 700)
  1379.     {
  1380.     SendClientMessage(playerid, COLOR_RED,"Captain 3");
  1381.     }
  1382.     if(PlayerInfo[playerid][pRank] >= 700 && PlayerInfo[playerid][pRank] >= 800)
  1383.     {
  1384.     SendClientMessage(playerid, COLOR_RED,"Major General");
  1385.     }
  1386.     if(PlayerInfo[playerid][pRank] >= 800 && PlayerInfo[playerid][pRank] >= 900)
  1387.     {
  1388.     SendClientMessage(playerid, COLOR_RED,"Head General");
  1389.     }
  1390.     if(PlayerInfo[playerid][pRank] >= 900 && PlayerInfo[playerid][pRank] >= 1000)
  1391.     {
  1392.     SendClientMessage(playerid, COLOR_RED,"Commander");
  1393.     }
  1394.     return 1;
  1395. }
  1396.  
  1397. CMD:ann(playerid,params[])
  1398. {
  1399.     if( PlayerInfo[ playerid ][ pAdmin ] < 1 ) return SendClientMessage( playerid, COLOR_RED, "ERROR: This command is only for admins!" );
  1400.     new text[60];
  1401.     if(sscanf(params,"s[60]",text))
  1402.     return SendClientMessage(playerid, 0xFF0000, "Usage: /ann(ounce) [text]");
  1403.     GameTextForAll(text,3000,3);
  1404.     return 1;
  1405. }
  1406.  
  1407. COMMAND:givemoney(playerid, params[])
  1408. {
  1409.     if( PlayerInfo[ playerid ][ pAdmin ] < 1 ) return SendClientMessage( playerid, COLOR_RED, "ERROR: This command is only for admins!" );
  1410.     {
  1411.         new
  1412.           toplayerid, // the player we want to give money to
  1413.           amount;
  1414.         // extracting player's ID and amount from params
  1415.         if (!sscanf(params, "ii", toplayerid, amount))
  1416.         {
  1417.           if (toplayerid != INVALID_PLAYER_ID)
  1418.           {
  1419.             new
  1420.               message[40];
  1421.             GivePlayerMoney(toplayerid, amount);
  1422.             format(message, sizeof(message), "You got $%d from admin!", amount);
  1423.             SendClientMessage(toplayerid, 0x00FF00FF, message);
  1424.           }
  1425.           else SendClientMessage(playerid, 0xFF0000FF, "That player is not connected");
  1426.         }
  1427.         else SendClientMessage(playerid, 0xFFFFFFFF, "Usage: /givemoney <playerid> <amount>");
  1428.     }
  1429.   //  else SendClientMessage(playerid, 0xFF0000FF, "Only admins can use this command!");
  1430.     return 1;
  1431. }
  1432.  
  1433. COMMAND:setscore(playerid, params[])
  1434. {
  1435.     if( PlayerInfo[ playerid ][ pAdmin ] < 1 ) return SendClientMessage( playerid, COLOR_RED, "ERROR: This command is only for admins!" );
  1436.     {
  1437.         new
  1438.           toplayerid, // the player we want to give money to
  1439.           amount;
  1440.         // extracting player's ID and amount from params
  1441.         if (!sscanf(params, "ii", toplayerid, amount))
  1442.         {
  1443.           if (toplayerid != INVALID_PLAYER_ID)
  1444.           {
  1445.             new
  1446.               message[40];
  1447.             SetPlayerScore(toplayerid, amount);
  1448.             format(message, sizeof(message), "Admin has set you score to %d", amount);
  1449.             SendClientMessage(toplayerid, 0x00FF00FF, message);
  1450.           }
  1451.           else SendClientMessage(playerid, 0xFF0000FF, "That player is not connected");
  1452.         }
  1453.         else SendClientMessage(playerid, 0xFFFFFFFF, "Usage: /setscore <playerid> <amount>");
  1454.     }
  1455. //    else SendClientMessage(playerid, 0xFF0000FF, "Only admins can use this command!");
  1456.     return 1;
  1457. }
  1458.  
  1459. COMMAND:setskin(playerid, params[])
  1460. {
  1461.     if( PlayerInfo[ playerid ][ pAdmin ] < 1 ) return SendClientMessage( playerid, COLOR_RED, "ERROR: This command is only for admins!" );
  1462.     {
  1463.         new
  1464.           toplayerid, // the player we want to give money to
  1465.           amount;
  1466.         // extracting player's ID and amount from params
  1467.         if (!sscanf(params, "ii", toplayerid, amount))
  1468.         {
  1469.           if (toplayerid != INVALID_PLAYER_ID)
  1470.           {
  1471.             new
  1472.               message[40];
  1473.             SetPlayerSkin(toplayerid, amount);
  1474.             format(message, sizeof(message), "Admin has set you skin to %d", amount);
  1475.             SendClientMessage(toplayerid, 0x00FF00FF, message);
  1476.           }
  1477.           else SendClientMessage(playerid, 0xFF0000FF, "That player is not connected");
  1478.         }
  1479.         else SendClientMessage(playerid, 0xFFFFFFFF, "Usage: /setskin <playerid> <amount>");
  1480.     }
  1481. //    else SendClientMessage(playerid, 0xFF0000FF, "Only admins can use this command!");
  1482.     return 1;
  1483. }
  1484.  
  1485. COMMAND:sethp(playerid, params[])
  1486. {
  1487.     if( PlayerInfo[ playerid ][ pAdmin ] < 1 ) return SendClientMessage( playerid, COLOR_RED, "ERROR: This command is only for admins!" );
  1488.     {
  1489.         new
  1490.           toplayerid, // the player we want to give money to
  1491.           amount;
  1492.         // extracting player's ID and amount from params
  1493.         if (!sscanf(params, "ii", toplayerid, amount))
  1494.         {
  1495.           if (toplayerid != INVALID_PLAYER_ID)
  1496.           {
  1497.             new
  1498.               message[40];
  1499.             SetPlayerHealth(toplayerid, amount);
  1500.             format(message, sizeof(message), "Admin has set you health to %d", amount);
  1501.             SendClientMessage(toplayerid, 0x00FF00FF, message);
  1502.           }
  1503.           else SendClientMessage(playerid, 0xFF0000FF, "That player is not connected");
  1504.         }
  1505.         else SendClientMessage(playerid, 0xFFFFFFFF, "Usage: /sethp <playerid> <amount>");
  1506.     }
  1507.   //  else SendClientMessage(playerid, 0xFF0000FF, "Only admins can use this command!");
  1508.     return 1;
  1509. }
  1510.  
  1511. COMMAND:setarmour(playerid, params[])
  1512. {
  1513.     if( PlayerInfo[ playerid ][ pAdmin ] < 1 ) return SendClientMessage( playerid, COLOR_RED, "ERROR: This command is only for admins!" );
  1514.     {
  1515.         new
  1516.           toplayerid, // the player we want to give money to
  1517.           amount;
  1518.         // extracting player's ID and amount from params
  1519.         if (!sscanf(params, "ii", toplayerid, amount))
  1520.         {
  1521.           if (toplayerid != INVALID_PLAYER_ID)
  1522.           {
  1523.             new
  1524.               message[40];
  1525.             SetPlayerArmour(toplayerid, amount);
  1526.             format(message, sizeof(message), "Admin has set you armour to %d", amount);
  1527.             SendClientMessage(toplayerid, 0x00FF00FF, message);
  1528.           }
  1529.           else SendClientMessage(playerid, 0xFF0000FF, "That player is not connected");
  1530.         }
  1531.         else SendClientMessage(playerid, 0xFFFFFFFF, "Usage: /setarmour <playerid> <amount>");
  1532.     }
  1533.  //   else SendClientMessage(playerid, 0xFF0000FF, "Only admins can use this command!");
  1534.     return 1;
  1535. }
  1536.  
  1537. CMD:armourall(playerid, params[])
  1538. {
  1539.  if( PlayerInfo[ playerid ][ pAdmin ] < 1 ) return SendClientMessage( playerid, COLOR_RED, "ERROR: This command is only for admins!" );
  1540.  {
  1541.    for(new i =0; i < MAX_PLAYERS; i ++ )
  1542.    {
  1543.      if(IsPlayerConnected(i))
  1544.      {
  1545.        SetPlayerArmour(i, 100.0);
  1546.        new str[100];
  1547.        format(str, sizeof(str),"Administrator %s has armoured all players!", PlayerName(playerid));
  1548.        SendClientMessage(i, COLOR_RED, str);
  1549.     //   CMDMessage(playerid,"ARMOURALL");
  1550.      }
  1551.    }
  1552.  }
  1553. // else return SendClientMessage(playerid, COLOR_RED,"[ADMIN]: You need to be admin level 3 to use this command!");
  1554.  return 1;
  1555. }
  1556.  
  1557.  
  1558. CMD:kickall(playerid, params[])
  1559. {
  1560.  if( PlayerInfo[ playerid ][ pAdmin ] < 1 ) return SendClientMessage( playerid, COLOR_RED, "ERROR: This command is only for admins!" );
  1561.  {
  1562.    for(new i =0; i < MAX_PLAYERS; i ++ )
  1563.    {
  1564.      if(IsPlayerConnected(i))
  1565.      {
  1566.        //Kick(i);
  1567.        new str[100];
  1568.        format(str, sizeof(str),"Administrator %s has kicked all players!", PlayerName(playerid));
  1569.        SendClientMessage(i, COLOR_RED, str);
  1570.        Kick(i);
  1571.     //   CMDMessage(playerid,"ARMOURALL");
  1572.      }
  1573.    }
  1574.  }
  1575. // else return SendClientMessage(playerid, COLOR_RED,"[ADMIN]: You need to be admin level 3 to use this command!");
  1576.  return 1;
  1577. }
  1578.  
  1579.  
  1580.  
  1581.  
  1582.  
  1583.  
  1584. CMD:slap(playerid, params[])
  1585. {
  1586.    if( PlayerInfo[ playerid ][ pAdmin ] < 1 ) return SendClientMessage( playerid, COLOR_RED, "ERROR: This command is only for admins!" );
  1587.    {
  1588.       new player1, Float:x, Float:y, Float:z, str[70];
  1589.       if(sscanf(params,"d", player1)) return SendClientMessage(playerid, COLOR_RED,"[USAGE]: /slap [playerid] ");
  1590.       if(IsPlayerConnected(player1))
  1591.       {
  1592.          GetPlayerPos(player1, x, y, z);
  1593.          SetPlayerPos(player1, x, y, z+6);
  1594.          format(str, sizeof(str),"You have slapped %s!", PlayerName(player1));
  1595.          SendClientMessage(playerid, COLOR_WHITE, str);
  1596.     //   TargetCMDMessage(playerid, player1,"SLAP");
  1597.          PlayerPlaySound(player1,1190,0.0,0.0,0.0);
  1598.          PlayerPlaySound(playerid,1190,0.0,0.0,0.0);
  1599.       }
  1600.       else return SendClientMessage(playerid, COLOR_RED,"[Server]: Player is not connected!");
  1601.    }
  1602. //   else return SendClientMessage(playerid, COLOR_RED,"[ADMIN]: You need to be level 2 admin to use this command!");
  1603.    return 1;
  1604. }
  1605.  
  1606. CMD:aduty(playerid) //Doesnt need params function
  1607. {
  1608.     if(PlayerInfo[playerid][pAdmin] >=1 || IsPlayerAdmin(playerid)) //If you use rcon admin delete (PlayerInfo[playerid][pAdmin] >=1 ||
  1609.     {
  1610.         if (aDuty[playerid] == 0) //Check if player is on duty
  1611.         {
  1612.             new string[128];
  1613.             new Float:x,Float:y,Float:z;
  1614.             new Text3D:label = Create3DTextLabel("Admin On Duty!", COLOR_DRED,x,y,z, 40.0, 0, 0); //Creates 3d text label at player position
  1615.             GetPlayerPos(playerid,x,y,z); //Looks for players position
  1616.             SetPlayerHealth(playerid, 10000000000000.0);
  1617.             SetPlayerColor(playerid,COLOR_DRED); //set admin colour red
  1618.             SetPlayerSkin(playerid,294); //set admin skin to 294
  1619.             format(string,sizeof(string), "%s is now on admin Duty!",GetPlayerNameEx(playerid)); //here you format string to send to players
  1620.             SendClientMessageToAll(COLOR_DRED,string); //send string to players
  1621.             SendClientMessage(playerid,COLOR_DRED,"You are now on duty!"); //Tell admin he is now on duty
  1622.             Attach3DTextLabelToPlayer(label,playerid,0.0, 0.0, 0.7); //attach 3d text label made before to player
  1623.             aDuty[playerid] = 1; //Set player on duty
  1624.         }
  1625.         else if (aDuty[playerid] == 1) //Check if player is on duty
  1626.         {
  1627.             new string[128];
  1628.             new Float:x,Float:y,Float:z;
  1629.             new Text3D:label = Create3DTextLabel("Admin On Duty!", COLOR_DRED,x,y,z, 40.0, 0, 0);
  1630.             Delete3DTextLabel(label); //Delete 3d text label saying "Admin On Duty!"
  1631.             SetPlayerHealth(playerid,100); //sets player health back to 100
  1632.             format(string,sizeof(string)," %s is now off admin Duty!",GetPlayerNameEx(playerid)); //Format string to send to players
  1633.             SendClientMessageToAll(COLOR_DRED,string); //send players string
  1634.             SendClientMessage(playerid, COLOR_DRED,"You are now off duty!"); //send admin message he is off duty
  1635.             aDuty[playerid] = 0; //sets admin off duty
  1636.         }
  1637.     }
  1638.     else
  1639.         SendClientMessage(playerid,COLOR_DRED,"You are not high level enough!"); //Error message to send to players who arent admins
  1640.     return 1;
  1641. }
  1642.  
  1643. COMMAND:cc( playerid, params[ ] )
  1644. {
  1645.     if( PlayerInfo[ playerid ][ pAdmin ] < 1 ) return SendClientMessage( playerid, COLOR_RED, "ERROR: You must be level 1 to use this command!" );
  1646.     {
  1647.         for( new i = 0; i <= 100; i ++ ) SendClientMessageToAll( COLOR_WHITE, "" );
  1648.     }
  1649.     return 1;
  1650. }
  1651.  
  1652. COMMAND:spec(playerid,params[])
  1653. {
  1654.     new zid;
  1655.     if(sscanf(params, "u", zid)) return SendClientMessage(playerid, 0xFF0000AA, "Usae: /spec [playerid]");
  1656.     if(IsPlayerConnected(zid))
  1657.     {
  1658.         if(PlayerInfo[playerid][pAdmin] >= 1) //return SendClientMessage(playerid, 0xFF0000AA, "ERROR: You are not admin.");
  1659.         {
  1660.             TogglePlayerSpectating(playerid, 1);
  1661.             if(IsPlayerInAnyVehicle(zid))
  1662.             {
  1663.                 PlayerSpectateVehicle(playerid,GetPlayerVehicleID(zid), SPECTATE_MODE_NORMAL);
  1664.             }
  1665.             else
  1666.             {
  1667.                 PlayerSpectatePlayer(playerid, zid, SPECTATE_MODE_NORMAL);
  1668.             }
  1669.             SendClientMessage(playerid, COLOR_RED, "{FBDF89}[Server] You spec the player. To stop spec /endspec");
  1670.         }
  1671.     //  else SendClientMessage(playerid, COLOR_RED, "[FunZoneLT]>> Jus negalite naudoti sitos komandos.");
  1672.     }
  1673.     else SendClientMessage(playerid, COLOR_RED, "[Server] Player not Connected to server (Invalid ID).");
  1674.     return 1;
  1675. }
  1676.  
  1677. COMMAND:endspec(playerid,params[])
  1678. {
  1679.     if(PlayerInfo[playerid][pAdmin] >= 1) //return SendClientMessage(playerid, 0xFF0000AA, "ERROR: You are not admin.");
  1680.     #pragma unused params
  1681.     TogglePlayerSpectating(playerid, 0);
  1682.     return 1;
  1683. }
  1684.  
  1685. COMMAND:xp(playerid,params[])
  1686. {
  1687.     new xp = PlayerInfo[playerid][pRank];
  1688.     new string[64], pName[MAX_PLAYER_NAME];
  1689.     GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
  1690.     format(string,sizeof string,"%s you XP is: [%i]. You earn 1 XP+ after evry kill. You don't loose XP!",pName, xp);
  1691.     SendClientMessage(playerid, COLOR_RED, string);
  1692.     return 1;
  1693.  
  1694. }
  1695.  
  1696.  
  1697. CMD:warn(playerid, params[])
  1698.     {
  1699.         if(PlayerInfo[playerid][pAdmin] >= 3) {
  1700.             new PID; //define the playerid we wanna kick
  1701.             new reason[64]; //the reason, put into a string
  1702.             new str[128]; //a new message string
  1703.             new warn = PlayerInfo[playerid][pWarn]; // How many warns
  1704.             new warns[128];
  1705.             new Playername[MAX_PLAYER_NAME], Adminname[MAX_PLAYER_NAME]; //defines the function with the playername we wanna get
  1706.             GetPlayerName(playerid, Adminname, sizeof(Adminname)); //defines the function with the adminname we wanna get
  1707.             GetPlayerName(PID, Playername, sizeof(Playername));
  1708.             if(sscanf(params, "us[64]", PID,reason)) return SendClientMessage(playerid, COLOR_GREY, "USAGE: /warn [playerid] [reason]"); //tell sscanf if the parameters/the syntax is written wrong to return a message (PID and the reason used here)
  1709.  
  1710.             if(!IsPlayerConnected(PID)) // if the ID is wrong or not connected, return a message! (PID used here)
  1711.                 return SendClientMessage(playerid, COLOR_GREY, "Player is not connected!");
  1712.             if(PlayerInfo[PID][pWarn] >= 3) return SendClientMessage(playerid, COLOR_RED, "This player have 3 warns.");
  1713.  
  1714.             format(str, sizeof(str), "'%s' has been warned and kicked by administrator '%s'. Reason: %s ", Playername, Adminname, reason); //format the string we've defined to send the message, playername and adminname are used to receive the information about the names
  1715.             format(warns, sizeof(warns), "'%s' You have [%d/3] warns right now. After 3 warns you will be banned. ", Playername, warn);
  1716.             SendClientMessageToAll(COLOR_RED, str); //send that message to all
  1717.             SendClientMessage(PID, COLOR_RED, warns);
  1718.             PlayerInfo[PID][pWarn]++;  //kick the playerid we've defined
  1719.             Kick(PID);
  1720.  
  1721.         }
  1722.         else //if he has not got the permissions
  1723.         {
  1724.             SendClientMessage(playerid, COLOR_GREY, "You have to be level 3 to use that command!"); //return this message
  1725.         }
  1726.         return 1;
  1727.     }
  1728.    
  1729. CMD:unwarn(playerid, params[])
  1730.     {
  1731.         if(PlayerInfo[playerid][pAdmin] >= 3) {
  1732.             new PID; //define the playerid we wanna kick
  1733.             new reason[64]; //the reason, put into a string
  1734.             new str[128]; //a new message string
  1735.             new Playername[MAX_PLAYER_NAME], Adminname[MAX_PLAYER_NAME]; //defines the function with the playername we wanna get
  1736.             GetPlayerName(playerid, Adminname, sizeof(Adminname)); //defines the function with the adminname we wanna get
  1737.             GetPlayerName(PID, Playername, sizeof(Playername));
  1738.             if(sscanf(params, "us[64]", PID,reason)) return SendClientMessage(playerid, COLOR_GREY, "USAGE: /warn [playerid] [reason]"); //tell sscanf if the parameters/the syntax is written wrong to return a message (PID and the reason used here)
  1739.  
  1740.             if(!IsPlayerConnected(PID)) // if the ID is wrong or not connected, return a message! (PID used here)
  1741.                 return SendClientMessage(playerid, COLOR_GREY, "Player is not connected!");
  1742.             if(PlayerInfo[PID][pWarn] >= 3) return SendClientMessage(playerid, COLOR_RED, "This player have 3 warns.");
  1743.  
  1744.             format(str, sizeof(str), "'%s' has been unwarned by administrator '%s'. Reason: %s ", Playername, Adminname, reason); //format the string we've defined to send the message, playername and adminname are used to receive the information about the names
  1745.             SendClientMessageToAll(COLOR_RED, str); //send that message to all
  1746.             PlayerInfo[PID][pWarn]--;  //kick the playerid we've defined
  1747.  
  1748.         }
  1749.         else //if he has not got the permissions
  1750.         {
  1751.             SendClientMessage(playerid, COLOR_GREY, "You have to be level 3 to use that command!"); //return this message
  1752.         }
  1753.         return 1;
  1754.     }
  1755.  
  1756.  
  1757.  
  1758. COMMAND:accinfo(playerid,params[])
  1759. {
  1760.     new warns = PlayerInfo[playerid][pWarn];
  1761.     new string[64], pName[MAX_PLAYER_NAME];
  1762.     GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
  1763.     format(string,sizeof string,"%s you have [%d/3] Warns",pName, warns);
  1764.     SendClientMessage(playerid, COLOR_RED, string);
  1765.     return 1;
  1766.  
  1767. }
  1768.  
  1769.  
  1770. COMMAND:resstats(playerid,params[])
  1771. {
  1772.     PlayerInfo[playerid][pKills] = 0;
  1773.     PlayerInfo[playerid][pDeaths] = 0;
  1774.     SendClientMessage(playerid, COLOR_GREY, "You kills/deaths is now reseted to 0.");
  1775.     return 1;
  1776. }
  1777.  
  1778. COMMAND:nuke(playerid, params[])
  1779. {
  1780. new pname[24], oname[24], otherid;
  1781. GetPlayerName(playerid,pname,24);
  1782. GetPlayerName(otherid,oname,24);
  1783. if( PlayerInfo[ playerid ][ pKS ] < 1 ) return SendClientMessage( playerid, COLOR_RED, "ERROR: You need to unlock the killstreaks first /unlock" );
  1784. else{
  1785.     if(sscanf(params,"d",otherid)) return SendClientMessage(playerid,0xFF0000AA,"USAGE: /nuke [playerid]");
  1786.     if(!IsPlayerConnected(otherid)) return SendClientMessage(playerid,0xFF0000AA,"Player is not online!");
  1787.     GivePlayerMoney(playerid,-30000);
  1788.     SendClientMessage(otherid,0xFF0000AA,"You have been killed by Nuke!");
  1789.     GetPlayerPos(otherid,bombx,bomby,bombz);
  1790.     bomb = CreateObject(3786,bombx,bomby,bombz + 80,0,269,0,100);
  1791.     MoveObject(bomb,bombx,bomby,bombz - 5 ,28);
  1792.     SetTimer("hittar",2500,false);
  1793. }
  1794. return 1;
  1795. }
  1796.  
  1797.  
  1798. public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
  1799. {
  1800.     return 1;
  1801. }
  1802.  
  1803. public OnPlayerExitVehicle(playerid, vehicleid)
  1804. {
  1805.     return 1;
  1806. }
  1807.  
  1808. public OnPlayerStateChange(playerid, newstate, oldstate)
  1809. {
  1810.     return 1;
  1811. }
  1812.  
  1813. public OnPlayerEnterCheckpoint(playerid)
  1814. {
  1815.     return 1;
  1816. }
  1817.  
  1818. public OnPlayerLeaveCheckpoint(playerid)
  1819. {
  1820.     return 1;
  1821. }
  1822.  
  1823. public OnPlayerEnterRaceCheckpoint(playerid)
  1824. {
  1825.     return 1;
  1826. }
  1827.  
  1828. public OnPlayerLeaveRaceCheckpoint(playerid)
  1829. {
  1830.     return 1;
  1831. }
  1832.  
  1833. public OnRconCommand(cmd[])
  1834. {
  1835.     return 1;
  1836. }
  1837.  
  1838. public OnPlayerRequestSpawn(playerid)
  1839. {
  1840.     return 1;
  1841. }
  1842.  
  1843. public OnObjectMoved(objectid)
  1844. {
  1845.     return 1;
  1846. }
  1847.  
  1848. public OnPlayerObjectMoved(playerid, objectid)
  1849. {
  1850.     return 1;
  1851. }
  1852.  
  1853. public OnPlayerPickUpPickup(playerid, pickupid)
  1854. {
  1855.     if(pickupid == sniper)
  1856.     {
  1857.         SendClientMessage(playerid, COLOR_RED, "Server gived a sniper to you!");
  1858.         GivePlayerWeapon(playerid, 34, 20);
  1859.     }
  1860.     if(pickupid == sniper1)
  1861.     {
  1862.         SendClientMessage(playerid, COLOR_RED, "Server gived a sniper to you!");
  1863.         GivePlayerWeapon(playerid, 34, 20);
  1864.        }
  1865.     return 1;
  1866. }
  1867.  
  1868. public OnVehicleMod(playerid, vehicleid, componentid)
  1869. {
  1870.     return 1;
  1871. }
  1872.  
  1873. public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
  1874. {
  1875.     return 1;
  1876. }
  1877.  
  1878. public OnVehicleRespray(playerid, vehicleid, color1, color2)
  1879. {
  1880.     return 1;
  1881. }
  1882.  
  1883. public OnPlayerSelectedMenuRow(playerid, row)
  1884. {
  1885.     return 1;
  1886. }
  1887.  
  1888. public OnPlayerExitedMenu(playerid)
  1889. {
  1890.     return 1;
  1891. }
  1892.  
  1893. public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)//This is called when a player's interior is changed.
  1894. {
  1895.     return 1;
  1896. }
  1897.  
  1898. public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
  1899. {
  1900.     return 1;
  1901. }
  1902.  
  1903. public OnRconLoginAttempt(ip[], password[], success)
  1904. {
  1905.     return 1;
  1906. }
  1907.  
  1908. public OnPlayerUpdate( playerid )
  1909. {
  1910.     new string[ 128 ];
  1911.     if(PlayerInfo[playerid][pRank] >= 1000)
  1912.     {
  1913.         TRank = "6"; /// The rank name
  1914.         TextDrawSetString(Textdraw2, string);
  1915.     }
  1916.     else if(PlayerInfo[playerid][pRank] >= 700 && PlayerInfo[playerid][pRank] >= 1000)
  1917.     {
  1918.         TRank = "5"; /// The rank name
  1919.         TextDrawSetString(Textdraw2, string);
  1920.     }
  1921.     else if(PlayerInfo[playerid][pRank] >= 500 && PlayerInfo[playerid][pRank] >= 700)
  1922.     {
  1923.         TRank = "4"; /// The rank name
  1924.         TextDrawSetString(Textdraw2, string);
  1925.     }
  1926.     else if(PlayerInfo[playerid][pRank] >= 200 && PlayerInfo[playerid][pRank] >= 500)
  1927.     {
  1928.         TRank = "3"; /// The rank name
  1929.         TextDrawSetString(Textdraw2, string);
  1930.     }
  1931.     else if(PlayerInfo[playerid][pRank] >= 100 && PlayerInfo[playerid][pRank] >= 200)
  1932.     {
  1933.         TRank = "2"; /// The rank name
  1934.         TextDrawSetString(Textdraw2, string);
  1935.     }
  1936.     else if(PlayerInfo[playerid][pRank] >= 50 && PlayerInfo[playerid][pRank] >= 100)
  1937.     {
  1938.         TRank = "1"; /// The rank name
  1939.         TextDrawSetString(Textdraw2, string);
  1940.     }
  1941.     else if(PlayerInfo[playerid][pRank] >= 0 && PlayerInfo[playerid][pRank] >= 50)
  1942.     {
  1943.         TRank = "0"; /// The rank name
  1944.         TextDrawSetString(Textdraw2, string);
  1945.     }
  1946.     format( string, sizeof string, "~y~Rank:~w~ %s",TRank);
  1947.     TextDrawSetString(Textdraw2, string);
  1948.     TextDrawShowForPlayer( playerid, Textdraw2 );
  1949.    
  1950.     if(PlayerInfo[playerid][pRank] >= 0 && PlayerInfo[playerid][pRank] >= 50)
  1951.     {
  1952.         PlayerInfo[playerid][pScore] = 1;
  1953.     }
  1954.     if(PlayerInfo[playerid][pRank] >= 50 && PlayerInfo[playerid][pRank] >= 100)
  1955.     {
  1956.         PlayerInfo[playerid][pScore] = 2;
  1957.     }
  1958.     if(PlayerInfo[playerid][pRank] >= 100 && PlayerInfo[playerid][pRank] >= 200)
  1959.     {
  1960.         PlayerInfo[playerid][pScore] = 3;
  1961.     }
  1962.     if(PlayerInfo[playerid][pRank] >= 200 && PlayerInfo[playerid][pRank] >= 300)
  1963.     {
  1964.         PlayerInfo[playerid][pScore] = 4;
  1965.     }
  1966.     if(PlayerInfo[playerid][pRank] >= 300 && PlayerInfo[playerid][pRank] >= 400)
  1967.     {
  1968.         PlayerInfo[playerid][pScore] = 5;
  1969.     }
  1970.     if(PlayerInfo[playerid][pRank] >= 400 && PlayerInfo[playerid][pRank] >= 500)
  1971.     {
  1972.         PlayerInfo[playerid][pScore] = 6;
  1973.     }
  1974.     if(PlayerInfo[playerid][pRank] >= 500 && PlayerInfo[playerid][pRank] >= 600)
  1975.     {
  1976.         PlayerInfo[playerid][pScore] = 7;
  1977.     }
  1978.     if(PlayerInfo[playerid][pRank] >= 600 && PlayerInfo[playerid][pRank] >= 700)
  1979.     {
  1980.         PlayerInfo[playerid][pScore] = 8;
  1981.     }
  1982.     if(PlayerInfo[playerid][pRank] >= 700 && PlayerInfo[playerid][pRank] >= 800)
  1983.     {
  1984.         PlayerInfo[playerid][pScore] = 9;
  1985.     }
  1986.     if(PlayerInfo[playerid][pRank] >= 800 && PlayerInfo[playerid][pRank] >= 900)
  1987.     {
  1988.         PlayerInfo[playerid][pScore] = 10;
  1989.     }
  1990.     if(PlayerInfo[playerid][pRank] >= 900 && PlayerInfo[playerid][pRank] >= 1000)
  1991.     {
  1992.         PlayerInfo[playerid][pScore] = 99;
  1993.         SendClientMessage(playerid, COLOR_RED, "You are level 99. You can now use/unlock killstreaks");
  1994.     }
  1995.     if(PlayerInfo[playerid][pWarn] >= 3)
  1996.     {
  1997.         SendClientMessage(playerid, COLOR_RED, "You are banned from the server. Reason: +3 Warns");
  1998.         Ban(playerid);
  1999.     }
  2000.  
  2001.  
  2002.     return 1;
  2003. }
  2004.  
  2005. public OnPlayerStreamIn(playerid, forplayerid)
  2006. {
  2007.     return 1;
  2008. }
  2009.  
  2010. public OnPlayerStreamOut(playerid, forplayerid)
  2011. {
  2012.     return 1;
  2013. }
  2014.  
  2015. public OnVehicleStreamIn(vehicleid, forplayerid)
  2016. {
  2017.     return 1;
  2018. }
  2019.  
  2020. public OnVehicleStreamOut(vehicleid, forplayerid)
  2021. {
  2022.     return 1;
  2023. }
  2024.  
  2025. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  2026. {
  2027.     switch( dialogid )
  2028.     {
  2029.         case DIALOG_REGISTER:
  2030.         {
  2031.             if (!response) return Kick(playerid);
  2032.             if(response)
  2033.             {
  2034.                 if(!strlen(inputtext)) return ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT, ""COL_WHITE"Registering...",""COL_RED"You have entered an invalid password.\n"COL_WHITE"Type your password below to register a new account.","Register","Quit");
  2035.                 new INI:File = INI_Open(UserPath(playerid));
  2036.                 INI_SetTag(File,"data");
  2037.                 INI_WriteInt(File,"Password",udb_hash(inputtext));
  2038.                 INI_WriteInt(File,"Cash",0);
  2039.                 INI_WriteInt(File,"Admin",0);
  2040.                 INI_WriteInt(File,"Kills",0);
  2041.                 INI_WriteInt(File,"Deaths",0);
  2042.                 INI_WriteInt(File,"Score",0);
  2043.                 INI_WriteInt(File,"Banned",0);
  2044.                 INI_WriteInt(File,"Rank",0);
  2045.                 INI_WriteInt(File,"Warns",0);
  2046.                 INI_WriteInt(File,"Muted",0);
  2047.                 INI_WriteInt(File,"MuteTime",0);
  2048.                 INI_WriteInt(File,"Vip",0);
  2049.                 INI_WriteInt(File,"Map",0);
  2050.                 INI_WriteInt(File,"Killstreak",0);
  2051.                 INI_Close(File);
  2052.  
  2053.                 SetSpawnInfo(playerid, 0, 0, 1958.33, 1343.12, 15.36, 269.15, 0, 0, 0, 0, 0, 0);
  2054.                 SpawnPlayer(playerid);
  2055.                 ShowPlayerDialog(playerid, DIALOG_SUCCESS_1, DIALOG_STYLE_MSGBOX,""COL_WHITE"Success!",""COL_GREEN"Great! Your Y_INI system works perfectly. Relog to save your stats!","Ok","");
  2056.                 Kick(playerid);
  2057.             }
  2058.         }
  2059.  
  2060.         case DIALOG_LOGIN:
  2061.         {
  2062.             if ( !response ) return Kick ( playerid );
  2063.             if( response )
  2064.             {
  2065.                 if(udb_hash(inputtext) == PlayerInfo[playerid][pPass])
  2066.                 {
  2067.                     INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
  2068.                     GivePlayerMoney(playerid, PlayerInfo[playerid][pCash]);
  2069.                     ShowPlayerDialog(playerid, DIALOG_SUCCESS_2, DIALOG_STYLE_MSGBOX,""COL_WHITE"Success!",""COL_GREEN"You have successfully logged in!","Ok","");
  2070.                 }
  2071.                 else
  2072.                 {
  2073.                     ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,""COL_WHITE"Login",""COL_RED"You have entered an incorrect password.\n"COL_WHITE"Type your password below to login.","Login","Quit");
  2074.                 }
  2075.                 return 1;
  2076.             }
  2077.         }
  2078.     }
  2079.     return 1;
  2080. }
  2081.  
  2082. public OnPlayerClickPlayer(playerid, clickedplayerid, source)
  2083. {
  2084.     return 1;
  2085. }
  2086.  
  2087. public AntiSpawnkill(playerid)
  2088. {
  2089.     SetPlayerHealth(playerid, 100.0);
  2090.     SetPlayerHealth(playerid, 100.0);
  2091.     SendClientMessage(playerid, 0xFF0000AA, "[INFO]:Anti-Spawnkill protection over, you are on your own now");
  2092.     return 1;
  2093. }
  2094.  
  2095. public Map(playerid)
  2096. {
  2097.     PlayerInfo[playerid][pMap] = 1;
  2098.     SetPlayerPos(playerid, 2527.72,2729.96,10.8203);
  2099.     SetPlayerWeather(playerid, 0);
  2100.     SetPlayerTime(playerid, 13,00);
  2101.     SetTimerEx("rSpawn", 600000,0,"i",playerid);
  2102.     return 1;
  2103. }
  2104.  
  2105. public Radio(playerid)
  2106. {
  2107.     PlayAudioStreamForPlayer(playerid, "http://k003.kiwi6.com/hotlink/fq3a505z9r/jokers_of_the_scene_baggy_bottom_boys_official_video_www.mp3fiber.com_.mp3");
  2108.     SetTimerEx("Radio1", 240000,0,"i",playerid);
  2109.     return 1;
  2110. }
  2111.  
  2112. public Radio1(playerid)
  2113. {
  2114.     PlayAudioStreamForPlayer(playerid, "http://k003.kiwi6.com/hotlink/1eegzeh272/deadmau5_-_ghosts_n_stuff_www.mp3fiber.com_.mp3");
  2115.     SetTimerEx("Radio1", 360000,0,"i",playerid);
  2116.     return 1;
  2117. }
  2118.  
  2119. public rSpawn(playerid)
  2120. {
  2121.     PlayerInfo[playerid][pMap] = 0;
  2122.     SpawnPlayer(playerid);
  2123.     SendClientMessage(playerid, BLUE, "[Information] [Server:] The Game is Over.");
  2124.     return 1;
  2125. }
  2126.  
  2127. public Spec(playerid)
  2128. {
  2129.     TogglePlayerSpectating(playerid, 0);
  2130.     SpawnPlayer(playerid);
  2131.     return 1;
  2132. }
  2133.  
  2134. stock GetPlayerNameEx(playerid) //This is stock i made to make Getting players name easier
  2135. {
  2136.     new Name[MAX_PLAYER_NAME];
  2137.     GetPlayerName(playerid, Name, MAX_PLAYER_NAME);
  2138.     return Name;
  2139. }
  2140.  
  2141. stock PlayerName(playerid)
  2142. {
  2143.     new pName[25];
  2144.     GetPlayerName(playerid, pName, sizeof(pName));
  2145.     return pName;
  2146. }
  2147.  
  2148. stock MessageToAdmins(color, const string[])
  2149. {
  2150.   for(new i = 0; i < MAX_PLAYERS; i++)
  2151.   {
  2152.     if(IsPlayerConnected(i))
  2153.     {
  2154.        if(PlayerInfo[i][pAdmin] >= 1)
  2155.        {
  2156.          SendClientMessage(i, color, string);
  2157.        }
  2158.     }
  2159.   }
  2160.   return 1;
  2161. }
  2162.  
  2163.  
  2164. public hittar()
  2165. {
  2166. CreateExplosion(bombx,bomby,bombz,6,10.0);
  2167. CreateExplosion(bombx,bomby,bombz+5,6,10.0);
  2168. CreateExplosion(bombx,bomby,bombz+10,6,10.0);
  2169. CreateExplosion(bombx+10,bomby,bombz,6,10.0);
  2170. CreateExplosion(bombx-10,bomby,bombz,6,10.0);
  2171. CreateExplosion(bombx+10,bomby+10,bombz,6,10.0);
  2172. CreateExplosion(bombx+10,bomby+10,bombz,6,10.0);
  2173. CreateExplosion(bombx-10,bomby+10,bombz,6,10.0);
  2174. CreateExplosion(bombx-10,bomby+10,bombz,6,10.0);
  2175. DestroyObject(bomb);
  2176. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement