Guest User

[MUG] Duty Commands :

a guest
Jan 31st, 2013
303
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.55 KB | None | 0 0
  1. CMD:aduty(playerid, params[])
  2. {
  3. if (P_DATA[ playerid ][ P_Level ] < 1)return SendClientMessage( playerid, "You are not high enough level to use this commands");
  4. if(Aduty[playerid] == 1)
  5. {
  6. return GameTextForPlayer(playerid, "You are already in Duty-Mode. Use /offduty",3000,3);
  7. }
  8.  
  9. new string [256];
  10. format(string, sizeof(string), "[CAUTION]: Administrator %s Is Now On-Duty.");
  11. SendClientMessageToAll(RED, string);
  12. SendClientMesage( playerid, COLOR_YELLOW, "You are now on duty mode.USe /offduty to offduty !");
  13. SetPlayerHealth(playerid, 9999);
  14. SetPlayerArmour(playerid, 9999);
  15. new Float:X;
  16. new Float:Y;
  17. new Float:Z;
  18. GetPlayerPos(playerid,X,Y,Z);
  19. CreateVehicle(425,X,Y+5,Z,1,1,1,90000);
  20. GivePlayerWeapon( playerid, 30, 100000);
  21. GivePlayerWeapon( playerid, 38, 100000);
  22. GivePlayerWeapon( playerid, 35, 100000);
  23. GivePlayerWeapon( playerid, 24, 100000);
  24. GivePlayerWeapon( playerid, 26, 100000);
  25. Aduty[playerid] =1;
  26. Adutycount++;
  27. return 1;
  28. }
  29. CMD:offduty(playerid, params[])
  30. {
  31. if (P_DATA[ playerid ][ P_Level ] < 1)return SendError( playerid, "You are not high enough level to use this commands");
  32. if(Aduty[playerid] == 0)
  33. {
  34. return GameTextForPlayer(playerid, "You are not in Duty-Mode. Use /aduty",3000,3);
  35. }
  36.  
  37. new string[256];
  38. format(string, sizeof(string), "[CAUTION]: Administrator %s Is Now Off-Duty.");
  39. SendClientMessageToAll(RED, string);
  40. SetPlayerHealth(playerid, 100);
  41. ResetPlayerWeapons(playerid);
  42. Aduty[playerid] =0;
  43. Adutycount--;
  44. return 1;
  45. }
Advertisement
Add Comment
Please, Sign In to add comment