#2

Код:
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");
}
Try this!

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].
Reply


Messages In This Thread
help - by ahameed4755 - 31.08.2015, 15:17
Re: help - by Karan007 - 31.08.2015, 15:20
Re: help - by ahameed4755 - 31.08.2015, 15:29

Forum Jump:


Users browsing this thread: 1 Guest(s)