Death SetSpawnInfo seems to not work.
#1

So well, The
SetSpawnInfo wont set my spawninfo, It wont set my coordinates, or give me the bat and 9mm..
But it do SpawnPlayer me.

Full file;
http://pastebin.com/jDxJE76Y
Reply
#2

Gonna go ahead and 'bump' this.
Reply
#3

You have to use the function before spawning.
Reply
#4

Quote:
Originally Posted by SickAttack
Посмотреть сообщение
You have to use the function before spawning.
If you'd read the file you would see I did.
Reply
#5

Quote:
Originally Posted by Meller
Посмотреть сообщение
But it do SpawnPlayer me.
http://pastebin.com/jDxJE76Y
Ofc you will be spawned after death, but does it gives also score and money successfully?
Reply
#6

Try killing the player instead of using SpawnPlayer. If it doesn't work, just use SetPlayerPos and so forth. Or try setting a timer then use SpawnPlayer.
Reply
#7

Quote:
Originally Posted by Shinja
Посмотреть сообщение
Ofc you will be spawned after death, but does it gives also score and money successfully?
Get your facts right you don't get auto spawned, on death regullarly you have to click on Spawn.
Reply
#8

You get autospawned after death as it always has been, otherwise you prevent it by script (it seem you have somewhere ForceClassSelection)

Here are way to many open question, why is it delayed, why is it in OnPlayerDeath not in OnPlayerSpawn (is the player able to switch classes while being alive?), do you have in OnPlayerSpawn something that works against it like SetPlayerPos and ResetPlayerWeapons? Doesn't OnPlayerDeath has a reason parameter ? Does the code even get called (maybe the hook isn't working)?

Put SetSpawnInfo in OnPlayerDeath in a new pwn file and test it than you know if it works or not
Reply
#9

Quote:
Originally Posted by Nero_3D
Посмотреть сообщение
You get autospawned after death as it always has been, otherwise you prevent it by script (it seem you have somewhere ForceClassSelection)

Here are way to many open question, why is it delayed, why is it in OnPlayerDeath not in OnPlayerSpawn (is the player able to switch classes while being alive?), do you have in OnPlayerSpawn something that works against it like SetPlayerPos and ResetPlayerWeapons? Doesn't OnPlayerDeath has a reason parameter ? Does the code even get called (maybe the hook isn't working)?

Put SetSpawnInfo in OnPlayerDeath in a new pwn file and test it than you know if it works or not
I do not have ForceClassSeleciton,
It is delayed to in order show the death thingy from gta sadefault,
No he's not able to switch, they must use /changeteam
Never used OnPlayerSpawn in my gamemode.
OnPlayerdeath do have a reason parameter, but this works fine.
The hooking is fine.
Reply
#10

Doing this works:
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
    SetSpawnInfo(playerid, 0, 0, 2512.9407, -1665.5356, 13.5741, 94.9650, 5, 1, 22, 500, 0, 0);
    return 1;
}
Remove SpawnPlayer(playerid); and let the player respawn automatically.
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)