indexed
#5

Quote:
Originally Posted by gamer_Z
Посмотреть сообщение
if you have a vairable
pawn Код:
new variable;
then it needs to be made an array
pawn Код:
new variable[]
but you can also need some more complex code as
pawn Код:
new variable[MAX_PLAYERS][PLAYER_INFO][MAX_SAME_INFO];
mind showing us your code where it is used and declared?
Here is the code
pawn Код:
COMMAND:unjail(playerid, params[])
{
    new id;
    if(sscanf(params,"u", id))return SendClientMessage(playerid, 0x33CCFFAA, "Usage: /Unjail [id]");
    if(IsPlayerConnected(id))
    if(Jail[id] == 0) return SendClientMessage(playerid,red,"That Player is not in jail!");
    if(PlayerInfo[playerid][Admin] >= 1)
    {
        GetPlayerName(playerid, Name, sizeof(Name));
        format(String, sizeof(String), "%s has unjailed you",Name);
        SendClientMessage(id,green, String);
        Jail[id] = 0;
        SetPlayerPos(playerid, 414.6559,2531.7651,19.1601);
        GivePlayerWeapon(playerid,36,60); //HS Rocket Launcher **
        GivePlayerWeapon(playerid,30,200); //AK-47
        SetPlayerTeam(playerid, 0);
        SetPlayerColor(playerid, COLOR_RED);
        if(PlayerInfo[playerid][Member] == 1)
    {
        SetPlayerColor(playerid,COLOR_GREY);
        SetPlayerTeam(playerid, 1);
        SetPlayerSkin(playerid, 255);
        SetPlayerPos(playerid, 1607.7803,1169.4840,14.2188);
        GivePlayerWeapon(playerid,36,60); //HS Rocket Launcher **
        GivePlayerWeapon(playerid,27,100); //Combat Shotgun
        GivePlayerWeapon(playerid,30,200); //AK-47
        SendClientMessage(playerid,COLOR_GREY,"Combat Team: Airwolves.");
    }
        if(PlayerInfo[playerid][Member] == 2)
    {
        SetPlayerColor(playerid,COLOR_DBLUE);
        SetPlayerTeam(playerid, 2);
        SetPlayerSkin(playerid, 255);
        SetPlayerPos(playerid, 1998.3118,-2352.3438,13.5469);
        GivePlayerWeapon(playerid,36,60); //HS Rocket Launcher **
        GivePlayerWeapon(playerid,27,100); //Combat Shotgun
        GivePlayerWeapon(playerid,30,200); //AK-47
        SendClientMessage(playerid,COLOR_DBLUE,"Combat Team: Bluefoxes.");
    }
        if(PlayerInfo[playerid][Member] == 3)
    {
        SetPlayerColor(playerid,COLOR_YELLOW);
        SetPlayerTeam(playerid, 3);
        SetPlayerSkin(playerid, 255);
        SetPlayerPos(playerid, -1468.5074,-206.8094,14.1484);
        GivePlayerWeapon(playerid,36,60); //HS Rocket Launcher **
        GivePlayerWeapon(playerid,27,100); //Combat Shotgun
        GivePlayerWeapon(playerid,30,200); //AK-47
        SendClientMessage(playerid,COLOR_YELLOW,"Combat Team: Thunderbirds.");
    }
        if(PlayerInfo[playerid][Member] == 1)
    {
        SetPlayerColor(playerid,COLOR_GREY);
        SetPlayerTeam(playerid, 1);
        SetPlayerSkin(playerid, 61);
        SetPlayerPos(playerid, 1607.7803,1169.4840,14.2188);
        GivePlayerWeapon(playerid,36, 75); //HS Rocket Launcher **
        GivePlayerWeapon(playerid,27, 100); //Combat Shotgun
        GivePlayerWeapon(playerid, 38, 100); //Minigun
        GivePlayerWeapon(playerid, 30, 350); //AK-47
        /*SendClientMessage(playerid,COLOR_GREY,"Combat Team: Airwolves.");*/
    }
        if(PlayerInfo[playerid][Member] == 2)
    {
        SetPlayerColor(playerid,COLOR_DBLUE);
        SetPlayerTeam(playerid, 2);
        SetPlayerSkin(playerid, 61);
        SetPlayerPos(playerid, 1998.3118,-2352.3438,13.5469);
        GivePlayerWeapon(playerid,36, 75); //HS Rocket Launcher **
        GivePlayerWeapon(playerid,27, 100); //Combat Shotgun
        GivePlayerWeapon(playerid, 38, 100); //Minigun
        GivePlayerWeapon(playerid, 30, 350); //AK-47
        /*SendClientMessage(playerid,COLOR_DBLUE,"Combat Team: Bluefoxes.");*/
    }
        if(PlayerInfo[playerid][Member] == 3)
    {
        SetPlayerColor(playerid,COLOR_YELLOW);
        SetPlayerTeam(playerid, 3);
        SetPlayerSkin(playerid, 61);
        SetPlayerPos(playerid, -1468.5074,-206.8094,14.1484);
        GivePlayerWeapon(playerid,36, 75); //HS Rocket Launcher **
        GivePlayerWeapon(playerid,27, 100); //Combat Shotgun
        GivePlayerWeapon(playerid, 38, 100); //Minigun
        GivePlayerWeapon(playerid, 30, 350); //AK-47
        /*SendClientMessage(playerid,COLOR_YELLOW,"Combat Team: Thunderbirds.");*/
    }
    }
    return 1;
}
the error is about this
pawn Код:
if(PlayerInfo[playerid][Member]
Reply


Messages In This Thread
indexed - by cruising - 05.04.2011, 08:53
Re: indexed - by Gamer_Z - 05.04.2011, 08:56
Re: indexed - by boelie - 05.04.2011, 08:56
Re: indexed - by cruising - 05.04.2011, 09:04
Re: indexed - by cruising - 05.04.2011, 09:07
Re: indexed - by Gamer_Z - 05.04.2011, 09:08
Re: indexed - by cruising - 05.04.2011, 09:11
Re: indexed - by cruising - 05.04.2011, 09:13
Re: indexed - by Gamer_Z - 05.04.2011, 09:13
Re: indexed - by cruising - 05.04.2011, 09:16
Re: indexed - by Gamer_Z - 05.04.2011, 09:20
Re: indexed - by cruising - 05.04.2011, 09:23
Re: indexed - by Gamer_Z - 05.04.2011, 09:24
Re: indexed - by cruising - 05.04.2011, 09:28
Re: indexed - by Gamer_Z - 05.04.2011, 09:33
Re: indexed - by cruising - 05.04.2011, 09:48
Re: indexed - by Gamer_Z - 05.04.2011, 11:32
Re: indexed - by cruising - 05.04.2011, 20:33

Forum Jump:


Users browsing this thread: 3 Guest(s)