Adding Teams
#5

Okay you need to add at the top of your script :

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]; 
and under OnPlayerRequestClass , add

PHP код:
SetPlayerTeamFromClass(playerid,classid); // This sets the palyer team from class 
at the end of your script make this callback

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;
    }

For more information go to

https://sampwiki.blast.hk/wiki/PAWN_tutorial_1
Reply


Messages In This Thread
Adding Teams - by AVG_Free - 19.03.2011, 12:18
Re: Adding Teams - by [L3th4l] - 19.03.2011, 12:23
Re: Adding Teams - by PinkFloydLover - 19.03.2011, 12:23
Re: Adding Teams - by AVG_Free - 19.03.2011, 12:25
Re : Adding Teams - by Soumi - 19.03.2011, 12:28
Re: Adding Teams - by AVG_Free - 19.03.2011, 12:33
Re : Adding Teams - by Soumi - 19.03.2011, 12:44
Re: Adding Teams - by AVG_Free - 19.03.2011, 13:00
Re : Re: Adding Teams - by Soumi - 19.03.2011, 13:39
Re: Adding Teams - by JaTochNietDan - 19.03.2011, 13:42

Forum Jump:


Users browsing this thread: 3 Guest(s)