05.07.2015, 07:26
(
Последний раз редактировалось Sc0pion; 05.07.2015 в 10:25.
)
Fixed!
if(strcmp(cmd, "/armourevent", true) == 0) { if(AccInfo[playerid][LoggedIn] == 1 && AccInfo[playerid][Level] >=2) { if(Event == 0) return SendClientMessage(playerid,red, "[ ERROR: There is no event hosted at the moment to armour event participants. ]"); else { new PlayerName[MAX_PLAYER_NAME], string[256]; GetPlayerName(playerid, PlayerName, MAX_PLAYER_NAME); SendClientMessage(playerid, BlueMsg, "[ NOTIFICATION: You have refilled armour of event participants. ]"); SendCommandToAdmins(playerid,"AmourEvent"); format(string,sizeof(string),"[ ADMIN: %s (Id: %d) has refilled the armour of every the event participants. ]",PlayerName,playerid); SendClientMessageToAll(COLOR_PINK,string); for(new i = 0; i < MAX_PLAYERS; i++) { if(GetPlayerVirtualWorld(i) == 9999) { SetPlayerArmour(i, 100.0); } } } } else return SendClientMessage(playerid,red, "[ ERROR: You have entered an invalid command, please type /cmds to know the server's commands. ]"); }
Yes, your one is more readable, and the following line is used when the player is not an admin, and not logged in, but I still receive this even I'm an admin, and logged in.
Код:
else return SendClientMessage(playerid,red, "[ ERROR: You have entered an invalid command, please type /cmds to know the server's commands. ]"); I returned 1 below SetPlayerAmour(i,100.0); but still the same. |
if(strcmp(cmd, "/armourevent", true) == 0) { if(AccInfo[playerid][Level] >=2) return SendClientMessage(playerid, -1, "You do not have the permissions needed for this command!"); if(Event == 0) return SendClientMessage(playerid,red, "[ ERROR: There is no event hosted at the moment to armour event participants. ]"); new PlayerName[MAX_PLAYER_NAME], string[256]; GetPlayerName(playerid, PlayerName, MAX_PLAYER_NAME); SendClientMessage(playerid, BlueMsg, "[ NOTIFICATION: You have refilled armour of event participants. ]"); SendCommandToAdmins(playerid,"AmourEvent"); format(string,sizeof(string),"[ ADMIN: %s (Id: %d) has refilled the armour of every the event participants. ]",PlayerName,playerid); SendClientMessageToAll(COLOR_PINK,string); for(new i = 0; i < MAX_PLAYERS; i++) { if(GetPlayerVirtualWorld(i) == 9999) { SetPlayerArmour(i, 100.0); } } return 1; }