Hey all .
Код:
AddPlayerClass(240,-2062.5583,237.4662,35.7149,268.8936,22,272,25,40,4,1); //Citizen
AddPlayerClass(228,-2653.6443,1388.2767,7.1301,212.8453,23,272,29,270,5,1); //mayor
AddPlayerClass(265,-2642.2583,-274.9985,7.5393,135.0036,25,40,32,250,9,1); //cop
AddPlayerClass(125,-2157.2119,649.5484,52.3672,267.0820,24,70,31,250,4,1); //hitman
AddPlayerClass(50,-1377.4271,466.0897,7.1875,1.0348,22,272,30,300,9,1); //mechanic
AddPlayerClass(276,-1754.9976,958.5851,24.8828,163.2550,25,40,24,70,4,1); //medic
AddPlayerClass(164,-2665.4282,635.6348,14.4531,179.8403,33,40,23,272,4,1); //sg
AddPlayerClass(293,-1635.0077,665.8105,7.1875,264.2244,29,300,22,170,3,1); //rober
I want to make for example if the player got the police job ( id 1 ) he can choose the section of cops, else he can't choose it, and the same thing for the others class / jobs.
pawn Код:
public OnPlayerRequestSpawn(playerid)
{
if(gTeam[playerid] == TEAM_COP)
{
if(GetPlayerJobID(playerid) == TEAM_COP)
{
new string[128];
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,sizeof(name));
format(string,sizeof(string),"[ ! ] Welcome to officer: %s",name);
SendClientMessageToAll(TEAM_COP_COLOR,string);
return 1;
}
else SendClientMessage(playerid,COLOR_RED,"[ ! ] You are not a cop !");
return 0;
}