SA-MP Forums Archive
Spawn problem - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Spawn problem (/showthread.php?tid=186806)



Spawn problem - NotoriousMOB - 30.10.2010

Here's the issue
When a player buys a house or is in a Gang they are supposed to spawn at their house after they get killed/die

The problem is they spawn at connectspawn witch is airport
and im not quite sure how to fix this posted 2 codes im kinda sure one of them is the thing i need to put my hands on would appreciate some help please.

either this:

Код:
}
		if(JustDied[playerid] == 1)
		{
		    if(GetPlayerVirtualWorld(playerid) != 0 || PlayerInfo[playerid][pVirWorld] != 0)
		    {
		        SetPlayerVirtualWorld(playerid, 0);
		        PlayerInfo[playerid][pVirWorld] = 0;
		    }
		    SetPlayerPos(playerid, 1182.5638,-1323.5256,13.5790);
		    SetPlayerFacingAngle(playerid, 270.0);
		    SetPlayerInterior(playerid,0);
		    PlayerInfo[playerid][pInt] = 0;
		    return 1;
		}
or this one:

Код:
if(house !=255)
    	{
                if(SpawnChange[playerid] == 1) //If 1, then you get to your house, else spawn somewhere else
                {
                SetPlayerToTeamColor(playerid);
                SetPlayerInterior(playerid,HouseInfo[house][hInt]);
                SetPlayerVirtualWorld(playerid,HouseInfo[house][hWorld]);
                SetPlayerPos(playerid, HouseInfo[house][hExitx], HouseInfo[house][hExity],HouseInfo[house][hExitz]); // Warp the player
                PlayerInfo[playerid][pLocal] = house;
                HouseEntered[playerid] = house;
                PlayerInfo[playerid][pInt] = HouseInfo[house][hInt];
                return 1;
                }
		}



Re: Spawn problem - Scripter123 - 30.10.2010

any errors/warnings? put here FORWARDS and NEW'S and DEFINES if you have


Re: Spawn problem - NotoriousMOB - 30.10.2010

No i don't get errors/warnings

i think the code is messed up somehow but i can't really figure it out.


Re: Spawn problem - Mike_Peterson - 30.10.2010

SetPlayerPos(playerid, 1182.5638,-1323.5256,13.5790);
what is this? airport co-ords or what?


Re: Spawn problem - NotoriousMOB - 30.10.2010

1182.5638,-1323.5256,13.5790

I think it is Mike i thought that to
what can i replace it with.


Re: Spawn problem - Mike_Peterson - 30.10.2010

Hospital maybe :P


Re: Spawn problem - NotoriousMOB - 30.10.2010

Oh ye you right that's prob it.
you think im wrong bout those two codes then maybe its something else i should be looking for.