help with "unintended assignment"
#2

pawn Код:
if(!strcmp(cmdtext,"/acmds",true))
{
    if(Admin[playerid] == 1)
    {
        ShowPlayerDialog(playerid,22,DIALOG_STYLE_MSGBOX,"Admin Commands level 1","/spawncar [vehiclename] - Spawns a vehicle\n/as [text] -\n/fixit - fixes vehicle\n/healme\n/adgateo - open, /adgatec - close ; the gate\n/abase - teleports you to the admin base\n/jail [playerid] - jails the player\n/unjail [playerid] - unjails the player\n/kick [playerid] [reason]","Close","");
    }
    else if(Admin[playerid] == 2)
    {
        ShowPlayerDialog(playerid,23,DIALOG_STYLE_MSGBOX,"Admin Commands level 2","/minigun - gives you a minigun\n/gmx - restarts the server\n/spawncar [vehiclename] - Spawns a vehicle\n/as [text] -\n/fixit - fixes vehicle\n/healme\n/adgateo - open, /adgatec - close ; the gate\n/abase - teleports you to the admin base\n/jail [playerid] - jails the player\n/unjail [playerid] - unjails the player\n/kick [playerid] [reason]","Close","");
    }
    else if(Admin[playerid] == 3)
    {
        ShowPlayerDialog(playerid,24,DIALOG_STYLE_MSGBOX,"Admin Commands level 3","/minigun - gives you a minigun\n/spawncar [vehiclename] - Spawns a vehicle\n/as [text] -\n/fixit - fixes vehicle\n/healme\n/adgateo - open, /adgatec - close ; the gate\n/abase - teleports you to the admin base\n/jail [playerid] - jails the player\n/unjail [playerid] - unjails the player\n/kick [playerid] [reason]","Close","");
    }
    else if(Admin[playerid] < 1)
    {
        SendClientMessage(playerid, COLOR_RED, "[LS-GW] You are not an admin!");
    }
    return 1;
}
in "IF" statement you must put two equal signs so check if it's the required number. For more info you can always click the following link:-

https://sampwiki.blast.hk/wiki/Control_Structures
-FalconX
Reply


Messages In This Thread
help with "unintended assignment" - by MarkoN - 28.05.2012, 22:20
Re: help with "unintended assignment" - by FalconX - 28.05.2012, 22:23
Re: help with "unintended assignment" - by ReneG - 28.05.2012, 22:26
Re: help with "unintended assignment" - by MarkoN - 28.05.2012, 22:26

Forum Jump:


Users browsing this thread: 1 Guest(s)