Team Help
#1

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

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

You can also use SetPlayerTeam, GetPlayerTeam.
Reply
#4

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

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
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)