Help array under death works only if there is a killer.
#1

This code is under on player death and it works only if someone kills me but not when i do suicide so why doesn't it work when i do suicide?

if(GetPlayerMoney(playerid) > 0) // Check If Player Have more than 0 cash
{
for( new D; D < MAX_dPICKUPS; D++)
{
new Float:X7,Float:Y7,Float:Z7;
GetPlayerPos(playerid,X7,Y7,Z7);
DropMoney[playerid] = GetPlayerMoney(playerid);

SetTimer("message", 60000, false);
pick3[D] = CreatePickup(1212,5,X7,Y7-0.5,Z7);
ResetPlayerMoney(playerid);

}
}
Reply
#2

Seems that problem is not here. Probably there is some check like
pawn Код:
if(playerid == killerid)
or
pawn Код:
if(playerid != killerid)
above the code you posted.

Anyway, if you still can't recognize your problem, show more code from OnPlayerDeath callback.
Reply
#3

Thx Norck it worked you solved my problem.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)