14.09.2010, 06:34
OnPlayerSpawn is only called .. surprise surpsise .. when the player spawns.
You need to put your stuff somewhere else.
Maybe in a public function that is called, say every second.
look for SetTimer on the wiki to see how it works.
you could also use CreatePickup() and OnPlayerPickupPickup() to do this, again check the wiki.
Also, if you use an object streamer, remeber to update the streamer before teleporting the player.
Sometimes there are issues with objects created at high altitude, it might be better to add your objects to a pre-existing interior in an alternate vitrual world.
good luck.
You need to put your stuff somewhere else.
Maybe in a public function that is called, say every second.
look for SetTimer on the wiki to see how it works.
pawn Код:
public YourCustomFunctionForYourTeleport()
{
if(IsPlayerInRangeOfPoint( ... ))
{
SetPlayerPos( ... );
SetPlayerInterior( ... );
SetPlayerVirtualWorld( ... );
return 1;
}
return 1;
}
Also, if you use an object streamer, remeber to update the streamer before teleporting the player.
Sometimes there are issues with objects created at high altitude, it might be better to add your objects to a pre-existing interior in an alternate vitrual world.
good luck.