SpawnPlayer() bug when in vehicle - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP (
https://sampforum.blast.hk/forumdisplay.php?fid=3)
+--- Forum: Bug Reports (
https://sampforum.blast.hk/forumdisplay.php?fid=20)
+--- Thread: SpawnPlayer() bug when in vehicle (
/showthread.php?tid=206683)
SpawnPlayer() bug when in vehicle -
mick88 - 04.01.2011
Problem: When using native SpawnPlayer() function on
player who is in vehicle, strange things happen. If player is on foot, he is spawned properly.
Probably OnPlayerSpawn() isn't called, but I can't explain why the character is holding bottle/cigar.
pawn Code:
COM(spawnplayer) //spawnplayer command
{
MOD;
new pid;
if (sscanf(params, "u", pid)) return ERROR("Usage: /SpawnPlayer [player]");
if (pid == INVALID_PLAYER_ID) return ERROR("Invalid player id");
SpawnPlayer(pid);
return 1;
}
Proof:
Re: SpawnPlayer() bug when in vehicle -
rbN. - 04.01.2011
Known one, just eject him before you SpawnPlayer him :P
Re: SpawnPlayer() bug when in vehicle -
xxmitsu - 04.01.2011
This bug also happens sometimes if someone dies inside a vehicle and is pressing fire key... the player is spawned with bottle/cigar.
Re: SpawnPlayer() bug when in vehicle -
gereter - 07.01.2011
Quote:
Originally Posted by RobinOwnz
Known one, just eject him before you SpawnPlayer him :P
|
There is no other way ?
Re: SpawnPlayer() bug when in vehicle -
kurta999 - 08.01.2011
Use this, it's works
Code:
SetPlayerPos(playerid, 0, 0, 0);
SpawnPlayer(playerid);