Spawn problem
#1

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;
                }
		}
Reply
#2

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

No i don't get errors/warnings

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

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

1182.5638,-1323.5256,13.5790

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

Hospital maybe :P
Reply
#7

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.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)