OnPlayerDeath [Debug]
#1

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 !
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(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.
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: 1 Guest(s)