09.07.2015, 18:28
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(playerid, InfoTextdraw);
if(PlayerInfo[playerid][pSkin] >= 1) return SetPlayerSkin(playerid, PlayerInfo[playerid][pSkin]);
SetPlayerWeatherEx(playerid,PlayerInfo[playerid][pWeather]);
if(God[playerid] == 1) return SetPlayerHealth(playerid, 99999);
else if(PlayerInfo[playerid][Jail] == 1)
{
new rand = random(sizeof(JailRandomSpawn));
SetPlayerPos(playerid, JailRandomSpawn[rand][0], JailRandomSpawn[rand][1], JailRandomSpawn[rand][2]);
SetPlayerFacingAngle(playerid, JailRandomSpawn[rand][3]);
ResetPlayerWeapons(playerid);
SetPlayerInterior(playerid, 3);
}
else if(fr[playerid] == 1)
{
SetPlayerVirtualWorld(playerid, 0);
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, -1680.1483,706.0532,30.6016);
SetPlayerFacingAngle(playerid, 90.9011);
}
else if(indm[playerid] == 1)
{
new rand = random(sizeof(DDMRandomSpawn));
SetPlayerTeam(playerid, -1);
SetPlayerPos(playerid, DDMRandomSpawn[rand][0], DDMRandomSpawn[rand][1],DDMRandomSpawn[rand][2]);
SetPlayerFacingAngle(playerid, DDMRandomSpawn[rand][3]);
SetPlayerInterior(playerid, 18);
SetPlayerVirtualWorld(playerid, 2);
ResetPlayerWeapons(playerid);
GivePlayerWeapon(playerid, 24, 999999);
}
else if(indm[playerid] == 2)
{
SetPlayerTeam(playerid, -1);
new rand = random(sizeof(SDMRandomSpawn));
SetPlayerPos(playerid, SDMRandomSpawn[rand][0], SDMRandomSpawn[rand][1],SDMRandomSpawn[rand][2]);
SetPlayerFacingAngle(playerid, SDMRandomSpawn[rand][3]);
SetPlayerInterior(playerid, 15);
SetPlayerVirtualWorld(playerid, 1);
ResetPlayerWeapons(playerid);
GivePlayerWeapon(playerid, 34, 999999);
}
else if(indm[playerid] == 3)
{
DeathmatchObjects(playerid);
SetPlayerTeam(playerid, -1);
new rand = random(sizeof(MDRandomSpawn));
SetPlayerPos(playerid, MDRandomSpawn[rand][0], MDRandomSpawn[rand][1],MDRandomSpawn[rand][2]);
SetPlayerFacingAngle(playerid, MDRandomSpawn[rand][3]);
SetPlayerHealth(playerid, 100);
SetPlayerInterior(playerid, 0);
SetPlayerVirtualWorld(playerid, 3);
ResetPlayerWeapons(playerid);
GivePlayerWeapon(playerid, 38, 999999);
}
else if(PlayerInfo[playerid][pMuted] == 1)
{
MuteTimer[playerid] = SetTimerEx("OnPlayerUnmute", PlayerInfo[playerid][MuteTime], false, "d", playerid);
}
else if(PlayerInfo[playerid][pVip] == 1)
{
SetPlayerArmour(playerid, 100);
}
return 1;
}