show dialog on clicking "Spawn"
#10

Try this.


Assuming that PlayerTeam[playerid]; is the teamId and also ID 0 is when he is in no team yet, and teams start from 1 onwards.

Код:
public OnPlayerRequestSpawn(playerid)
{
    if(PlayerTeam[playerid] == 0)
    {
        ShowPlayerDialog(......);
        return 0;
    }
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == /*Dialog ID that you put in ShowPlayerDialog*/)
    {
        if(response == 0)     // If a Player Choose first Button
        {
        }
        if(response == 1)    // If a Player Choose second Button   ( Correctly )
        {
             SpawnPlayer(playerid);
             SetPlayerSpawn(playerid, /* Cordinates where you want him to spawn */);
        }
    }
    return 1;
}
I guess this should work, thou its untested.
Reply


Messages In This Thread
show dialog on clicking "Spawn" - by SonToku - 11.02.2011, 08:07
Re: show dialog on clicking "Spawn" - by xRyder - 11.02.2011, 08:09
Re: show dialog on clicking "Spawn" - by SonToku - 11.02.2011, 08:12
Re: show dialog on clicking "Spawn" - by xRyder - 11.02.2011, 08:17
Re: show dialog on clicking "Spawn" - by BMUK - 11.02.2011, 08:25
Re: show dialog on clicking "Spawn" - by Mean - 11.02.2011, 12:47
Re: show dialog on clicking "Spawn" - by Sasino97 - 11.02.2011, 14:13
Re: show dialog on clicking "Spawn" - by SonToku - 11.02.2011, 15:54
Re: show dialog on clicking "Spawn" - by Sasino97 - 17.02.2011, 14:50
Re: show dialog on clicking "Spawn" - by silvan - 19.02.2011, 07:33

Forum Jump:


Users browsing this thread: 2 Guest(s)