public OnPlayerSpawn(playerid) { PlayerPlaySound(playerid,1063,0.0,0.0,0.0); if(God[playerid] == 1) return SetPlayerHealth(playerid, 99999); else if(PlayerInfo[playerid][Jail] == 1) { SetPlayerPos(playerid, 198.1810,174.9016,1003.0234); SetPlayerFacingAngle(playerid, 0.6133); ResetPlayerWeapons(playerid); SetPlayerInterior(playerid, 3); SetPlayerVirtualWorld(playerid, 50); return 1; } else if(PlayerInfo[playerid][pVip] == 1) return SetPlayerArmour(playerid, 100); else if(fr[playerid] == 1) { SetPlayerVirtualWorld(playerid, 0); SetPlayerInterior(playerid, 0); SetPlayerPos(playerid, -1680.1483,706.0532,30.6016); SetPlayerFacingAngle(playerid, 90.9011); fr[playerid] = 1; if(PlayerInfo[playerid][Jail] == 0) { GameTextForPlayer(playerid,"~g~type ~w~/fr ~g~to change the mode",5000,1); } else if(indm[playerid] == 1) { SetPlayerTeam(playerid, -1); SetPlayerPos(playerid, 1302.519897,-1.787510,1001.028259); SetPlayerInterior(playerid, 18); SetPlayerVirtualWorld(playerid, 2); ResetPlayerWeapons(playerid); GivePlayerWeapon(playerid, 24, 999999); } else if(indm[playerid] == 2) { SetPlayerTeam(playerid, -1); SetPlayerPos(playerid, 2215.454833,-1147.475585,1025.796875); SetPlayerInterior(playerid, 15); SetPlayerVirtualWorld(playerid, 1); ResetPlayerWeapons(playerid); GivePlayerWeapon(playerid, 34, 999999); } } else if(PlayerInfo[playerid][pMuted] == 1) { MuteTimer[playerid] = SetTimerEx("OnPlayerUnmute", PlayerInfo[playerid][MuteTime], false, "d", playerid); return 0; } IsJumping[playerid] = 0; TextDrawShowForPlayer(playerid, InfoTextdraw); SetPlayerSkin(playerid, PlayerInfo[playerid][pSkin]); SetPlayerWeatherEx(playerid,PlayerInfo[playerid][pWeather]); return 1; }
if(God[playerid] == 1) return SetPlayerHealth(playerid, 99999); else if(PlayerInfo[playerid][Jail] == 1) { SetPlayerPos(playerid, 198.1810,174.9016,1003.0234); SetPlayerFacingAngle(playerid, 0.6133); ResetPlayerWeapons(playerid); SetPlayerInterior(playerid, 3); SetPlayerVirtualWorld(playerid, 50); return 1; } else if(PlayerInfo[playerid][pVip] == 1) return SetPlayerArmour(playerid, 100);
public OnPlayerSpawn(playerid)
{
PlayerPlaySound(playerid, 1063, 0.0, 0.0, 0.0);
if(God[playerid] == 1) SetPlayerHealth(playerid, 99999);
if(PlayerInfo[playerid][pVip] == 1) SetPlayerArmour(playerid, 100.0);
if(!PlayerInfo[playerid][Jail])
{
GameTextForPlayer(playerid, "~g~type ~w~/fr ~g~to change the mode",5000,1);
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)
{
SetPlayerTeam(playerid, NO_TEAM);
SetPlayerPos(playerid, 1302.519897,-1.787510,1001.028259);
SetPlayerInterior(playerid, 18);
SetPlayerVirtualWorld(playerid, 2);
ResetPlayerWeapons(playerid);
GivePlayerWeapon(playerid, 24, 999999);
}
else if(indm[playerid] == 2)
{
SetPlayerTeam(playerid, NO_TEAM);
SetPlayerPos(playerid, 2215.454833,-1147.475585,1025.796875);
SetPlayerInterior(playerid, 15);
SetPlayerVirtualWorld(playerid, 1);
ResetPlayerWeapons(playerid);
GivePlayerWeapon(playerid, 34, 999999);
}
}
else
{
SetPlayerInterior(playerid, 3);
SetPlayerPos(playerid, 198.1810, 174.9016, 1003.0234);
SetPlayerFacingAngle(playerid, 0.6133);
ResetPlayerWeapons(playerid);
SetPlayerVirtualWorld(playerid, 50);
}
if(PlayerInfo[playerid][pMuted] == 1) MuteTimer[playerid] = SetTimerEx("OnPlayerUnmute", PlayerInfo[playerid][MuteTime], false, "d", playerid);
IsJumping[playerid] = 0;
TextDrawShowForPlayer(playerid, InfoTextdraw);
SetPlayerSkin(playerid, PlayerInfo[playerid][pSkin]);
SetPlayerWeatherEx(playerid, PlayerInfo[playerid][pWeather]);
return 1;
}
pawn Код:
https://sampwiki.blast.hk/wiki/Control_Structures#return |