Advertisement
Guest User

Untitled

a guest
Feb 17th, 2019
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.07 KB | None | 0 0
  1. public OnPlayerCommandReceived(playerid, cmd[], params[], flags)
  2. {
  3. if(!IsPlayerConnected(playerid))
  4. {
  5. SendClientMessage(playerid, -1, "{FF0000}SERVER: {FFFFFF}Niste ulogovani.");
  6. return(false);
  7. }
  8. if(PI[playerid][Admin] == 0)
  9. if(GetTickCount()-gtc_Cmd[playerid] < 2000)
  10. {
  11. SendClientMessage(playerid, GRAD2, "Server - Komande mozete koristiti svake 2 sekunde.");
  12. return(false);
  13. }
  14. gtc_Cmd[playerid] = GetTickCount();
  15. return 1;
  16. }
  17.  
  18. public OnPlayerCommandPerformed(playerid, cmd[], params[], result, flags)
  19. {
  20. if(PI[playerid][Pol] == 0)
  21. {
  22. SendClientMessage(playerid,-1, "Izaberite pol!!! ((/musko /zensko))");
  23. return false;
  24. }
  25. if(result == -1)
  26. {
  27. SendClientMessage(playerid,-1,"{ffffff}Server - "C_BELA"Komanda ne postoji! /komande za spisak komandi.");
  28. return 0;
  29. }
  30. new dan,mesec,godina;
  31. getdate(godina, mesec, dan);
  32. new string[80]; format(string,sizeof(string),"%s | %s | Date: %d.%d.%d.",GetName(playerid),cmd,dan,mesec,godina); LogKomandi(string);
  33. return 1;
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement