Advertisement
Guest User

Escobars DM[NEW]

a guest
Oct 15th, 2017
930
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 34.98 KB | None | 0 0
  1. // //DM Script by Escobar //
  2. // // Made: 06/10/2017 //
  3. // // Version: 1.0 //
  4.  
  5. #include <a_samp>
  6. #include <YSI\y_ini>
  7. #include <streamer>
  8. #include <sscanf2>
  9. #include <zcmd>
  10.  
  11. #define DIALOG_REGISTER 1
  12. #define DIALOG_LOGIN 2
  13. #define DIALOG_SUCCESS_1 3
  14. #define DIALOG_SUCCESS_2 4
  15. #define STATS 5
  16. #define STATS1 6
  17. #define NETSTATS 7
  18.  
  19. #define COL_WHITE "{FFFFFF}"
  20. #define COL_RED "{F81414}"
  21. #define COL_GREEN "{00FF22}"
  22. #define COL_LIGHTBLUE "{00CED1}"
  23. #define COLOR_RED 0xFF0000FF
  24. #define COLOR_ORANGE 0xFF9900AA
  25. #define COLOR_WHITE 0xFFFFFFAA
  26.  
  27. #define PATH "/Users/%s.ini"
  28.  
  29. enum pInfo
  30. {
  31.     pPass,
  32.     pCash,
  33.     pKills,
  34.     pDeaths,
  35.     pAdmin,
  36.     pMuted,
  37.     pMuteTime,
  38.     pScore,
  39.     pSkin
  40. }
  41. new PlayerInfo[MAX_PLAYERS][pInfo];
  42. new unmute[MAX_PLAYERS];
  43. new Arena1[MAX_PLAYERS];
  44. new Arena2[MAX_PLAYERS];
  45. new Arena3[MAX_PLAYERS];
  46. new Arena4[MAX_PLAYERS];
  47. new Arena5[MAX_PLAYERS];
  48.  
  49.  
  50. forward UnMuteMe(playerid);
  51. public UnMuteMe(playerid)
  52. {
  53.    PlayerInfo[playerid][pMuted] = 0;
  54.    PlayerInfo[playerid][pMuteTime] = 0;
  55.    SendClientMessage(playerid, COLOR_ORANGE,"You have been 'Un-Muted'");
  56.    return 1;
  57. }
  58.  
  59. forward LoadUser_data(playerid,name[],value[]);
  60. public LoadUser_data(playerid,name[],value[])
  61. {
  62.     INI_Int("Password",PlayerInfo[playerid][pPass]);
  63.     INI_Int("Cash",PlayerInfo[playerid][pCash]);
  64.     INI_Int("Kills",PlayerInfo[playerid][pKills]);
  65.     INI_Int("Deaths",PlayerInfo[playerid][pDeaths]);
  66.     INI_Int("Admin",PlayerInfo[playerid][pAdmin]);
  67.     INI_Int("Score",PlayerInfo[playerid][pScore]);
  68.     INI_Int("Skin",PlayerInfo[playerid][pSkin]);
  69.     return 1;
  70. }
  71.  
  72. stock IsValidWeapon(weaponid)
  73. {
  74.     if (weaponid > 0 && weaponid < 19 || weaponid > 21 && weaponid < 47 || weaponid != 38 || weaponid != 44 || weaponid != 45 || weaponid != 36) return 1;
  75.     return 0;
  76. }
  77.  
  78. stock MessageToAdmins(color, const string[])
  79. {
  80.   for(new i = 0; i < MAX_PLAYERS; i++)
  81.   {
  82.         if(IsPlayerConnected(i))
  83.         {
  84.            if(PlayerInfo[i][pAdmin] >= 1)
  85.            {
  86.                  SendClientMessage(i, color, string);
  87.            }
  88.         }
  89.   }
  90.   return 1;
  91. }
  92.  
  93. stock SendAdminMessage(col, string[])
  94. {
  95.     for(new i = 0; i < MAX_PLAYERS; i++)
  96.     {
  97.         if(PlayerInfo[i][pAdmin] > 0)
  98.             SendClientMessage(i, col, string);
  99.     }
  100.  
  101.     return 1;
  102. }
  103.  
  104. stock TargetCMDMessage(playerid, target, command[])
  105. {
  106.   new name[MAX_PLAYER_NAME], name1[MAX_PLAYER_NAME];
  107.   GetPlayerName(target, name, sizeof(name));
  108.   GetPlayerName(playerid, name1, sizeof(name1));
  109.   new string[128];
  110.   format(string, sizeof(string),"[ADM.CMD] Administrator %s[%i] has used %s on %s[%i]", name1, playerid, command, name, target);
  111.   return MessageToAdmins(-1, string);
  112. }
  113.  
  114. stock CMDMessage(playerid, command[])
  115. {
  116.   new name1[MAX_PLAYER_NAME];
  117.   GetPlayerName(playerid, name1, sizeof(name1));
  118.   new string[128];
  119.   format(string, sizeof(string),"[ADM.CMD] Administrator %s[%i] has used %s", name1, playerid, command);
  120. }
  121.  
  122. stock UserPath(playerid)
  123. {
  124.     new string[128],playername[MAX_PLAYER_NAME];
  125.     GetPlayerName(playerid,playername,sizeof(playername));
  126.     format(string,sizeof(string),PATH,playername);
  127.     return string;
  128. }
  129.  
  130. stock PlayerName(playerid)
  131. {
  132.   new name[MAX_PLAYER_NAME];
  133.   GetPlayerName(playerid, name, MAX_PLAYER_NAME);
  134.   return name;
  135. }
  136.  
  137. /*Credits to Dracoblue*/
  138. stock udb_hash(buf[]) {
  139.     new length=strlen(buf);
  140.     new s1 = 1;
  141.     new s2 = 0;
  142.     new n;
  143.     for (n=0; n<length; n++)
  144.     {
  145.        s1 = (s1 + buf[n]) % 65521;
  146.        s2 = (s2 + s1)     % 65521;
  147.     }
  148.     return (s2 << 16) + s1;
  149. }
  150.  
  151. main()
  152. {
  153.     print("\n----------------------------------");
  154.     print(" Escobar's DM");
  155.     print("----------------------------------\n");
  156. }
  157.  
  158. public OnGameModeInit()
  159. {
  160.     // Don't use these lines if it's a filterscript
  161.     SetGameModeText("DM");
  162.     AddPlayerClass(1, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
  163.    
  164.     CreateDynamicCP(2244.5698,1683.6130,1008.3594, 3.0, 0, 1, -1,STREAMER_CP_SD, -1, 0);
  165.     CreateDynamicCP(2246.6040,1677.1489,1008.3594, 3.0, 0, 1, -1,STREAMER_CP_SD, -1, 0);
  166.     CreateDynamicCP(2244.2239,1670.4600,1008.3594, 3.0, 0, 1, -1,STREAMER_CP_SD, -1, 0);
  167.     CreateDynamicCP(2227.2551,1670.5055,1008.3594, 3.0, 0, 1, -1,STREAMER_CP_SD, -1, 0);
  168.     CreateDynamicCP(2226.5605,1683.2289,1008.3594, 3.0, 0, 1, -1,STREAMER_CP_SD, -1, 0);
  169.    
  170.     AddStaticPickup(1242,3,2543.1226,-1321.0045,1031.4219,-1); // Armo
  171.     AddStaticPickup(1242,3,259.0793,1811.0322,22.9922,-1); // Armor
  172.     AddStaticPickup(1242,3,-335.0574,2220.2739,42.4875,-1); //Armor
  173.     AddStaticPickup(1242,3,276.6747,170.8388,1007.6719,-1); //Armo
  174.     AddStaticPickup(1242,3,1245.1157,-776.1143,1084.0078,-1);//Armor
  175.    
  176.     AddStaticPickup(1240,3,2535.1021,-1320.8042,1031.4219,-1); //Health
  177.     AddStaticPickup(1240,3,207.3327,1922.1807,17.6406,-1);
  178.     AddStaticPickup(1240,3,-398.5371,2251.3950,42.4297,-1);
  179.     AddStaticPickup(1240,3,232.8155,163.3023,1003.0234,-1);
  180.     AddStaticPickup(1240,3,1258.9954,-795.6130,1084.2344,-1); //Health
  181.    
  182.     AddStaticPickup(356,3,2526.8696,-1321.2657,1031.4219,-1); //M4
  183.     AddStaticPickup(356,3,260.6836,1806.0990,33.8984,-1);
  184.     AddStaticPickup(356,3,-430.0052,2240.8186,42.9834,-1);
  185.     AddStaticPickup(356,3,190.6796,158.2805,1003.0234,-1);
  186.     AddStaticPickup(356,3,1258.4299,-804.4128,1084.0078,-1); //M4
  187.    
  188.     AddStaticPickup(355,3,2567.0015,-1289.0721,1037.7734,-1);
  189.     AddStaticPickup(355,3,161.6969,1930.5021,33.8984,-1);
  190.     AddStaticPickup(355,3,-456.5122,2225.3232,42.9581,-1);
  191.     AddStaticPickup(355,3,190.9721,179.1932,1003.0234,-1);
  192.     AddStaticPickup(355,3,1228.4976,-808.2664,1084.0078,-1);
  193.    
  194.     Create3DTextLabel("Ghost Town", 0xF70AF7, 2244.5698,1683.6130,1008.3594, 40.0, 0, 0);
  195.     Create3DTextLabel("LVPD Interior", 0xF70AF7, 2246.6040,1677.1489,1008.3594, 40.0, 0, 0);
  196.     Create3DTextLabel("Mad Doggs Mansion", 0xF70AF7, 2244.2239,1670.4600,1008.3594, 40.0, 0, 0);
  197.     Create3DTextLabel("Area 69", 0xF70AF7, 2227.2551,1670.5055,1008.3594, 40.0, 0, 0);
  198.     Create3DTextLabel("Drug Den", 0xF70AF7, 2226.5605,1683.2289,1008.3594, 40.0, 0, 0);
  199.    
  200.     DisableInteriorEnterExits();
  201.    
  202.     return 1;
  203. }
  204.  
  205. public OnGameModeExit()
  206. {
  207.     return 1;
  208. }
  209.  
  210. public OnPlayerRequestClass(playerid, classid)
  211. {
  212.         SetPlayerInterior(playerid,11);
  213.         SetPlayerPos(playerid,508.7362,-87.4335,998.9609);
  214.         SetPlayerFacingAngle(playerid,0.0);
  215.         SetPlayerCameraPos(playerid,508.7362,-83.4335,998.9609);
  216.         SetPlayerCameraLookAt(playerid,508.7362,-87.4335,998.9609);
  217.         return 1;
  218. }
  219.  
  220. public OnPlayerConnect(playerid)
  221. {
  222.         new Pname[MAX_PLAYER_NAME];
  223.         GetPlayerName(playerid, Pname, sizeof(Pname));
  224.         new str[100];
  225.         format(str,sizeof(str),"%s has joined the 'Server Name'",Pname);
  226.         SendClientMessageToAll(-1,str);
  227.         Arena1[playerid] = 0;
  228.         Arena2[playerid] = 0;
  229.         Arena3[playerid] = 0;
  230.         Arena4[playerid] = 0;
  231.         Arena5[playerid] = 0;
  232.        
  233.         if(fexist(UserPath(playerid)))
  234.     {
  235.         INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
  236.         ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,""COL_WHITE"Login",""COL_WHITE"Type your password below to login.","Login","Quit");
  237.         SetPlayerSkin(playerid,PlayerInfo[playerid][pSkin]);
  238.         SetPlayerScore(playerid,PlayerInfo[playerid][pScore]);
  239.     }
  240.         else
  241.     {
  242.         ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT,""COL_WHITE"Registering...",""COL_WHITE"Type your password below to register a new account.","Register","Quit");
  243.         PlayerInfo[playerid][pCash] = 0;
  244.         PlayerInfo[playerid][pKills] = 0;
  245.         PlayerInfo[playerid][pDeaths] = 0;
  246.         PlayerInfo[playerid][pAdmin] = 0;
  247.         PlayerInfo[playerid][pScore] = 0;
  248.         PlayerInfo[playerid][pSkin] = 1;
  249.     }
  250.         return 1;
  251. }
  252.  
  253. public OnPlayerDisconnect(playerid, reason)
  254. {
  255.     new INI:File = INI_Open(UserPath(playerid));
  256.     INI_SetTag(File,"data");
  257.     INI_WriteInt(File,"Cash",GetPlayerMoney(playerid));
  258.     INI_WriteInt(File,"Kills",PlayerInfo[playerid][pKills]);
  259.     INI_WriteInt(File,"Deaths",PlayerInfo[playerid][pDeaths]);
  260.     INI_WriteInt(File,"Admin",PlayerInfo[playerid][pAdmin]);
  261.     INI_WriteInt(File,"Score",GetPlayerScore(playerid));
  262.     INI_WriteInt(File,"Skin",GetPlayerSkin(playerid));
  263.     INI_Close(File);
  264.     return 1;
  265. }
  266.  
  267. public OnPlayerSpawn(playerid)
  268. {
  269.     {
  270.         SetPlayerInterior(playerid,1);
  271.         SetPlayerPos(playerid,2236.1191,1678.5986,1008.3594);
  272.     }
  273.     if(Arena1[playerid] == 1)
  274.     {
  275.         GetPlayerSkin(playerid);
  276.         SetPlayerInterior(playerid,0);
  277.         SetPlayerPos(playerid,-373.5241,2199.6157,42.0893);
  278.         GivePlayerWeapon(playerid,24,500);
  279.         SetPlayerSkin(playerid,GetPlayerSkin(playerid));
  280.     }
  281.     if(Arena2[playerid] == 1)
  282.     {
  283.         GetPlayerSkin(playerid);
  284.         SetPlayerInterior(playerid,3);
  285.         SetPlayerPos(playerid,297.0647,182.9002,1007.1719);
  286.         GivePlayerWeapon(playerid,24,500);
  287.         SetPlayerSkin(playerid,GetPlayerSkin(playerid));
  288.     }
  289.     if(Arena3[playerid] == 1)
  290.     {
  291.         GetPlayerSkin(playerid);
  292.         SetPlayerInterior(playerid,5);
  293.         SetPlayerPos(playerid,1290.6121,-774.6445,1084.0078);
  294.         GivePlayerWeapon(playerid,24,500);
  295.         SetPlayerSkin(playerid,GetPlayerSkin(playerid));
  296.     }
  297.     if(Arena4[playerid] == 1)
  298.     {
  299.         GetPlayerSkin(playerid);
  300.         SetPlayerInterior(playerid,0);
  301.         SetPlayerPos(playerid,211.5686,1811.4602,21.8594);
  302.         GivePlayerWeapon(playerid,24,500);
  303.         SetPlayerSkin(playerid,GetPlayerSkin(playerid));
  304.     }
  305.     if(Arena5[playerid] == 1)
  306.     {
  307.         GetPlayerSkin(playerid);
  308.         SetPlayerInterior(playerid,2);
  309.         SetPlayerPos(playerid,2543.462646,-1308.379882,1026.728393);
  310.         GivePlayerWeapon(playerid,24,500);
  311.         SetPlayerSkin(playerid,GetPlayerSkin(playerid));
  312.     }
  313.     return 1;
  314. }
  315.  
  316. public OnPlayerDeath(playerid, killerid, reason)
  317. {
  318.     SendDeathMessage(killerid, playerid, reason);
  319.     PlayerInfo[killerid][pKills]++;
  320.     PlayerInfo[playerid][pDeaths]++;
  321.     return 1;
  322. }
  323.  
  324. public OnVehicleSpawn(vehicleid)
  325. {
  326.     return 1;
  327. }
  328.  
  329. public OnVehicleDeath(vehicleid, killerid)
  330. {
  331.     return 1;
  332. }
  333.  
  334. public OnPlayerText(playerid, text[])
  335. {
  336.     return 1;
  337. }
  338.  
  339. public OnPlayerCommandText(playerid, cmdtext[])
  340. {
  341.     if (strcmp("/mycommand", cmdtext, true, 10) == 0)
  342.     {
  343.         // Do something here
  344.         return 1;
  345.     }
  346.     return 0;
  347. }
  348.  
  349. public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
  350. {
  351.     return 1;
  352. }
  353.  
  354. public OnPlayerExitVehicle(playerid, vehicleid)
  355. {
  356.     return 1;
  357. }
  358.  
  359. public OnPlayerStateChange(playerid, newstate, oldstate)
  360. {
  361.     return 1;
  362. }
  363.  
  364. public OnPlayerEnterCheckpoint(playerid)
  365. {
  366.     return 1;
  367. }
  368.  
  369. public OnPlayerLeaveCheckpoint(playerid)
  370. {
  371.     return 1;
  372. }
  373.  
  374. public OnPlayerEnterRaceCheckpoint(playerid)
  375. {
  376.     return 1;
  377. }
  378.  
  379. public OnPlayerLeaveRaceCheckpoint(playerid)
  380. {
  381.     return 1;
  382. }
  383.  
  384. public OnRconCommand(cmd[])
  385. {
  386.     return 1;
  387. }
  388.  
  389. public OnPlayerRequestSpawn(playerid)
  390. {
  391.     return 1;
  392. }
  393.  
  394. public OnObjectMoved(objectid)
  395. {
  396.     return 1;
  397. }
  398.  
  399. public OnPlayerObjectMoved(playerid, objectid)
  400. {
  401.     return 1;
  402. }
  403.  
  404. public OnPlayerPickUpPickup(playerid, pickupid)
  405. {
  406.     return 1;
  407. }
  408.  
  409. public OnVehicleMod(playerid, vehicleid, componentid)
  410. {
  411.     return 1;
  412. }
  413.  
  414. public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
  415. {
  416.     return 1;
  417. }
  418.  
  419. public OnVehicleRespray(playerid, vehicleid, color1, color2)
  420. {
  421.     return 1;
  422. }
  423.  
  424. public OnPlayerSelectedMenuRow(playerid, row)
  425. {
  426.     return 1;
  427. }
  428.  
  429. public OnPlayerExitedMenu(playerid)
  430. {
  431.     return 1;
  432. }
  433.  
  434. public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
  435. {
  436.     return 1;
  437. }
  438.  
  439. public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
  440. {
  441.     return 1;
  442. }
  443.  
  444. public OnRconLoginAttempt(ip[], password[], success)
  445. {
  446.     return 1;
  447. }
  448.  
  449. public OnPlayerUpdate(playerid)
  450. {
  451.     return 1;
  452. }
  453.  
  454. public OnPlayerStreamIn(playerid, forplayerid)
  455. {
  456.     return 1;
  457. }
  458.  
  459. public OnPlayerStreamOut(playerid, forplayerid)
  460. {
  461.     return 1;
  462. }
  463.  
  464. public OnVehicleStreamIn(vehicleid, forplayerid)
  465. {
  466.     return 1;
  467. }
  468.  
  469. public OnVehicleStreamOut(vehicleid, forplayerid)
  470. {
  471.     return 1;
  472. }
  473.  
  474. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  475. {
  476.     switch( dialogid )
  477.     {
  478.         case DIALOG_REGISTER:
  479.         {
  480.             if (!response) return Kick(playerid);
  481.             if(response)
  482.             {
  483.                 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");
  484.                 new INI:File = INI_Open(UserPath(playerid));
  485.                 INI_SetTag(File,"data");
  486.                 INI_WriteInt(File,"Password",udb_hash(inputtext));
  487.                 INI_WriteInt(File,"Cash",0);
  488.                 INI_WriteInt(File,"Kills",0);
  489.                 INI_WriteInt(File,"Deaths",0);
  490.                 INI_WriteInt(File,"Admin",0);
  491.                 INI_WriteInt(File,"Score",0);
  492.                 INI_WriteInt(File,"Skin",1);
  493.                 INI_Close(File);
  494.  
  495.                 ShowPlayerDialog(playerid, DIALOG_SUCCESS_1, DIALOG_STYLE_MSGBOX,""COL_WHITE"Success!",""COL_GREEN"Thanks! You are registered at, "COL_LIGHTBLUE"YOUR_SERVER","Ok","");
  496.             }
  497.         }
  498.  
  499.         case DIALOG_LOGIN:
  500.         {
  501.             if ( !response ) return Kick ( playerid );
  502.             if( response )
  503.             {
  504.                 if(udb_hash(inputtext) == PlayerInfo[playerid][pPass])
  505.                 {
  506.                     INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
  507.                     GivePlayerMoney(playerid, PlayerInfo[playerid][pCash]);
  508.                 }
  509.                 else
  510.                 {
  511.                     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");
  512.                 }
  513.                 return 1;
  514.             }
  515.         }
  516.     }
  517.     return 1;
  518. }
  519.  
  520. public OnPlayerClickPlayer(playerid, clickedplayerid, source)
  521. {
  522.     return 1;
  523. }
  524.  
  525. public OnPlayerEnterDynamicCP(playerid, checkpointid)
  526. {
  527.     if(checkpointid==1)
  528.     {
  529.         SetPlayerInterior(playerid,0);
  530.         SetPlayerPos(playerid,-373.5241,2199.6157,42.0893);
  531.         GivePlayerWeapon(playerid,24,500);
  532.         SendClientMessage(playerid,-1,"Welcome to Ghost Town playa.");
  533.         SetPlayerColor(playerid,0xFF00FF);
  534.         Arena1[playerid] = 1;
  535.     }
  536.     if(checkpointid==2)
  537.     {
  538.         SetPlayerInterior(playerid,3);
  539.         SetPlayerPos(playerid,297.0647,182.9002,1007.1719);
  540.         GivePlayerWeapon(playerid,24,500);
  541.         SendClientMessage(playerid,-1,"Welcome to LV Police Station playa.");
  542.         SetPlayerColor(playerid,0xFF0066);
  543.         Arena2[playerid] = 1;
  544.     }
  545.     if(checkpointid==3)
  546.     {
  547.         SetPlayerInterior(playerid,5);
  548.         SetPlayerPos(playerid,1290.6121,-774.6445,1084.0078);
  549.         GivePlayerWeapon(playerid,24,500);
  550.         SendClientMessage(playerid,-1,"Welcome to Mad Doggs playa.");
  551.         SetPlayerColor(playerid,0x6600FF);
  552.         Arena3[playerid] = 1;
  553.     }
  554.     if(checkpointid==4)
  555.     {
  556.         SetPlayerInterior(playerid,0);
  557.         SetPlayerPos(playerid,211.5686,1811.4602,21.8594);
  558.         GivePlayerWeapon(playerid,24,500);
  559.         SendClientMessage(playerid,-1,"Welcome to Area 69 playa.");
  560.         SetPlayerColor(playerid,0xFF55FF);
  561.         Arena4[playerid] = 1;
  562.     }
  563.     if(checkpointid==5)
  564.     {
  565.         SetPlayerInterior(playerid,2);
  566.         SetPlayerPos(playerid,2543.462646,-1308.379882,1026.728393);
  567.         GivePlayerWeapon(playerid,24,500);
  568.         SendClientMessage(playerid,-1,"Welcome to Drug Den playa.");
  569.         SetPlayerColor(playerid,0xBBFFFF);
  570.         Arena5[playerid] = 1;
  571.     }
  572.     return 1;
  573. }
  574.  
  575. ///////////////////////////////////////////////////////////////////////////////
  576.  
  577. CMD:cmds(playerid,params[])
  578. {
  579.     SendClientMessage(playerid,-1,"General Commands: /lobby /cmds /rules /help /mystats /stats /skin /admins");
  580.     SendClientMessage(playerid,-1,"General Commands: /pm /server /kill /report /mynetstats");
  581.     return 1;
  582. }
  583.  
  584. CMD:acmds(playerid,params[])
  585. {
  586.     if(PlayerInfo[playerid][pAdmin] >= 1)
  587.     {
  588.         SendClientMessage(playerid,COLOR_ORANGE,"Admin Commands: /getip /ban /kick /mute /unmute /giveallweapon /giveallcash");
  589.         SendClientMessage(playerid,COLOR_ORANGE,"Admin Commands: /giveallscore /healall /armorall /sethealth /giveweapon");
  590.         SendClientMessage(playerid,COLOR_ORANGE,"Admin Commands: /explode /freeze /unfreeze /goto /get /aduty /aoffduty /(a)chat");
  591.     } else return SendClientMessage(playerid,-1,"SERVER:Unknown command");
  592.     return 1;
  593. }
  594.  
  595. CMD:lobby(playerid,params[])
  596. {
  597.     SetPlayerInterior(playerid,1);
  598.     SetPlayerPos(playerid,2236.1191,1678.5986,1008.3594);
  599.     ResetPlayerWeapons(playerid);
  600.     Arena1[playerid] = 0;
  601.     Arena2[playerid] = 0;
  602.     Arena3[playerid] = 0;
  603.     Arena4[playerid] = 0;
  604.     Arena5[playerid] = 0;
  605.     return 1;
  606. }
  607.  
  608. CMD:rules(playerid,params[])
  609. {
  610.     SendClientMessage(playerid,-1,"1.This is a DM Server.");
  611.     SendClientMessage(playerid,-1,"2. Don't use any kind of cheats, you will get banned.");
  612.     return 1;
  613. }
  614.  
  615. CMD:help(playerid,params[])
  616. {
  617.     SendClientMessage(playerid,-1,"Use /cmds to get to know this script features.");
  618.     return 1;
  619. }
  620.  
  621. CMD:setadmin(playerid,params[])
  622. {
  623.     if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,-1,"SERVER: Unknown command.");
  624.     new id, level, str1[100], str[100];
  625.     if(sscanf(params,"ui",id,level)) return SendClientMessage(playerid,COLOR_RED,"USAGE: /setadmin [ID] [Level]");
  626.     if(!IsPlayerConnected(id)) return SendClientMessage(playerid,COLOR_RED,"ERROR: That player is not connnected.");
  627.     if( level < 0 || level > 4) return SendClientMessage(playerid,COLOR_RED,"Level 4 is the highest admin level.");
  628.     format(str,sizeof(str),"You've been set admin level %d by an administrator.",level);
  629.     format(str1,sizeof(str1),"You've set that player admin level %d.",level);
  630.     SendClientMessage(id,-1,str);
  631.     SendClientMessage(playerid,-1,str1);
  632.     PlayerInfo[id][pAdmin] = level;
  633.     return 1;
  634. }
  635.  
  636. CMD:mystats(playerid,params[])
  637. {
  638.     if(IsPlayerConnected(playerid))
  639.     {
  640.         new string[128], stats[1024];
  641.         format(string,sizeof(string),"Cash: %d \n Kills: %d \n Deaths: %d \n Admin: %d",PlayerInfo[playerid][pCash],PlayerInfo[playerid][pKills],PlayerInfo[playerid][pDeaths],PlayerInfo[playerid][pAdmin]);
  642.         format(stats, sizeof stats, "%s", string);
  643.         ShowPlayerDialog(playerid,STATS,DIALOG_STYLE_MSGBOX,"Account Info:",stats,"Ok","");
  644.     }
  645.     return 1;
  646. }
  647.  
  648. CMD:stats(playerid,params[])
  649. {
  650.     new id, str[128], stats[500];
  651.     if(sscanf(params,"u",id)) return SendClientMessage(playerid,COLOR_RED,"USAGE: /stats [id]");
  652.     if(!IsPlayerConnected(id)) return SendClientMessage(playerid,COLOR_RED,"ERROR: That player is not connected");
  653.     if(id == playerid) return SendClientMessage(playerid,COLOR_RED,"Why don't you use /mystats better?");
  654.     format(str,sizeof(str),"Cash: %d \n Kills: %d \n Deaths: %d \n Admin: %d",PlayerInfo[id][pCash],PlayerInfo[id][pKills],PlayerInfo[id][pDeaths],PlayerInfo[id][pAdmin]);
  655.     format(stats, sizeof stats, "%s", str);
  656.     ShowPlayerDialog(playerid,STATS1,DIALOG_STYLE_MSGBOX,"Account Info:",stats,"Ok","");
  657.     return 1;
  658. }
  659.  
  660. CMD:skin(playerid, params[])
  661. {
  662.     new skin, str[150];
  663.     if(sscanf(params, "i", skin)) return SendClientMessage(playerid, COLOR_RED, "[SX-USAGE] {B0B0B0}Β»{FFFF00} /skin <0 - 299>");
  664.     if(skin < 1 || skin > 299) return SendClientMessage(playerid, COLOR_RED, "[SX-USAGE] {B0B0B0}Β»{FFFF00} Invalid SkinID! < 0 - 299 >");
  665.     if(skin == 74) return SendClientMessage(playerid,COLOR_RED,"Sorry, but you can't use this skin.");
  666.     SetPlayerSkin(playerid, skin);
  667.     format(str, sizeof(str), "[INFO] {FFFFFF}Your skin has been changed to Skin ID: %i", skin);
  668.     SendClientMessage(playerid, COLOR_ORANGE, str);
  669.     return 1;
  670. }
  671.  
  672. CMD:admins(playerid, params[])
  673. {
  674.    new count = 0, string[256];
  675.    SendClientMessage(playerid, COLOR_ORANGE,"Online Administrators at the moment:");
  676.    for(new i = 0; i < MAX_PLAYERS; i ++)
  677.    {
  678.           if(IsPlayerConnected(i))
  679.           {
  680.                   if(PlayerInfo[i][pAdmin] >= 1)
  681.                   {
  682.              format(string, sizeof(string),"Admin ID:[%d] %s Level: %d", i, PlayerName(i), PlayerInfo[i][pAdmin]);
  683.              SendClientMessage(playerid, COLOR_ORANGE, string);
  684.              count++;
  685.                   }
  686.       }
  687.    }
  688.    if(count == 0)
  689.    {
  690.                   SendClientMessage(playerid, COLOR_RED,"No admins are online right now!");
  691.    }
  692.    return 1;
  693. }
  694.  
  695. COMMAND:pm(playerid, params[])
  696. {
  697.     new id, string[128], string2[128], sender[MAX_PLAYER_NAME], reciever[MAX_PLAYER_NAME];
  698.     if(sscanf(params, "us[75]", id, params[2])) return SendClientMessage(playerid, 0xFFFFFFFF, "Usage: /pm [id] [message]");
  699.     GetPlayerName(playerid, sender, sizeof(sender));
  700.     GetPlayerName(id, reciever, sizeof(reciever));
  701.     format(string, sizeof(string), "PM recieved from %s: %s", sender, params[2]);
  702.     format(string2, sizeof(string2), "PM sent to %s: %s", reciever, params[2]);  
  703.     SendClientMessage(id, 0xFFFFFFFF, string);
  704.     SendClientMessage(playerid, 0xFFFFFFFF, string2);
  705.     return 1;
  706. }
  707.  
  708. CMD:getip(playerid, params[])
  709. {
  710.     if(PlayerInfo[playerid][pAdmin] >=1)
  711.     {
  712.         new targetid, ip[16], string[60];
  713.         if(sscanf(params,"u",targetid)) return SendClientMessage(playerid,COLOR_RED,"USAGE: /getip [ID].");
  714.         GetPlayerIp(targetid,ip,sizeof(ip));
  715.         format(string, sizeof(string), "[SERVER]:TargetID IP is: %s ",ip);
  716.         SendClientMessage(playerid,COLOR_ORANGE,string);
  717.     }
  718.     return 1;
  719. }
  720.  
  721. CMD:ban(playerid, params[])
  722. {
  723.     if(PlayerInfo[playerid][pAdmin] >=2)
  724.     {
  725.         new id, reason[50], string[128], banned[MAX_PLAYER_NAME];
  726.         if(sscanf(params, "uz", id, reason)) return SendClientMessage(playerid, -1, "USAGE: /ban [playerid] [reason(optional)]");
  727.         GetPlayerName(id, banned, sizeof(banned));
  728.         format(string, sizeof(string), "AdmCmd: %s has been banned by %s. reason: %s", banned, PlayerName(playerid), reason);
  729.         SendClientMessageToAll(COLOR_RED, string);
  730.         BanEx(id, reason);
  731.     }
  732.     return 1;
  733. }
  734.  
  735. CMD:kick(playerid,params[])
  736. {
  737.     if(PlayerInfo[playerid][pAdmin] >=1)
  738.     {
  739.         new id,gname[MAX_PLAYER_NAME],string[125],reason[70];
  740.         if(sscanf(params,"us[70]",id,reason)) return SendClientMessage(playerid,-1," (ERROR) : /kick [playerid] [reason]");
  741.         if(id == INVALID_PLAYER_ID || !IsPlayerConnected(id)) return SendClientMessage(playerid,-1," (ERROR) : The id you have typed is invalid!");
  742.         GetPlayerName(id,gname,sizeof(gname));
  743.         format(string, sizeof(string), "SERVER: %s has been kicked from the server Reason: %s", gname,reason);
  744.         SendClientMessageToAll( -1, string);
  745.         Kick(id);
  746.     }
  747.     return 1;
  748. }
  749.  
  750. CMD:mute(playerid, params[])
  751. {
  752.    if(PlayerInfo[playerid][pAdmin] >= 1)
  753.    {
  754.           new player1, time, str[123], reason[30];
  755.           if(sscanf(params,"dds[30]", player1, time)) return SendClientMessage(playerid, COLOR_RED,"[USAGE]: /mute [playerid] [time (counted in minutes)] [reason]");
  756.           if(IsPlayerConnected(player1))
  757.           {
  758.                   if(PlayerInfo[player1][pMuted] == 0)
  759.                   {
  760.                           PlayerInfo[player1][pMuted] = 1;
  761.                           PlayerInfo[player1][pMuteTime] = time*60000;
  762.                           format(str, sizeof(str),"Administrator %s has muted %s for %i minutes [Reason: %s]", PlayerName(playerid), PlayerName(player1), time, reason);
  763.                           SendClientMessageToAll(COLOR_ORANGE, str);
  764.                           unmute[player1] = SetTimerEx("UnMuteMe", PlayerInfo[player1][pMuteTime], false, "d", playerid);
  765.                           TargetCMDMessage(playerid, player1,"MUTE");
  766.                   }
  767.                   else return SendClientMessage(playerid, COLOR_RED,"Player is already muted!");
  768.           }
  769.           else return SendClientMessage(playerid, COLOR_RED,"Player is not connected!");
  770.    }
  771.    else return SendClientMessage(playerid, COLOR_RED,"SERVER: Unknown command!");
  772.    return 1;
  773. }
  774.  
  775. CMD:unmute(playerid, params[])
  776. {
  777.    if(PlayerInfo[playerid][pAdmin] >= 1)
  778.    {
  779.           new player1, str[123];
  780.           if(sscanf(params,"d", player1)) return SendClientMessage(playerid, COLOR_RED,"[USAGE]: /unmute [playerid]");
  781.           if(IsPlayerConnected(player1))
  782.           {
  783.                   if(PlayerInfo[player1][pMuted] == 1)
  784.                   {
  785.                           PlayerInfo[player1][pMuted] = 0;
  786.                           PlayerInfo[player1][pMuteTime] = 0;
  787.                           format(str, sizeof(str),"Administrator %s has unmuted %s", PlayerName(playerid), PlayerName(player1));
  788.                           SendClientMessageToAll(COLOR_ORANGE, str);
  789.                           TargetCMDMessage(playerid, player1,"UNMUTE");
  790.                           KillTimer(unmute[player1]);
  791.                   }
  792.                   else return SendClientMessage(playerid, COLOR_RED,"Player is not muted!");
  793.           }
  794.           else return SendClientMessage(playerid, COLOR_RED,"Player is not connected!");
  795.    }
  796.    else return SendClientMessage(playerid, COLOR_WHITE,"SERVER: Unknown command!");
  797.    return 1;
  798. }
  799.  
  800. CMD:server(playerid,params[])
  801. {
  802.     SendClientMessage(playerid,COLOR_ORANGE,"Server Name: 'Name'");
  803.     SendClientMessage(playerid,COLOR_ORANGE,"Server IP: IP");
  804.     SendClientMessage(playerid,COLOR_ORANGE,"Server Forums: url");
  805.     SendClientMessage(playerid,COLOR_ORANGE,"Discord Server: IP");
  806.     return 1;
  807. }
  808.  
  809. CMD:kill(playerid,params[])
  810. {
  811.     new Float:health;
  812.     GetPlayerHealth(playerid,health);
  813.     if (health < 50.0) return SendClientMessage(playerid,COLOR_RED,"You can't use this command.");
  814.     SetPlayerHealth(playerid,0.0);
  815.     SendClientMessage(playerid,COLOR_RED,"You've killed yourself.");
  816.     return 1;
  817. }
  818.  
  819. CMD:giveallweapon(playerid, params[])
  820. {
  821.   for(new i = 0; i < MAX_PLAYERS; i ++)
  822.   {
  823.   if(PlayerInfo[playerid][pAdmin] >= 4)
  824.   {
  825.          new weapid, ammo;
  826.          if(sscanf(params,"dd", weapid, ammo)) return SendClientMessage(playerid, COLOR_RED,"[USAGE]: /giveallweapon [weapon] [ammo]");
  827.          if(IsValidWeapon(weapid))
  828.          {
  829.           if(IsPlayerConnected(i))
  830.           {
  831.                 GivePlayerWeapon(i, weapid, ammo);
  832.                 new str[150];
  833.                 format(str, sizeof(str),"Administrator %s has given everyone %d ammo of weapon %d", PlayerName(playerid), ammo, weapid);
  834.                 SendClientMessage(i, COLOR_ORANGE, str);
  835.           }
  836.      }
  837.          else return SendClientMessage(playerid, COLOR_RED,"You are not allowed to give this weapon!");
  838.   }
  839.   else return SendClientMessage(playerid, COLOR_WHITE,"SERVER: Unknown command!");
  840.   }
  841.   return 1;
  842. }
  843.  
  844. CMD:giveallcash(playerid, params[])
  845. {
  846.   for(new i = 0; i < MAX_PLAYERS; i ++)
  847.   {
  848.   if(PlayerInfo[playerid][pAdmin] >= 4)
  849.   {
  850.          new ammount;
  851.          if(sscanf(params,"d", ammount)) return SendClientMessage(playerid, COLOR_RED,"[USAGE]: /giveallcash [ammount]");
  852.          if(IsPlayerConnected(i))
  853.      {
  854.                 GivePlayerMoney(i, ammount);
  855.                 new str[150];
  856.                 format(str, sizeof(str),"Administrator %s has given everyone $%d money", PlayerName(playerid), ammount);
  857.                 SendClientMessage(i, COLOR_ORANGE, str);
  858.          }
  859.   }
  860.          else return SendClientMessage(playerid, COLOR_WHITE,"SERVER: Unknown command!");
  861.   }
  862.   return 1;
  863. }
  864.  
  865. CMD:giveallscore(playerid, params[])
  866. {
  867.   for(new i = 0; i < MAX_PLAYERS; i ++)
  868.   {
  869.   if(PlayerInfo[playerid][pAdmin] >= 4)
  870.   {
  871.          new ammount;
  872.          if(sscanf(params,"d", ammount)) return SendClientMessage(playerid, COLOR_RED,"[USAGE]: /giveallscore [ammount]");
  873.          if(IsPlayerConnected(i))
  874.      {
  875.                 SetPlayerScore(i, GetPlayerScore(i)+ammount);
  876.                 new str[150];
  877.                 format(str, sizeof(str),"Administrator %s has given everyone %d score(s)", PlayerName(playerid), ammount);
  878.                 SendClientMessage(i, COLOR_ORANGE, str);
  879.          }
  880.   }
  881.   else return SendClientMessage(playerid, COLOR_WHITE,"SERVER: Unknown command!");
  882.   }
  883.   return 1;
  884. }
  885.  
  886. CMD:healall(playerid, params[])
  887. {
  888.  if(PlayerInfo[playerid][pAdmin] >= 3)
  889.  {
  890.    for(new i =0; i < MAX_PLAYERS; i ++ )
  891.    {
  892.          if(IsPlayerConnected(i))
  893.          {
  894.            SetPlayerHealth(i, 100.0);
  895.            new str[100];
  896.            format(str, sizeof(str),"Administrator %s has healed all players!", PlayerName(playerid));
  897.            SendClientMessage(i, COLOR_ORANGE, str);
  898.            CMDMessage(playerid,"HEALALL");
  899.          }
  900.    }
  901.  }
  902.  else return SendClientMessage(playerid, COLOR_WHITE,"SERVER: Unknown command!");
  903.  return 1;
  904. }
  905.  
  906. CMD:armorall(playerid, params[])
  907. {
  908.  if(PlayerInfo[playerid][pAdmin] >= 3)
  909.  {
  910.    for(new i =0; i < MAX_PLAYERS; i ++ )
  911.    {
  912.          if(IsPlayerConnected(i))
  913.          {
  914.            SetPlayerArmour(i, 100.0);
  915.            new str[100];
  916.            format(str, sizeof(str),"Administrator %s has armoured all players!", PlayerName(playerid));
  917.            SendClientMessage(i, COLOR_ORANGE, str);
  918.            CMDMessage(playerid,"ARMOURALL");
  919.          }
  920.    }
  921.  }
  922.  else return SendClientMessage(playerid, COLOR_WHITE,"SERVER: Unknown command!");
  923.  return 1;
  924. }
  925.  
  926. CMD:sethealth(playerid, params[])
  927. {
  928.    if(PlayerInfo[playerid][pAdmin] >= 3)
  929.    {
  930.           new player1, str[120], amount;
  931.           if(sscanf(params,"dd", player1, amount)) return SendClientMessage(playerid, COLOR_RED,"[USAGE]: /sethealth [playerid] [health]");
  932.           if(IsPlayerConnected(player1))
  933.           {
  934.                   SetPlayerHealth(player1, amount);
  935.                   format(str, sizeof(str),"You have setted %s's health to %d", PlayerName(player1), amount);
  936.                   SendClientMessage(playerid, COLOR_ORANGE, str);
  937.                   TargetCMDMessage(playerid, player1,"SETHEALTH");
  938.           }
  939.           else return SendClientMessage(playerid, COLOR_RED,"Player is not connected!");
  940.    }
  941.    else return SendClientMessage(playerid, COLOR_WHITE,"SERVER: Unknown command!");
  942.    return 1;
  943. }
  944.  
  945. CMD:giveweapon(playerid, params[])
  946. {
  947.   if(PlayerInfo[playerid][pAdmin] >= 3)
  948.   {
  949.          new target, weapid, ammo;
  950.          if(sscanf(params,"ddd", target, weapid, ammo)) return SendClientMessage(playerid, COLOR_RED,"[USAGE]: /giveweapon [playerid] [weapon] [ammo]");
  951.          if(IsValidWeapon(weapid))
  952.          {
  953.           if(IsPlayerConnected(target))
  954.           {
  955.                 GivePlayerWeapon(target, weapid, ammo);
  956.                 new str[150];
  957.                 format(str, sizeof(str),"Administrator %s has given you %d ammo of weapon %d", PlayerName(playerid), ammo, weapid);
  958.                 SendClientMessage(target, COLOR_ORANGE, str);
  959.                 TargetCMDMessage(playerid, target,"GIVEWEAPON");
  960.           }
  961.           else return SendClientMessage(playerid, COLOR_RED,"Player is not connected!");
  962.          }
  963.          else return SendClientMessage(playerid, COLOR_RED,"You are not allowed to give this weapon!");
  964.   }
  965.   else return SendClientMessage(playerid, COLOR_WHITE,"SERVER: Unknown command!");
  966.   return 1;
  967. }
  968.  
  969. CMD:explode(playerid, params[])
  970. {
  971.    if(PlayerInfo[playerid][pAdmin] >= 2)
  972.    {
  973.           new player1, Float:x, Float:y, Float:z, str[70];
  974.           if(sscanf(params,"d", player1)) return SendClientMessage(playerid, COLOR_RED,"[USAGE]: /explode [playerid] ");
  975.           if(IsPlayerConnected(player1))
  976.           {
  977.                  GetPlayerPos(player1, x, y, z);
  978.                  CreateExplosion(x, y, z, 7, 10.0);
  979.                  format(str, sizeof(str),"You have exploded %s!", PlayerName(player1));
  980.                  SendClientMessage(playerid, COLOR_RED, str);
  981.                  TargetCMDMessage(playerid, player1,"EXPLODE");
  982.           }
  983.                  else return SendClientMessage(playerid, COLOR_RED,"That player is not connected!");
  984.    }
  985.    else return SendClientMessage(playerid, COLOR_WHITE,"SERVER: Unknown command!");
  986.    return 1;
  987. }
  988.  
  989. CMD:freeze(playerid,params[])
  990. {
  991.     if(PlayerInfo[playerid][pAdmin] >= 1)
  992.     {
  993.         new id;
  994.         if(sscanf(params,"u",id)) return SendClientMessage(playerid,-1,"USAGE: /freeze [ID]");
  995.         if(!IsPlayerConnected(id)) return SendClientMessage(playerid,-1,"That player is not connected");
  996.         new str[100];
  997.         format(str,sizeof (str),"You have been frozen by an admin.", id);
  998.         SendClientMessage(id, COLOR_RED, str);
  999.         TogglePlayerControllable(id,0);
  1000.     }
  1001.     return 1;
  1002. }
  1003.  
  1004. CMD:unfreeze(playerid,params[])
  1005. {
  1006.     if(PlayerInfo[playerid][pAdmin] >= 1)
  1007.     {
  1008.         new id;
  1009.         if(sscanf(params,"u",id)) return SendClientMessage(playerid,-1,"USAGE: /unfreeze [ID]");
  1010.         if(!IsPlayerConnected(id)) return SendClientMessage(playerid,-1,"That player is not connected");
  1011.         new str[100];
  1012.         format(str,sizeof(str),"You have been unfrozen by an admin.",id);
  1013.         SendClientMessage(id,COLOR_RED,str);
  1014.         TogglePlayerControllable(id,1);
  1015.     }
  1016.     return 1;
  1017. }
  1018.  
  1019. CMD:mynetstats(playerid,params[])
  1020. {
  1021.     new stats[400+1];
  1022.     GetPlayerNetworkStats(playerid, stats, sizeof(stats)); // get your own networkstats
  1023.     ShowPlayerDialog(playerid, 7, DIALOG_STYLE_MSGBOX, "My NetworkStats", stats, "Okay", "");
  1024.     return 1;
  1025. }
  1026.  
  1027. CMD:achat(playerid, params[])
  1028. {
  1029.     if(PlayerInfo[playerid][pAdmin] >= 1)
  1030.     {
  1031.         new text[150];
  1032.         if(sscanf(params, "s[150]",text)) return SendClientMessage(playerid, COLOR_RED, "/(a)chat [text]");
  1033.         format(text, sizeof(text), "[Admin]%s: %s",PlayerName(playerid), text);
  1034.         SendAdminMessage(COLOR_ORANGE, text);
  1035.     }
  1036.     else
  1037.     {
  1038.         SendClientMessage(playerid, COLOR_WHITE,"SERVER: Unknown command!");
  1039.     }
  1040.     return 1;
  1041. }
  1042.  
  1043. CMD:a(playerid, params[]) return cmd_achat(playerid, params);
  1044.  
  1045. CMD:aduty(playerid,params[])
  1046. {
  1047.     if(PlayerInfo[playerid][pAdmin] >= 1)
  1048.     {
  1049.         new str[100];
  1050.         SetPlayerColor(playerid,0xFFD700);
  1051.         SetPlayerHealth(playerid,999999999.9);
  1052.         format(str,sizeof(str),"%s is now on admin duty.",PlayerName(playerid));
  1053.         SendClientMessageToAll(COLOR_ORANGE,str);
  1054.     }
  1055.     return 1;
  1056. }
  1057.  
  1058. CMD:aoffduty(playerid,params[])
  1059. {
  1060.     if(PlayerInfo[playerid][pAdmin] >= 1)
  1061.     {
  1062.         SetPlayerColor(playerid,-1);
  1063.         SetPlayerHealth(playerid,100.0);
  1064.     }
  1065.     return 1;
  1066. }
  1067.  
  1068. CMD:report(playerid, params[])
  1069. {
  1070.    new player1, str[150], reason[66];
  1071.    if(sscanf(params,"ds[66]", player1, reason)) return SendClientMessage(playerid, COLOR_RED,"[USAGE]: /report [playerid] [reason]");
  1072.    if(IsPlayerConnected(player1))
  1073.    {
  1074.           format(str, sizeof(str),"@New Report| Reporter: %s | Victim: %s | Reason: %s", PlayerName(playerid), PlayerName(player1), reason);
  1075.           MessageToAdmins(COLOR_ORANGE, str);
  1076.           SendClientMessage(playerid, COLOR_ORANGE,"Your report has been sent to online administrators!");
  1077.    }
  1078.    else return SendClientMessage(playerid, COLOR_RED,"That player is not connected!");
  1079.    return 1;
  1080. }
  1081.  
  1082. CMD:goto(playerid, params[])
  1083. {
  1084.     new playerb;
  1085.     if (PlayerInfo[playerid][pAdmin] >= 2)
  1086.     {
  1087.         if(sscanf(params, "u", playerb)) return SendClientMessage(playerid,COLOR_RED, "USAGE: /goto [playerid]");
  1088.         if(!IsPlayerConnected(playerb)) return SendClientMessage(playerid,COLOR_RED,"That player is not connected.");
  1089.         new Float:x, Float:y, Float:z;
  1090.         GetPlayerPos(playerb, x, y, z);
  1091.         SetPlayerPos(playerid, x+1, y+1, z);
  1092.     }
  1093.     return 1;
  1094. }
  1095.  
  1096. CMD:get(playerid, params[])
  1097. {
  1098.     new playerb;
  1099.     if (PlayerInfo[playerid][pAdmin] >= 2)
  1100.     {
  1101.         if(sscanf(params, "u", playerb)) return SendClientMessage(playerid,COLOR_RED, "USAGE: /get [playerid]");
  1102.         if(!IsPlayerConnected(playerb)) return SendClientMessage(playerid,COLOR_RED,"That player is not connected.");
  1103.         new Float:x, Float:y, Float:z;
  1104.         GetPlayerPos(playerid, x, y, z);
  1105.         SetPlayerPos(playerb, x+1, y+1, z);
  1106.     }
  1107.     return 1;
  1108. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement