Advertisement
Guest User

Untitled

a guest
Dec 20th, 2016
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.45 KB | None | 0 0
  1. ocmd:aduty(playerid,params[]){
  2. new string[128];
  3. if(PlayerInfo[playerid][pAdmin] < 1) return SendClientMessage(playerid,COLOR_GRAY,"Du bist ein Admin!!");
  4. if(PlayerInfo[playerid][pAdminDuty] == 0)
  5. {
  6. format(string,sizeof(string),"%s Ist jetzt als Admin Aktiv",GetName(playerid));
  7. SendClientMessageToAll(COLOR_GREEN,string);
  8. SetPlayerHealth(playerid,500000);
  9. SetPlayerColor(playerid,COLOR_CYAN);
  10. PlayerInfo[playerid][pAdminDuty] = 1;
  11. adminlabel[playerid] = Create3DTextLabel("Admin on duty\n Nicht Angreifen!", COLOR_RED, 30.0, 40.0, 50.0, 40.0, 0);
  12. Attach3DTextLabelToPlayer(adminlabel[playerid], playerid, 0.0, 0.0, 0.7);
  13. }
  14. else
  15. if(PlayerInfo[playerid][pAdminDuty] == 1)
  16. {
  17. format(string,sizeof(string),"%s Hat sich als admin abegmeldet",GetName(playerid));
  18. SendClientMessageToAll(COLOR_RED,string);
  19. PlayerInfo[playerid][pAdminDuty] = 0;
  20. ResetPlayerWeapons(playerid);
  21. SetPlayerColor(playerid,COLOR_WHITE);
  22. SetPlayerHealth(playerid,0);
  23. ForceClassSelection(playerid);
  24. Delete3DTextLabel(adminlabel[playerid]);
  25. }
  26. return 1;
  27. }
  28. und die stock
  29.  
  30.  
  31. stock GetName(playerid)
  32. {
  33. new Name[MAX_PLAYER_NAME];
  34. if(IsPlayerConnected(playerid))
  35. {
  36. GetPlayerName(playerid, Name, sizeof(Name));
  37. }
  38. else
  39. {
  40. Name = "Disconnected/Nothing";
  41. }
  42.  
  43. return Name;
  44. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement