Class Problem
#1

Skin not return to class 0 and goes to CJ skin
PHP код:
forward SetPlayerTeamFromClass(playeridclassid);
public 
OnPlayerRequestClass(playeridclassid)
{
    
SetPlayerTeamFromClass(playeridclassid);
    return 
1;
}
public 
SetPlayerTeamFromClass(playeridclassid)
{
//Class
    
if(classid == 0)
    {
        
gTeam[playerid] = TEAM_NORMAL;
        
GameTextForPlayer(playerid,"~w~SHAHRVAND",2500,4);
        
SetPlayerPos(playerid219.4820,1822.7864,7.5271);
        
SetPlayerCameraPos(playerid225.7349,1822.90677.521);
        
SetPlayerCameraLookAt(playerid219.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(playerid219.4820,1822.7864,7.5271);
        
SetPlayerCameraPos(playerid225.7349,1822.90677.521);
        
SetPlayerCameraLookAt(playerid219.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(playerid219.4820,1822.7864,7.5271);
        
SetPlayerCameraPos(playerid225.7349,1822.90677.521);
        
SetPlayerCameraLookAt(playerid219.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(playerid219.4820,1822.7864,7.5271);
        
SetPlayerCameraPos(playerid225.7349,1822.90677.521);
        
SetPlayerCameraLookAt(playerid219.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(playerid219.4820,1822.7864,7.5271);
        
SetPlayerCameraPos(playerid225.7349,1822.90677.521);
        
SetPlayerCameraLookAt(playerid219.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(playerid219.4820,1822.7864,7.5271);
        
SetPlayerCameraPos(playerid225.7349,1822.90677.521);
        
SetPlayerCameraLookAt(playerid219.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(playerid219.4820,1822.7864,7.5271);
        
SetPlayerCameraPos(playerid225.7349,1822.90677.521);
        
SetPlayerCameraLookAt(playerid219.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(playerid219.4820,1822.7864,7.5271);
        
SetPlayerCameraPos(playerid225.7349,1822.90677.521);
        
SetPlayerCameraLookAt(playerid219.4820,1822.7864,7.5271);
         
SetPlayerFacingAngle(playerid,270);
        
SetPlayerColor(playerid,0xFF8000FF);
        
SetPlayerSkin(playerid,293);
    }
    return  
1;

And intensive skin square
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)
        {
        }
     } 
?? pls Help
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)