01.07.2012, 14:16
Код:
public OnPlayerSpawn(playerid) { new house = PlayerInfo[playerid][pPhousekey]; if(house !=-1) { if(SpawnChange[playerid]) //If 1, then you get to your house, else spawn somewhere else { SetPlayerInterior(playerid,HouseInfo[playerid][hHInteriorWorld]); PlayerInfo[playerid][pInt] = HouseInfo[playerid][hHInteriorWorld]; PlayerInfo[playerid][pLocal] = playerid+1000; PlayerInfo[playerid][pVW] = playerid+1000; SetPlayerVirtualWorld(playerid, playerid+1000); SetPlayerPos(playerid,HouseInfo[playerid][hInteriorX],HouseInfo[playerid][hInteriorY],HouseInfo[playerid][hInteriorZ]); SetPlayerFacingAngle(playerid,HouseInfo[playerid][hInteriorA]); SetCameraBehindPlayer(playerid); GameTextForPlayer(playerid, "~w~Welcome Home", 5000, 1); return 1; } } else if(InParty { playerid } == true) { SetTimerEx("OnPlayerPartySpawn", 30, false, "i", playerid); } return 1; }
Problem: Player shouldn't spawn at his house if he dies at the party ( if(InParty) )