31.08.2015, 15:20
Код:
CMD:ihealth(playerid,params[])
{
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, 0xC2A2DAAA, "You need to be an RCON admin!");
SetPlayerHealth(playerid,99999.99);
SetPlayerArmour(playerid,99999.99);
SendClientMessage(playerid,0xC2A2DAAA,"infinite health is activated");
}
EXPLANATION CODE:-
Well, you should have added another "}" when you put else, but here's another method of doing so. ^
I changed "else" to "return".
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, 0xC2A2DAAA, "You need to be an RCON admin!");
This line means "If the player is not admin, the server will return the following message". [Note:- This symbol "!" means if not].

