Help with Teams - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Help with Teams (
/showthread.php?tid=274425)
Help with Teams -
Ehab1911 - 05.08.2011
Hello I have my server and my own GM yes, I want to make in it two teams for DM - For example
if players type /deathmatch they get to the Team DM, They have to choose between Team 1 and Team 2, like
/deathmatch
Dialog shows:
TEAM 1
TEAM 2
SELECT CLOSE
to spawn at some place can you help?
Re: Help with Teams -
Whizion - 05.08.2011
Use
this in your command to show them the dialog, and then under
this callback do the other things (spawn etc) according to the player's selection.
Re: Help with Teams -
Kush - 05.08.2011
PHP код:
CMD:deathmatch(playerid, params[])
{
ShowPlayerDialog(playerid,1,DIALOG_STYLE_LIST,"Team Deathmatch...","Team 1\nTeam 2","Select", "Cancel")
return 1;
}
if(dialogid == 1)
{
if(reponse)
{
if(listitem == 0)
{
SetPlayerTeam(playerid, 1);
SetPlayerPos(playerid, x,y,z);
}
else if(listitem == 1)
{
SetPlayerTeam(playerid, 2);
SetPlayerPos(playerid, x,y,z);
}
}
}