SecretBoss

Untitled

Dec 3rd, 2015
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.91 KB | None | 0 0
  1.  
  2. public OnPlayerCommandReceived(playerid, cmdtext[])
  3. {
  4. if(playerData[playerid][canUseCommands] || playerData[playerid][playerLevel] >= 1)
  5. {
  6. if(playerData[playerid][hasSpawned] || playerData[playerid][playerLevel] >= 1)
  7. {
  8. playerData[playerid][canUseCommands] = false;
  9. playerData[playerid][commandTimer] = SetTimerEx("command", 1020, false, "i", playerid);
  10.  
  11. new loggingString[256];
  12. format(loggingString, sizeof(loggingString), "%s used command: %s", playerData[playerid][playerNamee], cmdtext);
  13. writeInLog("commandLog.html", loggingString);
  14.  
  15. return 1; // 2414
  16. }
  17. else
  18. {
  19. SendClientMessage(playerid, COLOR_WHITE, "{B7B7B7}[SERVER] {FFFFFF}You cannot use commands while you're not spawned.");
  20. return 0;
  21. }
  22. }
  23. else
  24. {
  25. SendClientMessage(playerid, COLOR_WHITE, "{B7B7B7}[SERVER] {FFFFFF}Please wait before using another command.");
  26. return 0;
  27. }
  28. }
Advertisement
Add Comment
Please, Sign In to add comment