SA-MP Forums Archive
Make list dialog (PlayerRequestClass) - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Make list dialog (PlayerRequestClass) (/showthread.php?tid=399055)



Make list dialog (PlayerRequestClass) - Eminem 2ka9 - 12.12.2012

I basically want the server to start up, then on PlayerRequestClass, I want a dialog to show up showing the teams instead of just standard selecting, I want the team selection in a list dialog.

These are my teams, I see it has been done so:

Код:
public OnPlayerRequestClass(playerid, classid)
{
	IsPlayerChoosingTeam[playerid] = 1;

    SetPlayerPos(playerid, 219.4820,1822.7864,7.5271);
	SetPlayerCameraPos(playerid, 225.7349,1822.9067, 7.521);
	SetPlayerFacingAngle( playerid, 270);
	SetPlayerCameraLookAt(playerid, 219.4820,1822.7864,7.5271);

	switch (classid)
	{
		case 0:
		{
			gTeam[playerid] = T_ENGLAND;
			SetPlayerColor(playerid, C_DGREEN);
			GameTextForPlayer(playerid, "~g~England", 1000, 4);
			CreateExplosion(216.5553,1822.7733,7.4256, 11, 1.0);
	    }
	    case 1:
		{
			gTeam[playerid] = T_RUSSIA;
			SetPlayerColor(playerid, C_RED);
			GameTextForPlayer(playerid, "~r~Russia", 1000, 4);
			CreateExplosion(216.5553,1822.7733,7.4256, 11, 1.0);
	    }
	    case 2:
		{
			gTeam[playerid] = T_IRAQ;
			SetPlayerColor(playerid, C_PURPLE);
			GameTextForPlayer(playerid, "~p~Iraq", 1000, 4);
			CreateExplosion(216.5553,1822.7733,7.4256, 11, 1.0);
		}
	    case 3:
		{
			gTeam[playerid] = T_MEXICO;
			SetPlayerColor(playerid, C_YELLOW);
			GameTextForPlayer(playerid, "~y~Mexico", 1000, 4);
			CreateExplosion(216.5553,1822.7733,7.4256, 11, 1.0);
	    }
	}
  	return 1;
}