OnPlayerDeath doesn't work
#1

i just noticed that one of my function in OnPlayerDeath doesn't work fine

you can look my OnPlayerDeath on attach below

this one i expected to work fine but its not.

Quote:

if(PlayerInfo[playerid][pLevel] >= 1)
{
if(MedicBill[playerid] == 4) { MedicBill[playerid] = 1; return 1; }
for (new i; i<13; i++)
{
GetPlayerWeaponData(playerid, i, PlayerWeapon[playerid][i], PlayerAmmo[playerid][i]);
}
MedicBill[playerid] = 2;
GetPlayerFacingAngle(playerid, InjurAngle[playerid]);
GetPlayerPos(playerid, TeleportDest[playerid][0],TeleportDest[playerid][1],TeleportDest[playerid][2]);
PlayerInfo[playerid][pInt] = GetPlayerInterior(playerid);
PlayerInfo[playerid][pLocal] = GetPlayerVirtualWorld(playerid);
} else { MedicBill[playerid] = 1; }

It doesn't work when playerid had no killerid, i mean when playerid commit suicide or something like that, that function i showed above will not worked, but when playerid got killed by someone the function above will work fine.
Reply
#2

GetPlayerWeaponData is bugged, other then that it works fine
Reply
#3

Quote:
Originally Posted by dice7
GetPlayerWeaponData is bugged, other then that it works fine
GetPlayerWeaponData works just fine.
Reply
#4

Quote:
Originally Posted by Don Correlli
Quote:
Originally Posted by dice7
GetPlayerWeaponData is bugged, other then that it works fine
GetPlayerWeaponData works just fine.
Doesn't it return -1 for some weapons if you switch the weapons a lot using the mouse wheel ?
Reply
#5

Quote:
Originally Posted by dice7
Doesn't it return -1 for some weapons if you switch the weapons a lot using the mouse wheel ?
Quote:
This function does not return a specific value, it's best to simply ignore it.
GetPlayerWeaponData works just fine for me and i'm sure it works fine for others, too.

@topic starter: try to debug your code.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)