03.12.2013, 14:27
i have made a command to change the spawn and i have fixed the previous bug and it works and it sets the player in his house level but if u do /exit it doesnt work can someone help?
else if(PlayerInfo[playerid][pSpawn] == 2)
{
if(PlayerInfo[playerid][pHouseLevel] == 2)
{
SetPlayerFacingAngle(playerid, 270.0000);
SetPlayerInterior(playerid, 2);
PutPlayerInHouse(playerid, PlayerInfo[playerid][pHouseLevel]);
PlayerInfo[playerid][pInt] = 2;
}
}
if(PlayerInfo[playerid][pLocal] != 999) //in house
{
if(IsAtHouseExit(playerid))
{
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* %s has left the house.", sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
SetPlayerVirtualWorld(playerid, 0);
SetPlayerInterior(playerid,0);
SetPlayerPos(playerid,PlayerInfo[playerid][pHouseExitX],PlayerInfo[playerid][pHouseExitY],PlayerInfo[playerid][pHouseExitZ]);
SetPlayerFacingAngle(playerid, PlayerInfo[playerid][pHouseExitR]-180);
SetCameraBehindPlayer(playerid);
PlayerInfo[playerid][pInt] = 0;
PlayerInfo[playerid][pVirtualWorld] = 0;
PlayerInfo[playerid][pLocal] = 999;
}
}
PlayerInfo[playerid][pLocal] = 1; // Or W.E.
|
Add on to spawn:
pawn Код:
|