sscanf question , how to do this ?
#3

pawn Код:
COMMAND:uninvite(playerid, params[])
{
    if(PlayerInfo[playerid][Leader] > 0)
    {
        new giveplayer[20];
        if (!sscanf(params, "i",giveplayer )||!sscanf(params, "s[20]",giveplayer))
        {
            new para1;
            para1 = ReturnUser(giveplayer);
            if(para1 != INVALID_PLAYER_ID)
            {
                if (PlayerInfo[para1][Loggedin] != 0)
                {
                    if (PlayerInfo[para1][Faction] == PlayerInfo[playerid][Leader])
                    {
                        new sendername[MAX_PLAYER_NAME];
                        new string[56];
                        GetPlayerName(playerid, sendername, sizeof(sendername));
                        format(string, sizeof(string), "%s Has uninvited you from his faction",sendername);
                        SendClientMessage(para1,culoare,string);
                        PlayerInfo[para1][Faction] = 0;
                        SetPlayerSkin(para1,25);
                        return 1;
                    }
                    else
                    {
                        SendClientMessage(playerid, culoare, "ERROR : That player is not in your faction");
                        return 1;
                    }
                }
                else
                {
                    SendClientMessage(playerid, culoare, "ERROR: Player Not logged in");
                    return 1;
                }
            }
            else
            {
                SendClientMessage(playerid, culoare, "ERROR : Invalid player");
                return 1;
            }
        }
        else
        {
            SendClientMessage(playerid, culoare, "Use : /invite [playerid]");
            return 1;
        }
    }
    return 1;
}
Reply


Messages In This Thread
sscanf question , how to do this ? - by Dj_maryo1993 - 24.10.2010, 10:29
Re: sscanf question , how to do this ? - by Whizion - 24.10.2010, 10:33
Re: sscanf question , how to do this ? - by Dj_maryo1993 - 24.10.2010, 10:35
Re: sscanf question , how to do this ? - by Whizion - 24.10.2010, 10:42
Re: sscanf question , how to do this ? - by Dj_maryo1993 - 24.10.2010, 10:57

Forum Jump:


Users browsing this thread: 1 Guest(s)