23.03.2013, 15:54
How can I let this show for only ONE player.
This is what calls the Map1Loaded:
Then if they choose Team Deathmatch:
But at the end if the player gets the dialog of choosing his team other players get it also.
How to fix this?
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;
}
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?