04.04.2010, 05:49
Код:
//top of script #define TEAM_COP 0 #define TEAM_TAXI 1
Код:
new gTeam[MAX_PLAYERS];
that means if classid will be 0 he will be in team ''COP'' if he will be other skin he will be in team TAXI
Код:
SetPlayerTeamFromClass(playerid, classid) { if (classid == 0) { gTeam[playerid] = TEAM_COP; } else { gTeam[playerid] = TEAM_TAXI; } }
Код:
SetPlayerTeamFromClass(playerid, classid) { if (classid == 0) { gTeam[playerid] = TEAM_GROVE; } if(classid == 1) { gTeam[playerid] = TEAM_BALLA; } //if(classid == 1,2,3,4,5) //{ // code //} }
Код:
SetPlayerTeamFromClass(playerid, classid);
add this SOMEWHERE IN SCRIPT NOT UNDER PUBLIC
Код:
SetPlayerToTeamColor(playerid) { if (gTeam[playerid] == TEAM_COP) { SetPlayerColor(playerid, put here your colour); // perfer blue } else if (gTeam[playerid] == TEAM_TAXI) { SetPlayerColor(playerid, put here your colour); // perfer green } }
Код:
SetPlayerToTeamColor(playerid);
scroll down a bit and you will find tutorial! How to make teams
https://sampwiki.blast.hk/wiki/PAWN_tutorial
and for other things
http://wiki.sa-mp.com
its the same page btw
have a nice day