/invite help?
#3

If you want to make the code a bit more efficient and save some lines, you'd better change to zcmd and sscanf.

And for the :PlayerInfo[playerid][pLeader] part.

pawn Код:
swtich(PlayerInfo[playerid][pLeader])
{
     case 1: {} // Does shit if PlayerInfo[playerid][pLeader] == 1;
}

ZCMD + SScanf Example:
pawn Код:
command(invite, playerid, params[])
{
    new iId;
    if(sscanf(params, "i", iId)) return SendClientMessage(playerid, COLOR_GRAD2, "KASUTUS: /invite [mдngijaID/OsaNimest]");
    if (PlayerInfo[para1][pMember] == 0 && PlayerInfo[para1][pFMember] == 255)
    {
        switch(PlayerInfo[playerid][pLeader])
        {
            case 1: // Could also add multiple cases like this: case 1,2,3: {}
            {
                PlayerInfo[para1][pTeam] = 2; gTeam[para1] = 2; ftext = "Police Force"; ChosenSkin[para1] = 71; SetPlayerSkin(para1, 71);
            }
        }
    }
    return 1;
}
Didn't compile this.
Reply


Messages In This Thread
/invite help? - by Spiral - 17.10.2010, 12:23
Re: /invite help? - by TheXIII - 17.10.2010, 13:05
Re: /invite help? - by Cameltoe - 17.10.2010, 13:30
Re: /invite help? - by Spiral - 17.10.2010, 14:57
Re: /invite help? - by Cameltoe - 17.10.2010, 14:58
Re: /invite help? - by Spiral - 18.10.2010, 15:15
Re: /invite help? - by TheXIII - 18.10.2010, 15:41
Re: /invite help? - by Spiral - 18.10.2010, 15:49
Re: /invite help? - by Cameltoe - 18.10.2010, 15:51
Re: /invite help? - by Spiral - 18.10.2010, 15:53
Re: /invite help? - by Spiral - 18.10.2010, 15:55
Re: /invite help? - by Cameltoe - 18.10.2010, 15:58
Re: /invite help? - by Spiral - 18.10.2010, 16:01
Re: /invite help? - by Spiral - 19.10.2010, 15:51

Forum Jump:


Users browsing this thread: 1 Guest(s)