"else if" or "if"
#1

Hello,i have a proleb the the if functions are not working in the script below,i want help

PHP код:
public OnPlayerSpawn(playerid)
{
    
IsJumping[playerid] = 0;
    
PlayerPlaySound(playerid,1063,0.0,0.0,0.0);
    
TextDrawShowForPlayer(playeridInfoTextdraw);
    if(
PlayerInfo[playerid][pSkin] >= 1) return SetPlayerSkin(playeridPlayerInfo[playerid][pSkin]);
    
SetPlayerWeatherEx(playerid,PlayerInfo[playerid][pWeather]);
    if(
God[playerid] == 1) return SetPlayerHealth(playerid99999);
       else if(
PlayerInfo[playerid][Jail] == 1)
    {
        new 
rand random(sizeof(JailRandomSpawn));
        
SetPlayerPos(playeridJailRandomSpawn[rand][0], JailRandomSpawn[rand][1], JailRandomSpawn[rand][2]);
        
SetPlayerFacingAngle(playeridJailRandomSpawn[rand][3]);
        
ResetPlayerWeapons(playerid);
        
SetPlayerInterior(playerid3);
    }
    else if(
fr[playerid] == 1)
    {
        
SetPlayerVirtualWorld(playerid0);
        
SetPlayerInterior(playerid0);
        
SetPlayerPos(playerid, -1680.1483,706.0532,30.6016);
        
SetPlayerFacingAngle(playerid90.9011);
    }
    else if(
indm[playerid] == 1)
    {
        new 
rand random(sizeof(DDMRandomSpawn));
        
SetPlayerTeam(playerid, -1);
        
SetPlayerPos(playeridDDMRandomSpawn[rand][0], DDMRandomSpawn[rand][1],DDMRandomSpawn[rand][2]);
        
SetPlayerFacingAngle(playeridDDMRandomSpawn[rand][3]);
        
SetPlayerInterior(playerid18);
        
SetPlayerVirtualWorld(playerid2);
        
ResetPlayerWeapons(playerid);
        
GivePlayerWeapon(playerid24999999);
    }
    else if(
indm[playerid] == 2)
    {
        
SetPlayerTeam(playerid, -1);
        new 
rand random(sizeof(SDMRandomSpawn));
        
SetPlayerPos(playeridSDMRandomSpawn[rand][0], SDMRandomSpawn[rand][1],SDMRandomSpawn[rand][2]);
        
SetPlayerFacingAngle(playeridSDMRandomSpawn[rand][3]);
        
SetPlayerInterior(playerid15);
        
SetPlayerVirtualWorld(playerid1);
        
ResetPlayerWeapons(playerid);
        
GivePlayerWeapon(playerid34999999);
    }
    else if(
indm[playerid] == 3)
    {
        
DeathmatchObjects(playerid);
        
SetPlayerTeam(playerid, -1);
        new 
rand random(sizeof(MDRandomSpawn));
        
SetPlayerPos(playeridMDRandomSpawn[rand][0], MDRandomSpawn[rand][1],MDRandomSpawn[rand][2]);
        
SetPlayerFacingAngle(playeridMDRandomSpawn[rand][3]);
        
SetPlayerHealth(playerid100);
        
SetPlayerInterior(playerid0);
        
SetPlayerVirtualWorld(playerid3);
        
ResetPlayerWeapons(playerid);
        
GivePlayerWeapon(playerid38999999);
    }
    else if(
PlayerInfo[playerid][pMuted] == 1)
    {
        
MuteTimer[playerid] = SetTimerEx("OnPlayerUnmute"PlayerInfo[playerid][MuteTime], false"d"playerid);
    }
    else if(
PlayerInfo[playerid][pVip] == 1)
    {
        
SetPlayerArmour(playerid100);
    }
    return 
1;

Reply


Messages In This Thread
"else if" or "if" - by Mouiz - 09.07.2015, 18:28
Re: "else if" or "if" - by Sime30 - 09.07.2015, 18:31
Re: "else if" or "if" - by Mouiz - 09.07.2015, 18:37
Re: "else if" or "if" - by DTV - 09.07.2015, 19:09
Re: "else if" or "if" - by Vince - 09.07.2015, 19:19

Forum Jump:


Users browsing this thread: 2 Guest(s)