SA-MP Forums Archive
Help with Teams TEAM_POLICE etc... - 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 TEAM_POLICE etc... (/showthread.php?tid=136252)



Help with Teams TEAM_POLICE etc... - hardstop - 24.03.2010

well i lately added teams to my blank gamemode

#define TEAM_POLITSEI in english it means police
#define TEAM_INIMENE in english it means civilians



how can i make that on spawn

Like Civilians get only Money
And Police gets Weapons



Re: Help with Teams TEAM_POLICE etc... - VirSpectorX - 24.03.2010

Try this:

pawn Код:
#define TEAM_POLITSEI 1
#define TEAM_INIMENE 2
new gTeam[MAX_PLAYERS];

public OnPlayerConnect(playerid)
{
//This script is just an example, to make players automatically become a Police
gTeam[playerid] = TEAM_POLITSEI
}

public OnPlayerSpawn(playerid)
{
if(gTeam[playerid] == TEAM_POLITSEI)
{
//Script For Police
}
else if(gTeam[playerid] == TEAM_INIMENE)
{
//Script For Civilian
}
}



Re: Help with Teams TEAM_POLICE etc... - hardstop - 24.03.2010

Thnx