SA-MP Forums Archive
Team Help - 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: Team Help (/showthread.php?tid=396303)



Team Help - AchievementMaster360 - 30.11.2012

I'm trying to create a TDM script and I'm not sure how to create teams and I'm not sure how to create a dialog selecting the teams can anybody help out?

The teams are trying to make are United States, Italy, Russia, Chile, United Kingdom, Germany, Australia, And Japan

Please Help me out


Re: Team Help - DaRk_RaiN - 30.11.2012

Well use https://sampwiki.blast.hk/wiki/ShowPlayerDialog
and make the dialog show under OnPlayerRequestClass.

And then use https://sampwiki.blast.hk/wiki/OnDialogResponse to set the teams.


Re: Team Help - stabker - 30.11.2012

You can also use SetPlayerTeam, GetPlayerTeam.


Re: Team Help - AchievementMaster360 - 01.12.2012

How can i create the teams i need a little help with that


Re: Team Help - Lz - 01.12.2012

Most basic way of teams with a command this wont save them though..

before your functions add

pawn Код:
#define team_lspd 1
#define team_crook 2
new pTeam[MAX_PLAYERS];
Defining the teams and then creating a variable to store them in.

Now on your OnPlayerCommandText add this

pawn Код:
if (strcmp("/cop", cmdtext, true, 10) == 0)
    {
    SendClientMessage(playerid, copcolor, "You are now a cop.");
    pTeam[playerid] = team_cop;
    SetPlayerSkin(playerid, 281);
    GivePlayerWeapon(playerid, 3, 0);
    }
      Return 1;
}
The last code is pretty self explanatory, Read it yourself and see why