Help with Teams
#1

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?
Reply
#2

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.
Reply
#3

PHP код:
CMD:deathmatch(playeridparams[])
{
    
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(playerid1);
            
SetPlayerPos(playeridx,y,z);
        }
        else if(
listitem == 1)
          {
            
SetPlayerTeam(playerid2);
            
SetPlayerPos(playeridx,y,z);
        }
    }

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)