Not all players, just one
#1

How can I let this show for only ONE player.

pawn Код:
forward Map1Loaded();
public Map1Loaded()
{
    for( new i = 0; i < MAX_PLAYERS; i ++ )
    {
        TextDrawHideForPlayer(i, LoadingMap1);
        TextDrawHideForPlayer(i, Map1Name);
        TextDrawHideForPlayer(i, StripesMap1);
        ShowPlayerDialog(i, DIALOG_TEAMSELECT, DIALOG_STYLE_LIST, "Choose your team", "Spetsnaz\nBlack Ops", "Choose", "");
        SetPlayerPos(i, 1565.1692, -3558.5388, 52.3151);
        SetCameraBehindPlayer(i);
        TogglePlayerControllable(i, 1);
       
    }
}


This is what calls the Map1Loaded:

pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if( newkeys & KEY_YES )
    {
        ShowPlayerDialog(playerid, DIALOG_CHOOSEGAME, DIALOG_STYLE_LIST, "Choose your gamemode...", "Team Deathmatch\nSearch and Destroy [SOON]\n-----------------------\n == Go to lobby ==", "Choose", "");
    }
    return 1;
}
Then if they choose Team Deathmatch:

pawn Код:
if(response)
    {
    switch(dialogid)
        {
            case DIALOG_CHOOSEGAME:
            {
                switch(listitem)
                {
                    case 0:
                    {
                        TogglePlayerControllable(playerid, 0);
                        SetPlayerCameraPos(playerid, 1471.0837, -3464.1860, 61.6439);
                        SetPlayerCameraLookAt(playerid, 1576.0729, -3625.4319, 3.4897);
                        TextDrawShowForPlayer(playerid, LoadingMap1);
                        TextDrawShowForPlayer(playerid, Map1Name);
                        TextDrawShowForPlayer(playerid, StripesMap1);
                        SetTimer("Map1Loaded", 7000, 0);
                    }
                    case 1:
                    {
                        ShowPlayerDialog(playerid, DIALOG_CHOOSEGAME, DIALOG_STYLE_LIST, "Choose your gamemode...", "Team Deathmatch\nSearch and Destroy [SOON]\n-----------------------\n == Go to lobby ==", "Choose", "");
                    }
                    case 2:
                    {
                        ShowPlayerDialog(playerid, DIALOG_CHOOSEGAME, DIALOG_STYLE_LIST, "Choose your gamemode...", "Team Deathmatch\nSearch and Destroy [SOON]\n-----------------------\n == Go to lobby ==", "Choose", "");
                    }
                    case 3:
                    {
                        SetPlayerPos(playerid, 2009.4140, 1017.8990, 994.4680);
                    }
                }
            }
        }
    }

But at the end if the player gets the dialog of choosing his team other players get it also.
How to fix this?
Reply


Messages In This Thread
Not all players, just one - by arjanforgames - 23.03.2013, 15:54
Re: Not all players, just one - by erminpr0 - 23.03.2013, 16:08
Re: Not all players, just one - by Misiur - 23.03.2013, 16:10
Re: Not all players, just one - by arjanforgames - 23.03.2013, 16:12

Forum Jump:


Users browsing this thread: 4 Guest(s)