07.08.2011, 23:48
This is my /helpme command, after testing it i found out that when a normal player (Who is not a helper) uses this command it sends a message to online helpers But this Doesn't show up for the player
and PlayerStat[playerid][HelpmeReloadTime] isn't set to 61. However if you are a helper and you use this command it will work perfectly. thanks for ur help.
Код:
SendClientMessage(playerid, GREEN, "You have successfully sent a help request, please be patient");
Код:
COMMAND:helpme(playerid, params[]) { new message[128], string[128]; if(PlayerStat[playerid][hMuted] == 1) return SendClientMessage(playerid, GREY, "You are muted from sending help requests."); if(sscanf(params,"s[128]", message))return SendClientMessage(playerid, GREY, "USAGE: /helpme [message]"); if(PlayerStat[playerid][HelpmeReloadTime] > 1) return SendClientMessage(playerid, GREY, "You must wait 10 seconds before sending another help request."); for(new i = 0; i < MAX_PLAYERS; i++) { if(IsPlayerConnected(i) && PlayerStat[i][HelperLevel] >= 1) { format(string, sizeof(string), "(( %s (ID: %d) has sent a help request: %s ))", GetOOCName(playerid), playerid, message); SendClientMessage(i, GREEN, string); HelpmeLog(string); SendClientMessage(playerid, GREEN, "You have successfully sent a help request, please be patient"); PlayerStat[playerid][HelpmeReloadTime] = 61; } } return 1; }