[Resovled] Cant Spawn In Buildings
#1

Hello.

I have tryed (whitout luck) to get my players spawn in a building. (Jeffersons Motel)
But when i go into the building type /save and the insert this line in my gamemode - he/she spawn in the air ?

Код:
public OnPlayerSpawn(playerid)
{
  SetPlayerPos(playerid, 2227.2009,-1150.4501,1025.7969); // Spawn at Unity Station {OK}
	return 1;
}
What is the problem ?

- KennethHoegh
Reply
#2

Type /interior and use SetPlayerInterior too.
Reply
#3

Quote:
Originally Posted by BeckzyBoi
Type /interior and use SetPlayerInterior too.
I can fine see something - Its when im in the class selection, then its spawn long up in the air
Reply
#4

B.U.M.P
Reply
#5

go to Unity station
do /interior to see in wich interior you are.
you need to do SetPlayerInterior(playerid, interior) at OnplayerSpawn()

this way he will spawn in the interior not in the air
but if you use Spawnplayer(playerid) somewhere else do not forget players is set to spawn in an interior
Reply
#6

Quote:
Originally Posted by am0k
go to Unity station
do /interior to see in wich interior you are.
you need to do SetPlayerInterior(playerid, interior) at OnplayerSpawn()

this way he will spawn in the interior not in the air
but if you use Spawnplayer(playerid) somewhere else do not forget players is set to spawn in an interior
Код:
public OnPlayerSpawn(playerid)
{

  SetPlayerPos(playerid, 2227.1917,-1150.5311,1025.7969); 
  SetPlayerInterior(playerid, 2);
	return 1;
}
How to i know what /interior i should use ?
Reply
#7

Go to the location and type /interior. That is the interior you need to set for the player.
Reply
#8

Quote:
Originally Posted by BeckzyBoi
Go to the location and type /interior. That is the interior you need to set for the player.
Nice dude.. Its working now..

Thanks to all the helped me.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)