04.01.2011, 12:34
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.
Proof:
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;
}
![](http://video.xfire.com/3e556b-4.jpg)