Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public OnPlayerCommandReceived(playerid, cmdtext[])
- {
- if(playerData[playerid][canUseCommands] || playerData[playerid][playerLevel] >= 1)
- {
- if(playerData[playerid][hasSpawned] || playerData[playerid][playerLevel] >= 1)
- {
- playerData[playerid][canUseCommands] = false;
- playerData[playerid][commandTimer] = SetTimerEx("command", 1020, false, "i", playerid);
- new loggingString[256];
- format(loggingString, sizeof(loggingString), "%s used command: %s", playerData[playerid][playerNamee], cmdtext);
- writeInLog("commandLog.html", loggingString);
- return 1; // 2414
- }
- else
- {
- SendClientMessage(playerid, COLOR_WHITE, "{B7B7B7}[SERVER] {FFFFFF}You cannot use commands while you're not spawned.");
- return 0;
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_WHITE, "{B7B7B7}[SERVER] {FFFFFF}Please wait before using another command.");
- return 0;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment