01.01.2011, 13:23
pawn Код:
new gPlayerClass[MAX_PLAYERS];
new gTeam[MAX_PLAYERS];
#define Bandidos 1
#define Policia 2
pawn Код:
forward SetPlayerTeamFromClass(playerid,classid);
public SetPlayerTeamFromClass(playerid,classid)
{
if(classid == 0)
{
gTeam[playerid] = Bandidos;
}
else if(classid == 1)
{
gTeam[playerid] = Policia;
}
}
pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
gPlayerClass[playerid] = classid;
/*SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);*/
if(classid == 0)
{
GameTextForPlayer(playerid,"~b~Bandidos",1000,5);
}
else if(classid == 1)
{
GameTextForPlayer(playerid,"~p~Policia",1000,5);
}
return 1;
}
Compare este cуdigo com o seu e adapte se for o caso.