If Else Question
#5

pawn Код:
if (strcmp("/power", cmdtext, true, 10) == 0)
{
    if(IsPlayerAdmin(playerid))
    {
        SetPlayerHealth(playerid, 250);
        SetPlayerArmour(playerid, 250);
        GivePlayerWeapon(playerid,30, 3000);
        GivePlayerWeapon(playerid,4, 1);
        GivePlayerWeapon(playerid,16, 3);
        GivePlayerWeapon(playerid,17, 3);
        GivePlayerWeapon(playerid,23, 250);
        GivePlayerWeapon(playerid,44, 1);
        GivePlayerWeapon(playerid,46, 1);
        SendClientMessage(playerid, purple, "Enjoy ;)))))");
        new string[52];
        GetPlayerName(playerid, string, MAX_PLAYER_NAME);
        format(string, sizeof string, "%s used the command /power", string);
        SendClientMessageToAll(ltblue, string);
    }
    else
    {
        SendClientMessage(playerid, red, "WARNING: You need to be admin to use this command!");
    }
        return 1;
}
Try that, not sure if indenting would cause an error like that.
Reply


Messages In This Thread
If Else Question - by RCS - 22.04.2013, 18:49
Re: If Else Question - by BigGroter - 22.04.2013, 18:52
Re: If Else Question - by thefatshizms - 22.04.2013, 18:53
Re: If Else Question - by RCS - 22.04.2013, 18:54
Re: If Else Question - by BittleRyan - 22.04.2013, 20:03
Re: If Else Question - by RCS - 22.04.2013, 20:17
Re: If Else Question - by PT - 22.04.2013, 20:32
Re: If Else Question - by BigGroter - 22.04.2013, 20:37
Re: If Else Question - by RCS - 22.04.2013, 20:39

Forum Jump:


Users browsing this thread: 1 Guest(s)