OnPlayerDeath [Debug] - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: OnPlayerDeath [Debug] (
/showthread.php?tid=559433)
OnPlayerDeath [Debug] -
nezo2001 - 23.01.2015
I add this OnPlayerDeath
PHP код:
SetSpawnInfo(playerid, 0, 0, 1958.33, 1343.12, 15.36, 269.15, 0, 0, 0, 0, 0, 0);
I add this becuase it spawn me after death in the center of san andreas so i added this it spawn me in the right place but this happend in the console
PHP код:
[13:33:30] [debug] Run time error 4: "Array index out of bounds"
[13:33:30] [debug] Accessing element at index 65535 past array upper bound 499
[13:33:30] [debug] AMX backtrace:
[13:33:30] [debug] #0 0002465c in public OnPlayerDeath (0, 65535, 255) from FM.amx
[13:33:30] [death] Nezoo died 255
Please Help
![Cheesy](images/smilies/biggrin.png)
!
Re: OnPlayerDeath [Debug] -
JonathanFeitosa - 23.01.2015
Add OnPlayerDeath
pawn Код:
if(killerid != INVALID_PLAYER_ID)
Re: OnPlayerDeath [Debug] -
nezo2001 - 23.01.2015
So if an admin killed a player so he will spawn in the middle of san andreas !
Please Help !
Re: OnPlayerDeath [Debug] -
Detoria - 23.01.2015
Get the positions that the player must spawn and put them on OnPlayerSpawn.
PHP код:
new RandomPos[][]=
{
//my positions
};
public OnPlayerSpawn(playerid)
{
new randpos = random(RandomPos[]);
SetPlayerPos(playerid, randpos[]);
//rest of your code
return 1;
}
This is a example of random places to spawn,you can put directly the position vars without the random var if you want.
Re: OnPlayerDeath [Debug] -
nezo2001 - 23.01.2015
i didn't make it because it show for me the middle of san andreas first and then went me to my spawn info .
Any one :/