19.09.2016, 12:52
Skin not return to class 0 and goes to CJ skin
And intensive skin square
How to score enough to be selected
OnPlayerSpawn:
?? pls Help
PHP код:
forward SetPlayerTeamFromClass(playerid, classid);
public OnPlayerRequestClass(playerid, classid)
{
SetPlayerTeamFromClass(playerid, classid);
return 1;
}
public SetPlayerTeamFromClass(playerid, classid)
{
//Class
if(classid == 0)
{
gTeam[playerid] = TEAM_NORMAL;
GameTextForPlayer(playerid,"~w~SHAHRVAND",2500,4);
SetPlayerPos(playerid, 219.4820,1822.7864,7.5271);
SetPlayerCameraPos(playerid, 225.7349,1822.9067, 7.521);
SetPlayerCameraLookAt(playerid, 219.4820,1822.7864,7.5271);
SetPlayerFacingAngle(playerid,270);
SetPlayerSkin(playerid,240);
}
else if(classid == 1)
{
gTeam[playerid] = TEAM_POLICE;
GameTextForPlayer(playerid,"~b~POLICE",2500,4);
SetPlayerPos(playerid, 219.4820,1822.7864,7.5271);
SetPlayerCameraPos(playerid, 225.7349,1822.9067, 7.521);
SetPlayerCameraLookAt(playerid, 219.4820,1822.7864,7.5271);
SetPlayerFacingAngle(playerid,270);
SetPlayerColor(playerid,0x0080FFFF);
SetPlayerSkin(playerid,280);
}
else if(classid == 2)
{
gTeam[playerid] = TEAM_DOCTOR;
GameTextForPlayer(playerid,"~g~PEZESHK",2500,4);
SetPlayerPos(playerid, 219.4820,1822.7864,7.5271);
SetPlayerCameraPos(playerid, 225.7349,1822.9067, 7.521);
SetPlayerCameraLookAt(playerid, 219.4820,1822.7864,7.5271);
SetPlayerFacingAngle(playerid,270);
SetPlayerColor(playerid,0x008040FF);
SetPlayerSkin(playerid,276);
}
else if(classid == 3)
{
gTeam[playerid] = TEAM_FBI;
GameTextForPlayer(playerid,"~B~~H~FBI",2500,4);
SetPlayerPos(playerid, 219.4820,1822.7864,7.5271);
SetPlayerCameraPos(playerid, 225.7349,1822.9067, 7.521);
SetPlayerCameraLookAt(playerid, 219.4820,1822.7864,7.5271);
SetPlayerFacingAngle(playerid,270);
SetPlayerColor(playerid,0x0080FFFF);
SetPlayerSkin(playerid,286);
}
else if(classid == 4)
{
gTeam[playerid] = TEAM_MECHANIC;
GameTextForPlayer(playerid,"~W~~h~MEKANIK",2500,4);
SetPlayerPos(playerid, 219.4820,1822.7864,7.5271);
SetPlayerCameraPos(playerid, 225.7349,1822.9067, 7.521);
SetPlayerCameraLookAt(playerid, 219.4820,1822.7864,7.5271);
SetPlayerFacingAngle(playerid,270);
SetPlayerSkin(playerid,50);
}
else if(classid == 5)
{
gTeam[playerid] = TEAM_TAXID;
GameTextForPlayer(playerid,"~G~~H~~H~RANANDEYE TAXI",2500,4);
SetPlayerPos(playerid, 219.4820,1822.7864,7.5271);
SetPlayerCameraPos(playerid, 225.7349,1822.9067, 7.521);
SetPlayerCameraLookAt(playerid, 219.4820,1822.7864,7.5271);
SetPlayerFacingAngle(playerid,270);
SetPlayerColor(playerid,0x808040FF);
SetPlayerSkin(playerid,242);
}
else if(classid == 6)
{
gTeam[playerid] = TEAM_CIA;
GameTextForPlayer(playerid,"~Y~CIA",2500,4);
SetPlayerPos(playerid, 219.4820,1822.7864,7.5271);
SetPlayerCameraPos(playerid, 225.7349,1822.9067, 7.521);
SetPlayerCameraLookAt(playerid, 219.4820,1822.7864,7.5271);
SetPlayerFacingAngle(playerid,270);
SetPlayerSkin(playerid,164);
SetPlayerColor(playerid,0xFF9D6FFF);
}
else if(classid == 7)
{
gTeam[playerid] = TEAM_ARTESH;
GameTextForPlayer(playerid,"~Y~~H~ARTESH",2500,4);
SetPlayerPos(playerid, 219.4820,1822.7864,7.5271);
SetPlayerCameraPos(playerid, 225.7349,1822.9067, 7.521);
SetPlayerCameraLookAt(playerid, 219.4820,1822.7864,7.5271);
SetPlayerFacingAngle(playerid,270);
SetPlayerColor(playerid,0xFF8000FF);
SetPlayerSkin(playerid,293);
}
return 1;
}
How to score enough to be selected
OnPlayerSpawn:
PHP код:
if(gTeam[playerid] == TEAM_POLICE)
{
if(GetPlayerScore(playerid) < 50)
{
}
}
if(gTeam[playerid] == TEAM_ARTESH)
{
if(GetPlayerScore(playerid) < 3000)
{
}
}
if(gTeam[playerid] == TEAM_CIA)
{
if(GetPlayerScore(playerid) < 2000)
{
}
}