19.03.2011, 12:28
Okay you need to add at the top of your script :
and under OnPlayerRequestClass , add
at the end of your script make this callback
SetPlayerTeamFromClass(playerid, classid)
For more information go to
https://sampwiki.blast.hk/wiki/PAWN_tutorial_1
PHP код:
#define TEAM_GROVE 1 //This defines your teams
#define TEAM_BALLA 2 // this means that your not going to use the teams ID's , only TEAM_BALLA.
new gTeam[MAX_PLAYERS];
PHP код:
SetPlayerTeamFromClass(playerid,classid); // This sets the palyer team from class
SetPlayerTeamFromClass(playerid, classid)
PHP код:
{
if (classid == 0) //This checks the class ID
{
gTeam[playerid] = TEAM_GROVE; //and this sets the player team
}
else
{
gTeam[playerid] = TEAM_BALLA;
}
}
https://sampwiki.blast.hk/wiki/PAWN_tutorial_1