/accept invite?
#1

So I made /invite command, but how do I let the player choose will he join it or not? /accept or /deny it?

pawn Код:
CMD:invite(playerid, params[])
{
    if(PlayerInfo[playerid][pLeader] >= 1)
    {
        new otherplayerid;
        if(sscanf(params, "u", otherplayerid))
            SendClientMessage(playerid, COLOR_RED, "/invite [playerid/name]");
        else if(otherplayerid == INVALID_PLAYER_ID)
            SendClientMessage(playerid, COLOR_RED, "Player not connected");
        else
        {
            new string[72];
            format(string, sizeof(string), "<!>%s has invited you to join their team!", GetPlayerNameEx(otherplayerid));
            SendClientMessage(otherplayerid, COLOR_WHITE,string);
            PlayerInfo[otherplayerid][pTeam] = PlayerInfo[playerid][pTeam];
        }
    }
    else
    {
        SendClientMessage(playerid, COLOR_RED, "You are not a team leader!");
    }
    return 1;
}
Reply


Messages In This Thread
/accept invite? - by Pawnie - 31.08.2013, 15:46
Re : /accept invite? - by 1Geek - 31.08.2013, 15:53
Re: /accept invite? - by Dragonsaurus - 31.08.2013, 16:08
Re : Re: /accept invite? - by 1Geek - 31.08.2013, 19:06
Re: /accept invite? - by Pawnie - 31.08.2013, 22:34

Forum Jump:


Users browsing this thread: 3 Guest(s)