OnPlayerDeath [Debug]
#1

I add this OnPlayerDeath
PHP код:
SetSpawnInfo(playerid001958.331343.1215.36269.15000000); 
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] [debugRun 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] [debugAMX backtrace:
[
13:33:30] [debug#0 0002465c in public OnPlayerDeath (0, 65535, 255) from FM.amx
[13:33:30] [deathNezoo died 255 
Please Help !
Reply
#2

Add OnPlayerDeath
pawn Код:
if(killerid != INVALID_PLAYER_ID)
Reply
#3

So if an admin killed a player so he will spawn in the middle of san andreas !
Please Help !
Reply
#4

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(playeridrandpos[]);
      
//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.
Reply
#5

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 :/
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)