Advertisement
Guest User

Untitled

a guest
Jun 23rd, 2017
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.87 KB | None | 0 0
  1. CMD:aclear(playerid, params[])
  2. {
  3. if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "Trebuie sa te loghezi prima data.");
  4. if(IsPlayerConnected(playerid))
  5. {
  6. if(PlayerInfo[playerid][pAdmin] >= 2)
  7. {
  8. new id,string[128],giveplayer[30],sendername[30];
  9. if(sscanf(params, "u", id)) return SCM(playerid,COLOR_WHITE,"{FFFFFF}Syntax: {FFFFFF}/aclear <Name/Playerid>");
  10. {
  11. if(IsPlayerConnected(id))
  12. {
  13. if(id != INVALID_PLAYER_ID)
  14. {
  15. if(id == playerid) return SendClientMessage(playerid, COLOR_WHITE, "You cannot clear yourself.");
  16. GetPlayerName(id, giveplayer, sizeof(giveplayer));
  17. GetPlayerName(playerid, sendername, sizeof(sendername));
  18. format(string, sizeof(string), "* You cleared the Records and Wanted Points of %s.", giveplayer);
  19. SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
  20. format(string, sizeof(string), "* Admin %s has cleared your Records and Wanted Points.", sendername);
  21. SendClientMessage(id, COLOR_LIGHTBLUE, string);
  22. format(string, sizeof(string), "* %s has cleared %s's Records and Wanted Points.", sendername, giveplayer);
  23. SendTeamMessage(8, COLOR_LIGHTBLUE, string);
  24. SendTeamMessage(3, COLOR_LIGHTBLUE, string);
  25. SendTeamMessage(2, COLOR_LIGHTBLUE, string);
  26. SendTeamMessage(1, COLOR_LIGHTBLUE, string);
  27. WantedPoints[id] = 0;
  28. PlayerInfo[id][pWantedLevel] = 0;
  29. SetPlayerWantedLevel(id, 0);
  30. DestroyDynamic3DTextLabel(WantedScris[id]);
  31. PlayerTextDrawHide(id, WantedText[id]);
  32. ClearCrime(id);
  33. Update(id,pWantedLevelx);
  34. }
  35. }
  36. else
  37. {
  38. SendClientMessage(playerid, COLOR_WHITE, "{FFFFCC}EROARE: Player-ul nu e conectat.");
  39. }
  40. }
  41. }
  42. }
  43. return 1;
  44. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement