Advertisement
Guest User

Untitled

a guest
Aug 17th, 2009
2,020
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 49.98 KB | None | 0 0
  1. #include <a_samp>
  2. #include <utils>
  3.  
  4.  
  5. // This is a comment
  6. // uncomment the line below if you want to write a filterscript
  7. //#define FILTERSCRIPT
  8.  
  9.  
  10. #define COLOR_GRAD1 0xB4B5B7FF
  11. #define COLOR_GRAD2 0xBFC0C2FF
  12. #define COLOR_GRAD3 0xCBCCCEFF
  13. #define COLOR_GRAD4 0xD8D8D8FF
  14. #define COLOR_GRAD5 0xE3E3E3FF
  15. #define COLOR_GRAD6 0xF0F0F0FF
  16. #define COLOR_GREY 0xAFAFAFAA
  17. #define COLOR_GREEN 0x33AA33AA
  18. #define COLOR_RED 0xAA3333AA
  19. #define COLOR_LIGHTRED 0xFF6347AA
  20. #define COLOR_LIGHTBLUE 0x33CCFFAA
  21. #define COLOR_LIGHTGREEN 0x9ACD32AA
  22. #define COLOR_YELLOW 0xFFFF00AA
  23. #define COLOR_YELLOW2 0xF5DEB3AA
  24. #define COLOR_WHITE 0xFFFFFFAA
  25. #define COLOR_FADE1 0xE6E6E6E6
  26. #define COLOR_FADE2 0xC8C8C8C8
  27. #define COLOR_FADE3 0xAAAAAAAA
  28. #define COLOR_FADE4 0x8C8C8C8C
  29. #define COLOR_FADE5 0x6E6E6E6E
  30. #define COLOR_PURPLE 0xC2A2DAAA
  31. #define COLOR_DBLUE 0x2641FEAA
  32. #define COLOR_ALLDEPT 0xFF8282AA
  33. #define COLOR_NEWS 0xFFA500AA
  34. #define COLOR_OOC 0xE0FFFFAA
  35.  
  36. new Zombiesteam[MAX_PLAYERS];
  37. new Soldiersteam[MAX_PLAYERS];
  38. new CurrentMoney[MAX_PLAYERS];
  39. new LastMoney[MAX_PLAYERS];
  40. new CreatedCars[100];
  41. new CreatedCar = 0;
  42.  
  43. forward ShowStats(playerid,targetid);
  44. forward PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z);
  45. forward OnPlayerUpdate(playerid);
  46. forward Encrypt(string[]);
  47. forward OnPlayerLogin(playerid,const string[]);
  48. forward PlayerPlayMusic(playerid);
  49. forward StopMusic();
  50. forward AntiMoneyCheat();
  51. //forward gametime();
  52. //forward gametime2();
  53. forward AntiGunCheat();
  54. forward ProxDetector(Float:radi, playerid, string[],col1,col2,col3,col4,col5);
  55. new rankcost = 600;
  56.  
  57. new Menu:perk;
  58.  
  59. #if defined FILTERSCRIPT
  60.  
  61. public OnFilterScriptInit()
  62. {
  63.     return 1;
  64. }
  65.  
  66. public OnFilterScriptExit()
  67. {
  68.     return 1;
  69. }
  70.  
  71. #else
  72.  
  73. main()
  74. {
  75.     print("\n----------------------------------");
  76.     print(" Call of Duty: Nazi Zombies");
  77.     print("----------------------------------\n");
  78. }
  79.  
  80. #endif
  81.  
  82. enum pInfo
  83. {
  84.     pPassword[128],
  85.     pRank,
  86.     pExp,
  87.     pKills,
  88.     pDeaths,
  89.     pJuggernaut,
  90.     pOverkill,
  91.     pFrag,
  92.     pAdmin,
  93.     pPremium,
  94.     pSaw,
  95.     pCash,
  96. };
  97.  
  98. new PlayerInfo[MAX_PLAYERS][pInfo];
  99. new gPlayerLogged[MAX_PLAYERS];
  100. new gPlayerAccount[MAX_PLAYERS];
  101.  
  102. public OnGameModeInit()
  103. {
  104.     //SetTimer("gametime", 900000, 0); // 15 minutes
  105.     SetTimer("AntiMoneyCheat", 1000, 1);
  106.     SetTimer("AntiGunCheat", 1000, 1);
  107.  
  108.     perk = CreateMenu("perk Menu", 1, 50.0, 180.0, 200.0, 200.0);
  109.     SetMenuColumnHeader(perk, 0, "*_Perks Menu_*");
  110.     AddMenuItem(perk, 0, "Overkill For $100,000");
  111.     AddMenuItem(perk, 0, "Fragx3 For $75,000");
  112.     AddMenuItem(perk, 0, "Juggernaut For $125,000");
  113.     AddMenuItem(perk, 0, "Exit");
  114.  
  115.     SetGameModeText("Nazi Zombies");
  116.     AddPlayerClass(287, 81.010902, 1672.796509, 16.632231, 269.1425, 22, 100, 0, 0, 0, 0); // Soldier 1
  117.     AddPlayerClass(121, 114.8816,1673.2751,17.5518, 269.1425, 22, 100, 0, 0, 0, 0); // Soldier 2
  118.     AddPlayerClass(286, 101.7231,1701.1642,18.0489, 269.1425, 22, 100, 0, 0, 0, 0); // Soldier 3 premium silver
  119.     AddPlayerClass(164, 101.7231,1701.1642,18.0489, 269.1425, 22, 100, 0, 0, 0, 0); // Soldier 4 premium gold
  120.     AddPlayerClass(285, 101.7231,1701.1642,18.0489, 269.1425, 22, 100, 0, 0, 0, 0); // Soldier 5 Admin
  121.  
  122.     AddPlayerClass(137,33.6468,1805.6796,17.6406,212.1153,24,260,33,10,0,0); // zom 1
  123.     AddPlayerClass(230,125.5642,1793.7635,17.6406,259.5016,24,260,33,10,0,0); // zom 2
  124.     AddPlayerClass(78,193.5855,1754.2750,17.6481,217.8279,24,260,33,10,0,0); // zom 3
  125.     AddPlayerClass(128,193.5855,1754.2750,17.6481,217.8279,24,260,33,10,0,0); // zom 4 premium silver
  126.     AddPlayerClass(162,193.5855,1754.2750,17.6481,217.8279,24,260,33,10,0,0); // zom 5 premium gold
  127.     AddPlayerClass(167,193.5855,1754.2750,17.6481,217.8279,24,260,33,10,0,0); // zom 6 Admin
  128.  
  129.  
  130.  
  131.     AddStaticVehicle(425,228.4282,1890.0945,18.1998,0.0292,0,0); // Heli 1
  132.     AddStaticVehicle(425,203.2448,1888.1006,18.2295,4.3415,0,0); // Heli 2
  133.  
  134.  
  135.     CreateObject(980, 96.641930, 1919.085693, 19.931686, 0.0000, 0.0000, 90.2409);// Gates for helocp[ter
  136.     CreateObject(980, 213.792221, 1875.419312, 13.470366, 0.0000, 0.0000, 0.0000); // Gatse for helicopter
  137.     CreateObject(16287, 81.010902, 1672.796509, 16.632231, 0.0000, 0.0000, 0.0000);
  138.     CreateObject(16287, 101.582672, 1702.111084, 16.640625, 0.0000, 0.0000, 306.7149);
  139.     CreateObject(16287, 114.486176, 1673.373291, 16.640625, 0.0000, 0.0000, 68.7549);
  140.     CreateObject(3866, 68.557297, 1706.036499, 24.479189, 0.0000, 0.0000, 0.0000);
  141.     CreateObject(3887, 108.475548, 1716.453979, 24.709074, 0.0000, 0.0000, 262.0242);
  142.     CreateObject(5837, 56.069839, 1666.369873, 18.204292, 0.0000, 0.0000, 260.4093);
  143.     CreateObject(5837, 52.523544, 1687.042236, 18.358120, 0.0000, 0.0000, 249.9921);
  144.     CreateObject(5837, 139.601257, 1697.671265, 18.358120, 0.0000, 0.0000, 120.3212);
  145.     CreateObject(5837, 136.574707, 1674.391602, 18.358120, 0.0000, 0.0000, 111.7268);
  146.     CreateObject(11088, 34.915924, 2002.516846, 23.404181, 0.0000, 0.0000, 0.0000);
  147.     CreateObject(972, 49.082146, 1766.017456, 16.637506, 0.0000, 0.0000, 283.5101);
  148.     CreateObject(972, 99.477951, 1764.698975, 16.637506, 0.0000, 0.0000, 251.7110);
  149.     CreateObject(972, 153.193848, 1757.340576, 16.637506, 0.0000, 0.0000, 259.4459);
  150.     CreateObject(972, 177.215698, 1725.839233, 16.637506, 0.0000, 0.0000, 210.5621);
  151.     CreateObject(972, 22.684059, 1681.651611, 16.637506, 0.0000, 0.0000, 0.0000);
  152.     CreateObject(3359, 101.222244, 1660.857422, 16.197004, 0.0000, 0.0000, 187.3573);
  153.     CreateObject(18609, 73.880928, 1746.545410, 17.813112, 0.0000, 0.0000, 112.5862);
  154.     CreateObject(18568, 39.873627, 1715.209229, 17.429632, 0.0000, 0.0000, 295.5422);
  155.     CreateObject(18566, 81.356895, 1745.770508, 17.522076, 0.0000, 0.0000, 0.0000);
  156.     CreateObject(18565, 122.414688, 1741.575439, 17.966715, 0.0000, 0.0000, 0.0000);
  157.     CreateObject(18568, 148.264603, 1724.807495, 17.429632, 0.0000, 0.0000, 51.5662);
  158.     CreateObject(18569, 155.915771, 1711.509399, 17.966715, 0.0000, 0.0000, 0.0000);
  159.     CreateObject(18609, 34.632095, 1695.398193, 17.813116, 0.0000, 0.0000, 0.0000);
  160.     CreateObject(16134, 173.035797, 1699.292114, 16.777035, 0.0000, 0.0000, 0.0000);
  161.     CreateObject(3263, 80.121109, 1719.358887, 16.640625, 0.0000, 0.0000, 214.8593);
  162.     CreateObject(3263, 137.558472, 1710.356567, 16.640625, 0.0000, 0.0000, 137.5099);
  163.     CreateObject(3262, 142.977234, 1691.322998, 16.640625, 0.0000, 0.0000, 128.9156);
  164.     CreateObject(3262, 55.059525, 1718.601563, 16.640625, 0.0000, 0.0000, 232.0480);
  165.     CreateObject(3264, 65.993904, 1717.296631, 16.646107, 0.0000, 0.0000, 180.4818);
  166.     CreateObject(3265, 49.128311, 1678.611328, 16.640625, 0.0000, 0.0000, 244.9395);
  167.     CreateObject(3462, 100.570862, 1659.667114, 17.817303, 0.0000, 0.0000, 266.4254);
  168.     CreateObject(17036, 133.677841, 1778.311035, 16.648151, 0.0000, 0.0000, 81.6465);
  169.  
  170.     AddStaticPickup(352, 1, 100.4487,1698.9833,17.6406); // Uzi gun
  171.     AddStaticPickup(372, 1, 103.9912,1706.3562,17.6406); // Tec 9 gun
  172.     AddStaticPickup(355, 1, 110.0566,1672.6910,17.5495); // ak47 gun
  173.     AddStaticPickup(356, 1, 119.0737,1673.7330,17.5554); // m4 gun
  174.     AddStaticPickup(351, 1, 82.6957,1669.4307,17.5870); // Spas 12 shotgun
  175.     AddStaticPickup(350, 1, 78.7932,1677.9425,17.6406); // sawn off shotgun
  176.     AddStaticPickup(361, 1, 100.1149,1662.3073,17.3289); // Flame THrower
  177.  
  178.     AddStaticPickup(1240, 1, 115.4408,1719.3175,17.6406); // health
  179.  
  180.     TextDrawCreate(187.000000,418.000000,"www.cod-saw.tk");
  181.     return 1;
  182. }
  183.  
  184. public OnFilterScriptExit()
  185. {
  186.     return 1;
  187. }
  188.  
  189. public OnPlayerRequestClass(playerid, classid)
  190. {
  191.     new string[128];
  192.     if (classid == 0)
  193.     {
  194.             format(string, sizeof(string), "~y~> ~p~Soldiers ~y~< ~n~Team!");
  195.             GameTextForPlayer(playerid,string,3500,6);
  196.     }
  197.     else if (classid == 1)
  198.     {
  199.             format(string, sizeof(string), "~y~> ~p~Soldiers ~y~< ~n~Team!");
  200.             GameTextForPlayer(playerid,string,3500,6);
  201.     }
  202.     else if (classid == 2)
  203.     {
  204.             format(string, sizeof(string), "~y~> ~p~Soldiers ~y~< ~n~Team(Premium Silver Only)!");
  205.             GameTextForPlayer(playerid,string,3500,6);
  206.     }
  207.     else if (classid == 3)
  208.     {
  209.             format(string, sizeof(string), "~y~> ~p~Soldiers ~y~< ~n~Team(Premium Gold Only)!");
  210.             GameTextForPlayer(playerid,string,3500,6);
  211.     }
  212.     else if (classid == 4)
  213.     {
  214.             format(string, sizeof(string), "~y~> ~p~Soldiers ~y~< ~n~Team(Admin Only)!");
  215.             GameTextForPlayer(playerid,string,3500,6);
  216.     }
  217.     else if (classid == 5)
  218.     {
  219.             format(string, sizeof(string), "~y~> ~p~Nazi Zombies ~y~< ~n~Team!");
  220.             GameTextForPlayer(playerid,string,3500,6);
  221.     }
  222.     else if (classid == 6)
  223.     {
  224.             format(string, sizeof(string), "~y~> ~p~Nazi Zombies ~y~< ~n~Team!");
  225.             GameTextForPlayer(playerid,string,3500,6);
  226.     }
  227.     else if (classid == 7)
  228.     {
  229.             format(string, sizeof(string), "~y~> ~p~Nazi Zombies ~y~< ~n~Team!");
  230.             GameTextForPlayer(playerid,string,3500,6);
  231.     }
  232.     else if (classid == 8)
  233.     {
  234.             format(string, sizeof(string), "~y~> ~p~Nazi Zombies ~y~< ~n~Team(Premium Silver Only)!");
  235.             GameTextForPlayer(playerid,string,3500,6);
  236.     }
  237.     else if (classid == 9)
  238.     {
  239.             format(string, sizeof(string), "~y~> ~p~Nazi Zombies ~y~< ~n~Team(Premium gold Only)!");
  240.             GameTextForPlayer(playerid,string,3500,6);
  241.     }
  242.     else if (classid == 10)
  243.     {
  244.             format(string, sizeof(string), "~y~> ~p~Nazi Zombies ~y~< ~n~Team(Admin Only)!");
  245.             GameTextForPlayer(playerid,string,3500,6);
  246.     }
  247.     SetPlayerPos(playerid, 34.6797,1748.0992,17.6406);
  248.     SetPlayerFacingAngle(playerid,55.1572);
  249.     SetPlayerCameraPos(playerid, 30.5591,1752.9990,17.6406);
  250.     SetPlayerCameraLookAt(playerid, 34.6797,1748.0992,17.6406);
  251.     return 1;
  252. }
  253.  
  254. public OnPlayerRequestSpawn(playerid)
  255. {
  256.     return 1;
  257. }
  258.  
  259. public OnPlayerConnect(playerid)
  260. {
  261.     SetWeather(09);
  262.     new playrname[MAX_PLAYER_NAME];
  263.     new connect[128];
  264.     GetPlayerName(playerid, playrname, sizeof(playrname));
  265.     format(connect, sizeof(connect), "%s.cer", playrname);
  266.     if(fexist(connect))
  267.     {
  268.         gPlayerAccount[playerid] = 1;
  269.         SendClientMessage(playerid, COLOR_YELLOW, "You are registered, please login with /login password");
  270.         return 1;
  271.     }
  272.     else
  273.     {
  274.         gPlayerAccount[playerid] = 0;
  275.         SendClientMessage(playerid, COLOR_YELLOW, "You are new here or not registered, please register with /register password");
  276.     }
  277.     new string[64];
  278.     new playername[MAX_PLAYER_NAME];
  279.     GetPlayerName(playerid, playername, sizeof(playername));
  280.     format(string, sizeof(string), "Welcome to Nazi Zombies %s.",playername);
  281.     SendClientMessage(playerid, COLOR_GREEN,string);
  282.  
  283.     LastMoney[playerid] = 0;
  284.     Soldiersteam[playerid] = 0;
  285.     Zombiesteam[playerid] = 0;
  286.     CurrentMoney[playerid] = 0;
  287.     PlayerInfo[playerid][pAdmin] = 0;
  288.     PlayerInfo[playerid][pPremium] = 0;
  289.     PlayerInfo[playerid][pSaw] = 0;
  290.     PlayerInfo[playerid][pDeaths] = 0;
  291.     PlayerInfo[playerid][pKills] = 0;
  292.     PlayerInfo[playerid][pExp] = 0;
  293.     PlayerInfo[playerid][pRank] = 0;
  294.     PlayerInfo[playerid][pJuggernaut] = 0;
  295.     PlayerInfo[playerid][pFrag] = 0;
  296.     PlayerInfo[playerid][pOverkill] = 0;
  297.     PlayerInfo[playerid][pCash] = 0;
  298.     return 1;
  299. }
  300.  
  301. public OnPlayerDisconnect(playerid, reason)
  302. {
  303.     OnPlayerUpdate(playerid);
  304.     gPlayerLogged[playerid] = 0;
  305.     return 1;
  306. }
  307.  
  308. public OnPlayerSpawn(playerid)
  309. {
  310.     if (gPlayerLogged[playerid] == 0)
  311.     {
  312.     SendClientMessage(playerid, COLOR_RED, "   Please log in before spawn!!!");
  313.     Kick(playerid);
  314.     return 1;
  315.     }
  316.     if (PlayerInfo[playerid][pFrag] == 1)
  317.     {
  318.     SendClientMessage(playerid,COLOR_YELLOW,"Fragx3 Perk Activated.");
  319.     GivePlayerWeapon(playerid,16,3);
  320.     }
  321.     if (PlayerInfo[playerid][pOverkill] == 1)
  322.     {
  323.     SendClientMessage(playerid,COLOR_YELLOW,"Overkill Perk Activated.");
  324.     GivePlayerWeapon(playerid,29,150);
  325.     }
  326.     if (PlayerInfo[playerid][pJuggernaut] == 1)
  327.     {
  328.     SendClientMessage(playerid,COLOR_YELLOW,"Juggernaut Perk Activated.");
  329.     SetPlayerArmour(playerid,100);
  330.     }
  331.     new skin = GetPlayerSkin(playerid);
  332.     if (skin == 285 && PlayerInfo[playerid][pAdmin] == 0)
  333.     {
  334.     SendClientMessage(playerid,COLOR_RED,"Im sorry, that is a admin skin and your not a Admin");
  335.     SendClientMessage(playerid,COLOR_GREY,"SYSTEM: Skin Changed!!");
  336.     SetPlayerSkin(playerid,287);
  337.     TogglePlayerControllable(playerid,1);
  338.     }
  339.     if (skin == 286 && PlayerInfo[playerid][pPremium] == 0)
  340.     {
  341.     SendClientMessage(playerid,COLOR_RED,"Im sorry, that is a Premium silver skin and your not a Premium silver member");
  342.     SendClientMessage(playerid,COLOR_GREY,"SYSTEM: Skin Changed!!");
  343.     SetPlayerSkin(playerid,287);
  344.     TogglePlayerControllable(playerid,1);
  345.     }
  346.     if (skin ==164 && PlayerInfo[playerid][pPremium] <= 1)
  347.     {
  348.     SendClientMessage(playerid,COLOR_RED,"Im sorry, that is a Premium gold skin and your not a Premium gold member");
  349.     SendClientMessage(playerid,COLOR_GREY,"SYSTEM: Skin Changed!!");
  350.     SetPlayerSkin(playerid,287);
  351.     TogglePlayerControllable(playerid,1);
  352.     }
  353.     if (skin ==128 && PlayerInfo[playerid][pPremium] == 0)
  354.     {
  355.     SendClientMessage(playerid,COLOR_RED,"Im sorry, that is a Premium silver skin and your not a Premium silver member");
  356.     SendClientMessage(playerid,COLOR_GREY,"SYSTEM: Skin Changed!!");
  357.     SetPlayerSkin(playerid,137);
  358.     TogglePlayerControllable(playerid,1);
  359.     }
  360.     if (skin ==162 && PlayerInfo[playerid][pPremium] <= 1)
  361.     {
  362.     SendClientMessage(playerid,COLOR_RED,"Im sorry, that is a Premium gold skin and your not a Premium gold member");
  363.     SendClientMessage(playerid,COLOR_GREY,"SYSTEM: Skin Changed!!");
  364.     SetPlayerSkin(playerid,137);
  365.     TogglePlayerControllable(playerid,1);
  366.     }
  367.     if (skin == 186 && PlayerInfo[playerid][pAdmin] == 0)
  368.     {
  369.     SendClientMessage(playerid,COLOR_RED,"Im sorry, that is a admin skin and your not a Admin");
  370.     SendClientMessage(playerid,COLOR_GREY,"SYSTEM: Skin Changed!!");
  371.     SetPlayerSkin(playerid,137);
  372.     TogglePlayerControllable(playerid,1);
  373.     }
  374.     if (skin == 287 || skin == 121 || skin == 285 || skin == 286 || skin == 164) // Soldier
  375.     {
  376.     Soldiersteam[playerid] = 1;
  377.     Zombiesteam[playerid] = 0;
  378.     SetPlayerWorldBounds(playerid, 151.5469, 46.8380, 1728.8034, 1651.3818);
  379.     SetPlayerColor(playerid,COLOR_GREEN);
  380.     }
  381.     else if (skin == 137 || skin == 230 || skin == 167 || skin == 78 || skin == 162 || skin == 128) // zombies
  382.     {
  383.     Zombiesteam[playerid] = 1;
  384.     Soldiersteam[playerid] = 0;
  385.     SetPlayerWorldBounds( playerid, 10000.0, -10000.0,  10000.0, -10000.0 );
  386.     SetPlayerColor(playerid,COLOR_RED);
  387.     }
  388.     return 1;
  389. }
  390.  
  391. public OnPlayerDeath(playerid, killerid, reason)
  392. {
  393.     if (Soldiersteam[playerid] == 1 && reason == 54)
  394.     {
  395.     SendClientMessage(playerid, COLOR_RED, "You have lost 1000 Dollars for Suspected suicide, if ");
  396.     SendClientMessage(playerid, COLOR_RED, "this is a error in the Script, please report this to ");
  397.     SendClientMessage(playerid, COLOR_RED, "the forums (www.cod-saw.tk)    ");
  398.     GivePlayerMoney(playerid,-1000);
  399.     }
  400.  
  401.     if (Soldiersteam[playerid] == 1 && Soldiersteam[killerid] == 1) // soldiers Team Kill
  402.     {
  403.     SendClientMessage(killerid, COLOR_RED, "Do not Team Kill (-1000 Money)");
  404.     GivePlayerMoney(killerid,-1000);
  405.     }
  406.     if (Zombiesteam[playerid] == 1 && Zombiesteam[killerid] == 1) // Zombies Team Kill
  407.     {
  408.     SendClientMessage(killerid, COLOR_RED, "Do not Team Kill");
  409.     GivePlayerMoney(killerid,-1000);
  410.     }
  411.     if (Zombiesteam[playerid] == 0 && Zombiesteam[killerid] == 1) //Zombie kill Soldier
  412.     {
  413.     PlayerInfo[killerid][pExp] += 15;
  414.     PlayerInfo[playerid][pDeaths] += 1;
  415.     PlayerInfo[killerid][pKills] = PlayerInfo[killerid][pKills] + 1;
  416.     SendClientMessage(killerid,COLOR_RED," You got 750$ for the kill and 15 EXP.");
  417.     GivePlayerMoney(killerid,750);
  418.     }
  419.     if (Zombiesteam[playerid] == 1 && Zombiesteam[killerid] == 0) // Soldier Kill Zombie
  420.     {
  421.     PlayerInfo[killerid][pExp] += 10;
  422.     PlayerInfo[playerid][pDeaths] += 1;
  423.     PlayerInfo[killerid][pKills] = PlayerInfo[killerid][pKills] + 1;
  424.     SendClientMessage(killerid,COLOR_RED," You got 500$ for the kill and 10 EXP.");
  425.     GivePlayerMoney(killerid,500);
  426.     }
  427.     return 1;
  428. }
  429.  
  430. public OnPlayerCommandText(playerid, cmdtext[])
  431. {
  432.     new cmd[256];
  433.     new idx;
  434.     cmd = strtok(cmdtext, idx);
  435.     new tmp[256];
  436.     new playername[MAX_PLAYER_NAME];
  437.     if (strcmp(cmd, "/login", true) ==0 )
  438.     {
  439.         if(IsPlayerConnected(playerid))
  440.         {
  441.             new tmppass[64];
  442.             if(gPlayerLogged[playerid] == 1)
  443.             {
  444.                 SendClientMessage(playerid, COLOR_GREY, "   You are already logged in.");
  445.                 return 1;
  446.             }
  447.             tmp = strtok(cmdtext, idx);
  448.             if(!strlen(tmp))
  449.             {
  450.                 SendClientMessage(playerid, COLOR_GREY, "   USAGE: /login [password]");
  451.                 return 1;
  452.             }
  453.             strmid(tmppass, tmp, 0, strlen(cmdtext), 255);
  454.             Encrypt(tmppass);
  455.             OnPlayerLogin(playerid,tmppass);
  456.         }
  457.         return 1;
  458.     }
  459.     if (strcmp("/commands", cmdtext, true, 10) == 0)
  460.     {
  461.         SendClientMessage(playerid, COLOR_LIGHTBLUE, "Account: /register, /login, /stats, /local, /help, /goals /ah");
  462.         SendClientMessage(playerid, COLOR_LIGHTBLUE, "Account: /buygun (inside Huts for Soldier), /perks, /heal /ch");
  463.         return 1;
  464.     }
  465.     if (strcmp("/goals", cmdtext, true, 10) == 0)
  466.     {
  467.         SendClientMessage(playerid, COLOR_YELLOW, "*_- Unlockables throughout this server -_*");
  468.         SendClientMessage(playerid, COLOR_YELLOW, "");
  469.         SendClientMessage(playerid, COLOR_YELLOW, "");
  470.         return 1;
  471.     }
  472.     if (strcmp("/ah", cmdtext, true, 10) == 0)
  473.     {
  474.         SendClientMessage(playerid, COLOR_GRAD1, "Level 1 Admin: /check, /kick");
  475.         SendClientMessage(playerid, COLOR_GRAD1, "Level 2 Admin: /Money, /givemoeny");
  476.         SendClientMessage(playerid, COLOR_GRAD1, "Level 3 Admin: /makesaw, /veh");
  477.         SendClientMessage(playerid, COLOR_GRAD1, "Level 4 Admin: /makeadmin");
  478.         return 1;
  479.     }
  480.     if (strcmp("/ch", cmdtext, true, 10) == 0)
  481.     {
  482.         SendClientMessage(playerid, COLOR_GRAD1, "Level 1 Saw Member: ");
  483.         SendClientMessage(playerid, COLOR_GRAD1, "Level 2 Saw Member: ");
  484.         SendClientMessage(playerid, COLOR_GRAD1, "Level 3 Saw Member: /makesaw");
  485.         SendClientMessage(playerid, COLOR_GRAD1, "Level 4 Saw Member: ");
  486.         SendClientMessage(playerid, COLOR_GRAD1, "Level 5 Saw Member: ");
  487.         return 1;
  488.     }
  489.     if(strcmp(cmdtext, "/perks", true) == 0)
  490.     {
  491.         ShowMenuForPlayer(perk, playerid);
  492.         return 1;
  493.     }
  494.     if (strcmp("/help", cmdtext, true, 10) == 0)
  495.     {
  496.         SendClientMessage(playerid, COLOR_GREEN, "This gamemode is Nazi Zombies, The idea was taken from Call of Duty");
  497.         SendClientMessage(playerid, COLOR_GREEN, "World At War. On this gamemode you need to choose a Side, Either Zombies");
  498.         SendClientMessage(playerid, COLOR_GREEN, "Or soldiers, The zombies need to invade the Soldiers building and kill");
  499.         SendClientMessage(playerid, COLOR_GREEN, "all of the soldiers and get 100 points to win. The soldiers win by surviveing");
  500.         SendClientMessage(playerid, COLOR_GREEN, "15 minutes without letting the zombies get 100 points (10 points every");
  501.         SendClientMessage(playerid, COLOR_GREEN, "time a zombie kills a soldier)      Use /commands to see your commands.");
  502.         return 1;
  503.     }
  504. //----------------------------------[Local]-----------------------------------------------
  505.     if(strcmp(cmd, "/local", true) == 0 || strcmp(cmd, "/l", true) == 0 || strcmp(cmd, "/say", true) == 0)
  506.     {
  507.         if(IsPlayerConnected(playerid))
  508.         {
  509.             new string[256];
  510.             new sendername[MAX_PLAYER_NAME];
  511.             GetPlayerName(playerid, sendername, sizeof(sendername));
  512.             if(gPlayerLogged[playerid] == 0)
  513.             {
  514.                 SendClientMessage(playerid, COLOR_GREY, "   You havent logged in yet !");
  515.                 return 1;
  516.             }
  517.             GetPlayerName(playerid, sendername, sizeof(sendername));
  518.             new length = strlen(cmdtext);
  519.             while ((idx < length) && (cmdtext[idx] <= ' '))
  520.             {
  521.                 idx++;
  522.             }
  523.             new offset = idx;
  524.             new result[64];
  525.             while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
  526.             {
  527.                 result[idx - offset] = cmdtext[idx];
  528.                 idx++;
  529.             }
  530.             result[idx - offset] = EOS;
  531.             if(!strlen(result))
  532.             {
  533.                 SendClientMessage(playerid, COLOR_GRAD2, "USAGE: (/l)ocal [local chat]");
  534.                 return 1;
  535.             }
  536.             format(string, sizeof(string), "%s Says(local): %s", sendername, result);
  537.             ProxDetector(10.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
  538.             printf("%s", string);
  539.         }
  540.         return 1;
  541.     }
  542.     if (strcmp(cmd, "/register", true)==0)
  543.     {
  544.         new string[265];
  545.         tmp = strtok(cmdtext, idx);
  546.         if(!strlen(tmp))
  547.         {
  548.             SendClientMessage(playerid, COLOR_GREY, "USAGE: /register [password]");
  549.             return 1;
  550.         }
  551.         if (gPlayerAccount[playerid] == 1)
  552.         {
  553.             SendClientMessage(playerid, COLOR_GREY, "   That name is already registered");
  554.             return 1;
  555.         }
  556.  
  557.         strmid(PlayerInfo[playerid][pPassword], tmp, 0, strlen(cmdtext), 255);
  558.         Encrypt(PlayerInfo[playerid][pPassword]);
  559.         GetPlayerName(playerid, playername, sizeof(playername));
  560.         format(string, sizeof(string), "%s.cer", playername);
  561.         new File: file = fopen(string, io_read);
  562.         if (file)
  563.         {
  564.             SendClientMessage(playerid, COLOR_GREY, "   That name is already registered");
  565.             fclose(file);
  566.             return 1;
  567.         }
  568.         new File:hFile;
  569.         hFile = fopen(string, io_append);
  570.         new var[32];//
  571.         format(var, 32, "%s\n", PlayerInfo[playerid][pPassword]);fwrite(hFile, var);
  572.         format(var, 32, "Rank=%d\n",PlayerInfo[playerid][pRank]);fwrite(hFile, var);
  573.         format(var, 32, "Exp=%d\n",PlayerInfo[playerid][pExp]);fwrite(hFile, var);
  574.         format(var, 32, "Kills=%d\n",PlayerInfo[playerid][pKills]);fwrite(hFile, var);
  575.         format(var, 32, "Deaths=%d\n",PlayerInfo[playerid][pDeaths]);fwrite(hFile, var);
  576.         format(var, 32, "Juggernaut=%d\n",PlayerInfo[playerid][pJuggernaut]);fwrite(hFile, var);
  577.         format(var, 32, "Overkill=%d\n",PlayerInfo[playerid][pOverkill]);fwrite(hFile, var);
  578.         format(var, 32, "Frag=%d\n",PlayerInfo[playerid][pFrag]);fwrite(hFile, var);
  579.         format(var, 32, "Admin=%d\n",PlayerInfo[playerid][pAdmin]);fwrite(hFile, var);
  580.         format(var, 32, "Premium=%d\n",PlayerInfo[playerid][pPremium]);fwrite(hFile, var);
  581.         format(var, 32, "SAW=%d\n",PlayerInfo[playerid][pSaw]);fwrite(hFile, var);
  582.         format(var, 32, "Money=%d\n",PlayerInfo[playerid][pCash]);fwrite(hFile, var);
  583.         fclose(hFile);
  584.         SendClientMessage(playerid, COLOR_WHITE, "Succesfully Registered!");
  585.         SendClientMessage(playerid, COLOR_WHITE, "Next time you connect, type /login <password> to log in.");
  586.         OnPlayerLogin(playerid,PlayerInfo[playerid][pPassword]);
  587.         return 1;
  588.     }
  589.     if (strcmp(cmd, "/stats", true) == 0)
  590.     {
  591.         if(IsPlayerConnected(playerid))
  592.         {
  593.             if (gPlayerLogged[playerid] != 0)
  594.             {
  595.                 ShowStats(playerid,playerid);
  596.             }
  597.             else
  598.             {
  599.                 SendClientMessage(playerid, COLOR_GRAD1, "   You are not Logged in !");
  600.             }
  601.         }
  602.         return 1;
  603.     }
  604.     if (strcmp(cmd, "/buygun", true) == 0)
  605.     {
  606.         if(IsPlayerConnected(playerid))
  607.         {
  608.             new money = GetPlayerMoney(playerid);
  609.             if (PlayerToPoint(2.0,playerid,100.4487,1698.9833,17.6406) && money >= 999 && Soldiersteam[playerid] == 1) // UZI gun
  610.             {
  611.             SendClientMessage(playerid, COLOR_GRAD1, "You just bought the Uzi");
  612.             GivePlayerWeapon(playerid,28,300);
  613.             GivePlayerMoney(playerid,-1000);
  614.             }
  615.             else if (PlayerToPoint(2.0,playerid,103.9912,1706.3562,17.6406) && money >=499 && Soldiersteam[playerid] == 1) // tec 9 gun
  616.             {
  617.             SendClientMessage(playerid, COLOR_GRAD1, "You just bought the Tec 9");
  618.             GivePlayerWeapon(playerid,32,300);
  619.             GivePlayerMoney(playerid,-500);
  620.             }
  621.             else if (PlayerToPoint(2.0,playerid,110.0566,1672.6910,17.5495) && money >=1499 && Soldiersteam[playerid] == 1) // ak47 gun
  622.             {
  623.             SendClientMessage(playerid, COLOR_GRAD1, "You just bought the ak47");
  624.             GivePlayerWeapon(playerid,30,500);
  625.             GivePlayerMoney(playerid,-1500);
  626.             }
  627.             else if (PlayerToPoint(2.0,playerid,119.0737,1673.7330,17.5554) && money >=2499 && Soldiersteam[playerid] == 1) // m4 gun
  628.             {
  629.             SendClientMessage(playerid, COLOR_GRAD1, "You just bought the m4");
  630.             GivePlayerWeapon(playerid,31,500);
  631.             GivePlayerMoney(playerid,-2000);
  632.             }
  633.             else if (PlayerToPoint(2.0,playerid,82.6957,1669.4307,17.5870) && money >=2999 && Soldiersteam[playerid] == 1) // spas12 gun
  634.             {
  635.             SendClientMessage(playerid, COLOR_GRAD1, "You just bought the spas12 Shotgun");
  636.             GivePlayerWeapon(playerid,27,150);
  637.             GivePlayerMoney(playerid,-3000);
  638.             }
  639.             else if (PlayerToPoint(2.0,playerid,78.7932,1677.9425,17.6406) && money >=3499 && Soldiersteam[playerid] == 1) // sawn off shotgu gun
  640.             {
  641.             SendClientMessage(playerid, COLOR_GRAD1, "You just bought the Sawn Off Shotgun");
  642.             GivePlayerWeapon(playerid,26,300);
  643.             GivePlayerMoney(playerid,-3500);
  644.             }
  645.             else if (PlayerToPoint(2.0,playerid,100.1149,1662.3073,17.3289) && money >=4999 && Soldiersteam[playerid] == 1) // sawn off shotgu gun
  646.             {
  647.             SendClientMessage(playerid, COLOR_GRAD1, "You just payed 5000 Dollars for the Flame Thrower");
  648.             GivePlayerWeapon(playerid, 37,350);
  649.             GivePlayerMoney(playerid,-5000);
  650.             }
  651.         }
  652.         return 1;
  653.     }
  654.     if (strcmp(cmd, "/heal", true) == 0)
  655.     {
  656.         if(IsPlayerConnected(playerid))
  657.         {
  658.             new money = GetPlayerMoney(playerid);
  659.             if (PlayerToPoint(2.0,playerid,115.4408,1719.3175,17.6406) && money >= 999 && Soldiersteam[playerid] == 1) // health
  660.             {
  661.             SendClientMessage(playerid, COLOR_GRAD1, "You just got full Health back (-2500 Dollars)");
  662.             SetPlayerHealth(playerid,100);
  663.             GivePlayerMoney(playerid,-2500);
  664.             }
  665.         }
  666.         return 1;
  667.     }
  668. //-------------------------------[Check]--------------------------------------------------------------------------
  669.     if (strcmp(cmd, "/check", true) == 0)
  670.     {
  671.         if(IsPlayerConnected(playerid))
  672.         {
  673.             new giveplayerid;
  674.             if (PlayerInfo[playerid][pAdmin] >= 1)
  675.             {
  676.                 tmp = strtok(cmdtext, idx);
  677.                 if(!strlen(tmp))
  678.                 {
  679.                     SendClientMessage(playerid, COLOR_GRAD1, "USAGE: /check [playerid/PartOfName]");
  680.                     return 1;
  681.                 }
  682.                 //giveplayerid = strval(tmp);
  683.                 giveplayerid = ReturnUser(tmp);
  684.                 if(IsPlayerConnected(giveplayerid))
  685.                 {
  686.                     if(giveplayerid != INVALID_PLAYER_ID)
  687.                     {
  688.                         ShowStats(playerid,giveplayerid);
  689.                     }
  690.                 }
  691.                 else
  692.                 {
  693.                     SendClientMessage(playerid, COLOR_GRAD1, "   No Such Player");
  694.                 }
  695.             }
  696.             else
  697.             {
  698.                 SendClientMessage(playerid, COLOR_GRAD1, "   You are not an admin");
  699.             }
  700.         }
  701.         return 1;
  702.     }
  703.     if(strcmp(cmd, "/veh", true) == 0)
  704.     {
  705.         if(IsPlayerConnected(playerid))
  706.         {
  707.             if (PlayerInfo[playerid][pAdmin] < 3)
  708.             {
  709.                 SendClientMessage(playerid, COLOR_GRAD1, "   you are not authorized to use that command!");
  710.                 return 1;
  711.             }
  712.             tmp = strtok(cmdtext, idx);
  713.             if(!strlen(tmp))
  714.             {
  715.                 SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /veh [carid] [color1] [color2]");
  716.                 return 1;
  717.             }
  718.             new car;
  719.             car = strval(tmp);
  720.             if(car < 400 || car > 611) { SendClientMessage(playerid, COLOR_GREY, "   Vehicle Number can't be below 400 or above 611 !"); return 1; }
  721.             tmp = strtok(cmdtext, idx);
  722.             if(!strlen(tmp))
  723.             {
  724.                 SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /veh [carid] [color1] [color2]");
  725.                 return 1;
  726.             }
  727.             new color1;
  728.             color1 = strval(tmp);
  729.             if(color1 < 0 || color1 > 126) { SendClientMessage(playerid, COLOR_GREY, "   Color Number can't be below 0 or above 126 !"); return 1; }
  730.             tmp = strtok(cmdtext, idx);
  731.             if(!strlen(tmp))
  732.             {
  733.                 SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /veh [carid] [color1] [color2]");
  734.                 return 1;
  735.             }
  736.             new color2;
  737.             color2 = strval(tmp);
  738.             if(color2 < 0 || color2 > 126) { SendClientMessage(playerid, COLOR_GREY, "   Color Number can't be below 0 or above 126 !"); return 1; }
  739.             new Float:X,Float:Y,Float:Z;
  740.             GetPlayerPos(playerid, X,Y,Z);
  741.             new carid = CreateVehicle(car, X,Y,Z, 0.0, color1, color2, 60000);
  742.             CreatedCars[CreatedCar] = carid;
  743.             CreatedCar ++;
  744.             new string[256];
  745.             format(string, sizeof(string), "   Vehicle %d spawned.", carid);
  746.             SendClientMessage(playerid, COLOR_GREY, string);
  747.         }
  748.         return 1;
  749.     }
  750. //----------------------------------[Kick]------------------------------------------------
  751.     if(strcmp(cmd, "/kick", true) == 0)
  752.     {
  753.         new string[256];
  754.         new giveplayerid;
  755.         new giveplayer[MAX_PLAYER_NAME];
  756.         new sendername[MAX_PLAYER_NAME];
  757.         GetPlayerName(playerid, sendername, sizeof(sendername));
  758.         if(IsPlayerConnected(playerid))
  759.         {
  760.             tmp = strtok(cmdtext, idx);
  761.             if(!strlen(tmp))
  762.             {
  763.                 SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /kick [playerid/PartOfName] [reason]");
  764.                 return 1;
  765.             }
  766.             giveplayerid = ReturnUser(tmp);
  767.             if (PlayerInfo[playerid][pAdmin] >= 1)
  768.             {
  769.                 if(IsPlayerConnected(giveplayerid))
  770.                 {
  771.                     if(giveplayerid != INVALID_PLAYER_ID)
  772.                     {
  773.                         GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
  774.                         GetPlayerName(playerid, sendername, sizeof(sendername));
  775.                         new length = strlen(cmdtext);
  776.                         while ((idx < length) && (cmdtext[idx] <= ' '))
  777.                         {
  778.                             idx++;
  779.                         }
  780.                         new offset = idx;
  781.                         new result[64];
  782.                         while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
  783.                         {
  784.                             result[idx - offset] = cmdtext[idx];
  785.                             idx++;
  786.                         }
  787.                         result[idx - offset] = EOS;
  788.                         if(!strlen(result))
  789.                         {
  790.                             SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /kick [playerid/PartOfName] [reason]");
  791.                             return 1;
  792.                         }
  793.                         Kick(giveplayerid);
  794.                         format(string, sizeof(string), "AdmCmd: %s was kicked by %s, reason: %s", giveplayer, sendername, (result));
  795.                         SendClientMessageToAll(COLOR_LIGHTRED, string);
  796.                         return 1;
  797.                     }
  798.                 }
  799.             }
  800.             else
  801.             {
  802.                 format(string, sizeof(string), "   %d is not an active player.", giveplayerid);
  803.                 SendClientMessage(playerid, COLOR_GRAD1, string);
  804.             }
  805.         }
  806.         return 1;
  807.     }
  808. //----------------------------------[MAKEADMIN]------------------------------------------------
  809.     if(strcmp(cmd, "/makeadmin", true) == 0)
  810.     {
  811.         if(IsPlayerConnected(playerid))
  812.         {
  813.             new string[256];
  814.             new giveplayer[MAX_PLAYER_NAME];
  815.             new sendername[MAX_PLAYER_NAME];
  816.             GetPlayerName(playerid, sendername, sizeof(sendername));
  817.             tmp = strtok(cmdtext, idx);
  818.             if(!strlen(tmp))
  819.             {
  820.                 SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /makeadmin [playerid/PartOfName] [level(1-3)]");
  821.                 return 1;
  822.             }
  823.             new para1;
  824.             new level;
  825.             para1 = ReturnUser(tmp);
  826.             tmp = strtok(cmdtext, idx);
  827.             level = strval(tmp);
  828.             if (PlayerInfo[playerid][pAdmin] >= 4)
  829.             {
  830.                 if(IsPlayerConnected(para1))
  831.                 {
  832.                     if(para1 != INVALID_PLAYER_ID)
  833.                     {
  834.                         GetPlayerName(para1, giveplayer, sizeof(giveplayer));
  835.                         GetPlayerName(playerid, sendername, sizeof(sendername));
  836.                         PlayerInfo[para1][pAdmin] = level;
  837.                         printf("AdmCmd: %s has promoted %s to a level %d admin.", sendername, giveplayer, level);
  838.                         format(string, sizeof(string), "   You have been promoted to a level %d admin by %s", level, sendername);
  839.                         SendClientMessage(para1, COLOR_LIGHTBLUE, string);
  840.                         format(string, sizeof(string), "   You have promoted %s to a level %d admin.", giveplayer,level);
  841.                         SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
  842.                     }
  843.                 }
  844.             }
  845.             else
  846.             {
  847.                 SendClientMessage(playerid, COLOR_GRAD1, "   you are not authorized to use that command!");
  848.             }
  849.         }
  850.         return 1;
  851.     }
  852. //----------------------------------[MAKEprem]------------------------------------------------
  853.     if(strcmp(cmd, "/makeprem", true) == 0)
  854.     {
  855.         if(IsPlayerConnected(playerid))
  856.         {
  857.             new string[256];
  858.             new giveplayer[MAX_PLAYER_NAME];
  859.             new sendername[MAX_PLAYER_NAME];
  860.             GetPlayerName(playerid, sendername, sizeof(sendername));
  861.             tmp = strtok(cmdtext, idx);
  862.             if(!strlen(tmp))
  863.             {
  864.                 SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /makeprem [playerid/PartOfName] [level(1-3)]");
  865.                 return 1;
  866.             }
  867.             new para1;
  868.             new level;
  869.             para1 = ReturnUser(tmp);
  870.             tmp = strtok(cmdtext, idx);
  871.             level = strval(tmp);
  872.             if (PlayerInfo[playerid][pAdmin] >= 4)
  873.             {
  874.                 if(IsPlayerConnected(para1))
  875.                 {
  876.                     if(para1 != INVALID_PLAYER_ID)
  877.                     {
  878.                         GetPlayerName(para1, giveplayer, sizeof(giveplayer));
  879.                         GetPlayerName(playerid, sendername, sizeof(sendername));
  880.                         PlayerInfo[para1][pPremium] = level;
  881.                         printf("AdmCmd: %s has Given %s Level %d Premium level.", sendername, giveplayer, level);
  882.                         format(string, sizeof(string), "   You have been give level %d Premium by %s", level, sendername);
  883.                         SendClientMessage(para1, COLOR_LIGHTBLUE, string);
  884.                         format(string, sizeof(string), "   You have given %s level %d Premium.", giveplayer,level);
  885.                         SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
  886.                     }
  887.                 }
  888.             }
  889.             else
  890.             {
  891.                 SendClientMessage(playerid, COLOR_GRAD1, "   you are not authorized to use that command!");
  892.             }
  893.         }
  894.         return 1;
  895.     }
  896. //----------------------------------[MAKESAW]------------------------------------------------
  897.     if(strcmp(cmd, "/makesaw", true) == 0)
  898.     {
  899.         if(IsPlayerConnected(playerid))
  900.         {
  901.             new string[256];
  902.             new giveplayer[MAX_PLAYER_NAME];
  903.             new sendername[MAX_PLAYER_NAME];
  904.             GetPlayerName(playerid, sendername, sizeof(sendername));
  905.             tmp = strtok(cmdtext, idx);
  906.             if(!strlen(tmp))
  907.             {
  908.                 SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /makeadmin [playerid/PartOfName] [level(1-3)]");
  909.                 return 1;
  910.             }
  911.             new para1;
  912.             new level;
  913.             para1 = ReturnUser(tmp);
  914.             tmp = strtok(cmdtext, idx);
  915.             level = strval(tmp);
  916.             if (PlayerInfo[playerid][pAdmin] >= 3 ||  PlayerInfo[playerid][pSaw] >= 3 )
  917.             {
  918.                 if(IsPlayerConnected(para1))
  919.                 {
  920.                     if(para1 != INVALID_PLAYER_ID)
  921.                     {
  922.                         GetPlayerName(para1, giveplayer, sizeof(giveplayer));
  923.                         GetPlayerName(playerid, sendername, sizeof(sendername));
  924.                         PlayerInfo[para1][pSaw] = level;
  925.                         printf("AdmCmd/ClanCmd: %s has given %s level %d Saw Member In the Server.", sendername, giveplayer, level);
  926.                         format(string, sizeof(string), "   You have been given rank %d Saw Member by %s", level, sendername);
  927.                         SendClientMessage(para1, COLOR_LIGHTBLUE, string);
  928.                         format(string, sizeof(string), "   You have promoted %s to a level %d Saw member.", giveplayer,level);
  929.                         SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
  930.                     }
  931.                 }
  932.             }
  933.             else
  934.             {
  935.                 SendClientMessage(playerid, COLOR_GRAD1, "   you are not authorized to use that command!");
  936.             }
  937.         }
  938.         return 1;
  939.     }
  940. //----------------------------------[Money]------------------------------------------------
  941.     if(strcmp(cmd, "/money", true) == 0)
  942.     {
  943.         if(IsPlayerConnected(playerid))
  944.         {
  945.             tmp = strtok(cmdtext, idx);
  946.             if(!strlen(tmp))
  947.             {
  948.                 SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /money [playerid/PartOfName] [money]");
  949.                 return 1;
  950.             }
  951.             new playa;
  952.             new money;
  953.             playa = ReturnUser(tmp);
  954.             tmp = strtok(cmdtext, idx);
  955.             money = strval(tmp);
  956.             if (PlayerInfo[playerid][pAdmin] >= 2)
  957.             {
  958.                 if(IsPlayerConnected(playa))
  959.                 {
  960.                     if(playa != INVALID_PLAYER_ID)
  961.                     {
  962.                         ResetPlayerMoney(playa);
  963.                         GivePlayerMoney(playa, money);
  964.                     }
  965.                 }
  966.             }
  967.             else
  968.             {
  969.                 SendClientMessage(playerid, COLOR_GRAD1, "   you are not authorized to use that command!");
  970.             }
  971.         }
  972.         return 1;
  973.     }
  974. //----------------------------------[GiveMoney]------------------------------------------------
  975.     if(strcmp(cmd, "/givemoney", true) == 0)
  976.     {
  977.         if(IsPlayerConnected(playerid))
  978.         {
  979.             tmp = strtok(cmdtext, idx);
  980.             if(!strlen(tmp))
  981.             {
  982.                 SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /givemoney [playerid/PartOfName] [money]");
  983.                 return 1;
  984.             }
  985.             new playa;
  986.             new money;
  987.             playa = ReturnUser(tmp);
  988.             tmp = strtok(cmdtext, idx);
  989.             money = strval(tmp);
  990.             if (PlayerInfo[playerid][pAdmin] >= 2)
  991.             {
  992.                 if(IsPlayerConnected(playa))
  993.                 {
  994.                     if(playa != INVALID_PLAYER_ID)
  995.                     {
  996.                         GivePlayerMoney(playa, money);
  997.                     }
  998.                 }
  999.             }
  1000.             else
  1001.             {
  1002.                 SendClientMessage(playerid, COLOR_GRAD1, "   you are not authorized to use that command!");
  1003.             }
  1004.         }
  1005.         return 1;
  1006.     }
  1007.     if (strcmp(cmd, "/admins", true) == 0)
  1008.     {
  1009.         if(IsPlayerConnected(playerid))
  1010.         {
  1011.             SendClientMessage(playerid, COLOR_LIGHTBLUE, "Admins Online Right Now:");
  1012.             for(new i = 0; i < MAX_PLAYERS; i++)
  1013.             {
  1014.             new rrank = PlayerInfo[i][pAdmin];
  1015.             if(IsPlayerConnected(i))
  1016.                 {
  1017.                     new string[256];
  1018.                     new sendername[MAX_PLAYER_NAME];
  1019.                     GetPlayerName(playerid, sendername, sizeof(sendername));
  1020.                     if(PlayerInfo[i][pAdmin] >= 1 && PlayerInfo[i][pAdmin] < 1338)
  1021.                     {
  1022.                         GetPlayerName(i, sendername, sizeof(sendername));
  1023.                         format(string, 256, "Admin: %s (Rank: %d)", sendername,rrank);
  1024.                         SendClientMessage(playerid, COLOR_GREEN, string);
  1025.                     }
  1026.                 }
  1027.             }
  1028.         }
  1029.         return 1;
  1030.     }
  1031.     return 0;
  1032. }
  1033.  
  1034. public Encrypt(string[])
  1035. {
  1036.     for(new x=0; x < strlen(string); x++)
  1037.       {
  1038.           string[x] += (3^x) * (x % 15);
  1039.           if(string[x] > (0xff))
  1040.           {
  1041.               string[x] -= 64;
  1042.           }
  1043.       }
  1044.     return 1;
  1045. }
  1046.  
  1047. public OnPlayerSelectedMenuRow(playerid, row)
  1048. {
  1049.     new Menu:CurrentMenu = GetPlayerMenu(playerid);
  1050.     if(CurrentMenu == perk)
  1051.     {
  1052.         new money = GetPlayerMoney(playerid);
  1053.         switch(row)
  1054.         {
  1055.             case 0:
  1056.             {
  1057.             if (money >=100000)
  1058.             {
  1059.             GivePlayerMoney(playerid, -100000);
  1060.             PlayerInfo[playerid][pOverkill] = 1;
  1061.             }
  1062.             }
  1063.             case 1:
  1064.             {
  1065.             if (money >=75000)
  1066.             {
  1067.             GivePlayerMoney(playerid, -75000);
  1068.             PlayerInfo[playerid][pFrag] = 1;
  1069.             }
  1070.             }
  1071.             case 2:
  1072.             {
  1073.             if (money >=125000)
  1074.             {
  1075.             GivePlayerMoney(playerid, -125000);
  1076.             PlayerInfo[playerid][pJuggernaut] = 1;
  1077.             }
  1078.             }
  1079.             case 3:
  1080.             {
  1081.                 HideMenuForPlayer(perk, playerid);
  1082.                 TogglePlayerControllable(playerid, 1);
  1083.             }
  1084.         }
  1085.     }
  1086.     return 1;
  1087. }
  1088.  
  1089.  
  1090. public OnPlayerLogin(playerid,const string[])
  1091. {
  1092.     new pname2[MAX_PLAYER_NAME];
  1093.     new pname3[MAX_PLAYER_NAME];
  1094.     new string2[64];
  1095.     new string3[128];
  1096.     GetPlayerName(playerid, pname2, sizeof(pname2));
  1097.     format(string2, sizeof(string2), "%s.cer", pname2);
  1098.     new File: UserFile = fopen(string2, io_read);
  1099.  
  1100.     if (UserFile)
  1101.     {
  1102.         new valtmp[128];
  1103.         fread(UserFile, valtmp);strmid(PlayerInfo[playerid][pPassword], valtmp, 0, strlen(valtmp)-1, 255);
  1104.  
  1105.         if ((strcmp(PlayerInfo[playerid][pPassword], string, true, strlen(valtmp)-1) == 0))
  1106.         {
  1107.             new key[128],val[128];
  1108.             new Data[128];
  1109.             while(fread(UserFile,Data,sizeof(Data)))
  1110.             {
  1111.                 key = ini_GetKey(Data);
  1112.                 if( strcmp( key , "Rank" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pRank] = strval( val ); }
  1113.                 if( strcmp( key , "Exp" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pExp] = strval( val ); }
  1114.                 if( strcmp( key , "Kills" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pKills] = strval( val ); }
  1115.                 if( strcmp( key , "Deaths" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pDeaths] = strval( val ); }
  1116.                 if( strcmp( key , "Juggernaut" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pJuggernaut] = strval( val ); }
  1117.                 if( strcmp( key , "Overkill" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pOverkill] = strval( val ); }
  1118.                 if( strcmp( key , "Frag" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pFrag] = strval( val ); }
  1119.                 if( strcmp( key , "Admin" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAdmin] = strval( val ); }
  1120.                 if( strcmp( key , "Premium" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPremium] = strval( val ); }
  1121.                 if( strcmp( key , "Saw" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pSaw] = strval( val ); }
  1122.                 if( strcmp( key , "Money" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pCash] = strval( val ); }
  1123.             }
  1124.             fclose(UserFile);
  1125.             gPlayerLogged[playerid] = 1;
  1126.             gPlayerAccount[playerid] = 1;
  1127.             new rank = PlayerInfo[playerid][pRank];
  1128.             SetPlayerScore(playerid, rank);
  1129.             GetPlayerName(playerid, pname3, sizeof(pname3));
  1130.             format(string3, sizeof(string3), "Welcome %s, you have been succesfully logged in!", pname3);
  1131.             SendClientMessage(playerid, COLOR_WHITE,string3);
  1132.             GivePlayerMoney(playerid,PlayerInfo[playerid][pCash]);
  1133.             CurrentMoney[playerid] = PlayerInfo[playerid][pCash];
  1134.         }
  1135.         else
  1136.         {
  1137.             SendClientMessage(playerid, COLOR_GREY, "   Password does not match your name");
  1138.             fclose(UserFile);
  1139.         }
  1140.     }
  1141.     return 1;
  1142. }
  1143.  
  1144. public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
  1145. {
  1146.     return 1;
  1147. }
  1148.  
  1149. public OnPlayerUpdate(playerid)
  1150. {
  1151.     if(IsPlayerConnected(playerid))
  1152.     {
  1153.         if(gPlayerLogged[playerid])
  1154.         {
  1155.             new string3[32];
  1156.             new pname3[MAX_PLAYER_NAME];
  1157.             GetPlayerName(playerid, pname3, sizeof(pname3));
  1158.             format(string3, sizeof(string3), "%s.cer", pname3);
  1159.             new File: pFile = fopen(string3, io_write);
  1160.             if (pFile)
  1161.             {
  1162.                 new var[32];
  1163.                 format(var, 32, "%s\n", PlayerInfo[playerid][pPassword]);fwrite(pFile, var);
  1164.                 fclose(pFile);
  1165.                 new File: hFile = fopen(string3, io_append);
  1166.                 PlayerInfo[playerid][pCash] = GetPlayerMoney(playerid);
  1167.                 format(var, 32, "Rank=%d\n",PlayerInfo[playerid][pRank]);fwrite(hFile, var);
  1168.                 format(var, 32, "Exp=%d\n",PlayerInfo[playerid][pExp]);fwrite(hFile, var);
  1169.                 format(var, 32, "Kills=%d\n",PlayerInfo[playerid][pKills]);fwrite(hFile, var);
  1170.                 format(var, 32, "Deaths=%d\n",PlayerInfo[playerid][pDeaths]);fwrite(hFile, var);
  1171.                 format(var, 32, "Juggernaut=%d\n",PlayerInfo[playerid][pJuggernaut]);fwrite(hFile, var);
  1172.                 format(var, 32, "Overkill=%d\n",PlayerInfo[playerid][pOverkill]);fwrite(hFile, var);
  1173.                 format(var, 32, "Frag=%d\n",PlayerInfo[playerid][pFrag]);fwrite(hFile, var);
  1174.                 format(var, 32, "Admin=%d\n",PlayerInfo[playerid][pAdmin]);fwrite(hFile, var);
  1175.                 format(var, 32, "Premium=%d\n",PlayerInfo[playerid][pPremium]);fwrite(hFile, var);
  1176.                 format(var, 32, "Saw=%d\n",PlayerInfo[playerid][pSaw]);fwrite(hFile, var);
  1177.                 format(var, 32, "Money=%d\n",PlayerInfo[playerid][pCash]);fwrite(hFile, var);
  1178.                 fclose(hFile);
  1179.             }
  1180.             new string[50];
  1181.             new nxtlevel = PlayerInfo[playerid][pRank]+1;
  1182.             new costlevel = nxtlevel*rankcost;//1000 for testing purposes
  1183.             if (PlayerInfo[playerid][pExp] >= costlevel)
  1184.             {
  1185.             PlayerInfo[playerid][pRank]++;
  1186.             format(string, sizeof(string), "~g~Ranked Up~n~~w~You Are Now Rank %d", nxtlevel);
  1187.             PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  1188.             PlayerPlayMusic(playerid);
  1189.             GivePlayerMoney(playerid, 10000);
  1190.             new rank = PlayerInfo[playerid][pRank];
  1191.             SetPlayerScore(playerid, rank);
  1192.             }
  1193.         }
  1194.     }
  1195.     return 1;
  1196. }
  1197.  
  1198. stock ini_GetKey( line[] )
  1199. {
  1200.     new keyRes[128];
  1201.     keyRes[0] = 0;
  1202.     if ( strfind( line , "=" , true ) == -1 ) return keyRes;
  1203.     strmid( keyRes , line , 0 , strfind( line , "=" , true ) , sizeof( keyRes) );
  1204.     return keyRes;
  1205. }
  1206.  
  1207. stock ini_GetValue( line[] )
  1208. {
  1209.     new valRes[128];
  1210.     valRes[0]=0;
  1211.     if ( strfind( line , "=" , true ) == -1 ) return valRes;
  1212.     strmid( valRes , line , strfind( line , "=" , true )+1 , strlen( line ) , sizeof( valRes ) );
  1213.     return valRes;
  1214. }
  1215.  
  1216.  
  1217. strtok(const string[], &index)
  1218. {
  1219.     new length = strlen(string);
  1220.     while ((index < length) && (string[index] <= ' '))
  1221.     {
  1222.         index++;
  1223.     }
  1224.  
  1225.     new offset = index;
  1226.     new result[20];
  1227.     while ((index < length) && (string[index] > ' ') && ((index - offset) < (sizeof(result) - 1)))
  1228.     {
  1229.         result[index - offset] = string[index];
  1230.         index++;
  1231.     }
  1232.     result[index - offset] = EOS;
  1233.     return result;
  1234. }
  1235.  
  1236. public PlayerPlayMusic(playerid)
  1237. {
  1238.     if(IsPlayerConnected(playerid))
  1239.     {
  1240.         SetTimer("StopMusic", 5000, 0);
  1241.         PlayerPlaySound(playerid, 1068, 0.0, 0.0, 0.0);
  1242.     }
  1243. }
  1244.  
  1245. public StopMusic()
  1246. {
  1247.     for(new i = 0; i < MAX_PLAYERS; i++)
  1248.     {
  1249.         if(IsPlayerConnected(i))
  1250.         {
  1251.             PlayerPlaySound(i, 1069, 0.0, 0.0, 0.0);
  1252.         }
  1253.     }
  1254. }
  1255.  
  1256. public PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z)
  1257. {
  1258.     if(IsPlayerConnected(playerid))
  1259.     {
  1260.         new Float:oldposx, Float:oldposy, Float:oldposz;
  1261.         new Float:tempposx, Float:tempposy, Float:tempposz;
  1262.         GetPlayerPos(playerid, oldposx, oldposy, oldposz);
  1263.         tempposx = (oldposx -x);
  1264.         tempposy = (oldposy -y);
  1265.         tempposz = (oldposz -z);
  1266.         //printf("DEBUG: X:%f Y:%f Z:%f",posx,posy,posz);
  1267.         if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
  1268.         {
  1269.             return 1;
  1270.         }
  1271.     }
  1272.     return 0;
  1273. }
  1274.  
  1275. public AntiGunCheat()
  1276. {
  1277.     for(new i; i<MAX_PLAYERS; i++)
  1278.     {
  1279.         if(IsPlayerConnected(i))
  1280.         {
  1281.             if (Soldiersteam[i] == 1)
  1282.             {
  1283.                 if (GetPlayerWeapon(i) == 22 || GetPlayerWeapon(i) == 29 ||  GetPlayerWeapon(i) == 16 || GetPlayerWeapon(i) == 0 || GetPlayerWeapon(i) == 26 || GetPlayerWeapon(i) == 27 || GetPlayerWeapon(i) == 28 || GetPlayerWeapon(i) == 30 || GetPlayerWeapon(i) == 31 || GetPlayerWeapon(i) == 32 || GetPlayerWeapon(i) == 37)
  1284.                 {
  1285.                 }
  1286.                 else
  1287.                 {
  1288.                 SendClientMessage(i, COLOR_RED, "you are Banned for weapon Hacking, Please go to www.cod-saw.tk To appeal");
  1289.                 Kick(i);
  1290.                 }
  1291.             }
  1292.             else if (Zombiesteam[i] == 1)
  1293.             {
  1294.                 if (GetPlayerWeapon(i) == 24 ||  GetPlayerWeapon(i) == 29 ||  GetPlayerWeapon(i) == 16 || GetPlayerWeapon(i) == 0 || GetPlayerWeapon(i) == 33)
  1295.                 {
  1296.                 }
  1297.                 else
  1298.                 {
  1299.                 SendClientMessage(i, COLOR_RED, "you are Banned for weapon Hacking, Please go to www.cod-saw.tk To appeal");
  1300.                 Kick(i);
  1301.                 }
  1302.             }
  1303.         }
  1304.     }
  1305. }
  1306.  
  1307. public AntiMoneyCheat()
  1308. {
  1309.     for(new i; i<MAX_PLAYERS; i++)
  1310.     {
  1311.         if(IsPlayerConnected(i))
  1312.         {
  1313.             if(LastMoney[i] > 0)
  1314.             {
  1315.                 if(GetPlayerMoney(i) - LastMoney[i] > 3000 && PlayerInfo[i][pAdmin] < 2)
  1316.                 {
  1317.                     SendClientMessage(i, 0xFF0000AA, "Suspected Money Cheater, Money set back to 10,000 Dollars");
  1318.                     ResetPlayerMoney(i);
  1319.  
  1320.                     GivePlayerMoney(i, 10000);
  1321.                     Kick(i);
  1322.                 }
  1323.             }
  1324.             LastMoney[i] = GetPlayerMoney(i);
  1325.         }
  1326.     }
  1327. }
  1328.  
  1329. /*public gametime()
  1330. {
  1331.     for(new i; i<MAX_PLAYERS; i++)
  1332.     {
  1333.         if(IsPlayerConnected(i))
  1334.         {
  1335.         SendClientMessageToAll(COLOR_YELLOW, "Round Over..Restarting Gamemode in 10 seconds.");
  1336.         SetTimer("gametime2", 10000, 0); // 15 secs
  1337.         }
  1338.     }
  1339. }
  1340.  
  1341. //public gametime2()
  1342. {
  1343.     for(new i; i<MAX_PLAYERS; i++)
  1344.     {
  1345.     OnPlayerUpdate(i);
  1346.     GameModeExit();
  1347.     }
  1348. }
  1349. */
  1350. public ProxDetector(Float:radi, playerid, string[],col1,col2,col3,col4,col5)
  1351. {
  1352.     if(IsPlayerConnected(playerid))
  1353.     {
  1354.         new Float:oldposx, Float:oldposy, Float:oldposz;
  1355.         new Float:tempposx, Float:tempposy, Float:tempposz;
  1356.         GetPlayerPos(playerid, oldposx, oldposy, oldposz);
  1357.         //radi = 2.0; //Trigger Radius
  1358.         for(new i = 0; i < MAX_PLAYERS; i++)
  1359.         {
  1360.             if(IsPlayerConnected(i))
  1361.             {
  1362.                     if (((tempposx < radi/16) && (tempposx > -radi/16)) && ((tempposy < radi/16) && (tempposy > -radi/16)) && ((tempposz < radi/16) && (tempposz > -radi/16)))
  1363.                     {
  1364.                         SendClientMessage(i, col1, string);
  1365.                     }
  1366.                     else if (((tempposx < radi/8) && (tempposx > -radi/8)) && ((tempposy < radi/8) && (tempposy > -radi/8)) && ((tempposz < radi/8) && (tempposz > -radi/8)))
  1367.                     {
  1368.                         SendClientMessage(i, col2, string);
  1369.                     }
  1370.                     else if (((tempposx < radi/4) && (tempposx > -radi/4)) && ((tempposy < radi/4) && (tempposy > -radi/4)) && ((tempposz < radi/4) && (tempposz > -radi/4)))
  1371.                     {
  1372.                         SendClientMessage(i, col3, string);
  1373.                     }
  1374.                     else if (((tempposx < radi/2) && (tempposx > -radi/2)) && ((tempposy < radi/2) && (tempposy > -radi/2)) && ((tempposz < radi/2) && (tempposz > -radi/2)))
  1375.                     {
  1376.                         SendClientMessage(i, col4, string);
  1377.                     }
  1378.                     else if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
  1379.                     {
  1380.                         SendClientMessage(i, col5, string);
  1381.                     }
  1382.                 }
  1383.                 else
  1384.                 {
  1385.                     SendClientMessage(i, col1, string);
  1386.                 }
  1387.         }
  1388.     }//not connected
  1389.     return 1;
  1390. }
  1391.  
  1392. public ShowStats(playerid,targetid)
  1393. {
  1394.     if(IsPlayerConnected(playerid)&&IsPlayerConnected(targetid))
  1395.     {
  1396.         new jugger[20];
  1397.         if(PlayerInfo[targetid][pJuggernaut] == 0) { jugger = "No"; }
  1398.         else if(PlayerInfo[targetid][pJuggernaut] == 1) { jugger = "Yes"; }
  1399.         new Overkill[20];
  1400.         if(PlayerInfo[targetid][pOverkill] == 0) { Overkill = "No"; }
  1401.         else if(PlayerInfo[targetid][pOverkill] == 1) { Overkill = "Yes"; }
  1402.         new Frag[20];
  1403.         if(PlayerInfo[targetid][pFrag] == 0) { Frag = "No"; }
  1404.         else if(PlayerInfo[targetid][pFrag] == 1) { Frag = "Yes"; }
  1405.         new Premium[20];
  1406.         if(PlayerInfo[targetid][pPremium] == 0) { Premium = "Bronze"; }
  1407.         else if(PlayerInfo[targetid][pPremium] == 1) { Premium = "Silver"; }
  1408.         else if(PlayerInfo[targetid][pPremium] == 2) { Premium = "Gold"; }
  1409.         new Saw[20];
  1410.         if(PlayerInfo[targetid][pSaw] == 0) { Saw = "Not A Member"; }
  1411.         else if(PlayerInfo[targetid][pSaw] == 1) { Saw = "Recruit(Rank 1)"; }
  1412.         else if(PlayerInfo[targetid][pSaw] == 2) { Saw = "Member(Rank 2)"; }
  1413.         else if(PlayerInfo[targetid][pSaw] == 3) { Saw = "Moderator(Rank 3)"; }
  1414.         else if(PlayerInfo[targetid][pSaw] == 4) { Saw = "Leaders(Rank 4)"; }
  1415.         else if(PlayerInfo[targetid][pSaw] == 5) { Saw = "Founder(Rank 5)"; }
  1416.         new nxtlevel = PlayerInfo[playerid][pRank]+1;
  1417.         new costlevel = nxtlevel*rankcost;
  1418.         new cash =  GetPlayerMoney(targetid);
  1419.         new deaths = PlayerInfo[targetid][pDeaths];
  1420.         new Admin = PlayerInfo[targetid][pAdmin];
  1421.         new kills = PlayerInfo[targetid][pKills];
  1422.         new rank = PlayerInfo[targetid][pRank];
  1423.         new exp = PlayerInfo[targetid][pExp];
  1424.         new togo = nxtlevel*costlevel;
  1425.         new name[MAX_PLAYER_NAME];
  1426.         GetPlayerName(targetid, name, sizeof(name));
  1427.         new Float:px,Float:py,Float:pz;
  1428.         GetPlayerPos(targetid, px, py, pz);
  1429.         new coordsstring[256];
  1430.         SendClientMessage(playerid, COLOR_RED,"________________________________________");
  1431.         format(coordsstring, sizeof(coordsstring),"*** %s ***",name);
  1432.         SendClientMessage(playerid, COLOR_WHITE,coordsstring);
  1433.         format(coordsstring, sizeof(coordsstring), "Rank:[%d] Experience:[%d] Exp_to_go:[%d] Kills:[%d] Deaths:[%d] Cash:[$%d] AdminLevel:[%d]",rank,exp,togo,kills,deaths,cash,Admin);
  1434.         SendClientMessage(playerid, COLOR_GRAD5,coordsstring);
  1435.         format(coordsstring, sizeof(coordsstring), "Saw_Clan_Position:[%s] Premium_Position:[%s]",Saw,Premium);
  1436.         SendClientMessage(playerid, COLOR_GRAD5,coordsstring);
  1437.         SendClientMessage(playerid, COLOR_RED, "_______________*_Perks_*_______________");
  1438.         format(coordsstring, sizeof(coordsstring), "Juggernaut:[%s] Overkill:[%s] Frag:[%s]",jugger, Overkill, Frag);
  1439.         SendClientMessage(playerid, COLOR_GRAD5,coordsstring);
  1440.         SendClientMessage(playerid, COLOR_RED,"________________________________________");
  1441.     }
  1442. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement