07.11.2018, 10:53
First of all:
Did you meant to do this?
The function will be executed if any of this checks returns false.
If you did, then try to debug your code on your own, let me give you and exemple:
Try to compile it and see wich number is printed in the console, then resolve your bugs.
If it doesn't compile, read the code and figure out the error yourself because all i did was try to make your code a little bit better.
Did you meant to do this?
Code:
if(!(IsACop(killerid) || IsAMember(killerid) || pInfo[playerid][pJailed] > 0 || pInfo[playerid][pAJailed] > 0 || Iter_Contains(Paintp, playerid) || pInfo[killerid][pMember] == 8 || vwp[playerid] == pInfo[playerid][pMember] || pInfo[playerid][pDuel] < INVALID_PLAYER_ID || (Event_Pos[0] == 0.0 && IsPlayerInRangeOfPoint(playerid, 140.0, Event_Pos[0], Event_Pos[1], Event_Pos[2]))))
If you did, then try to debug your code on your own, let me give you and exemple:
pawn Code:
public OnPlayerDeath(playerid, killerid, reason)
{
if(killerid != INVALID_PLAYER_ID)
{
// pInfo[killerid][pKills]++;
if(!IsACop(killerid)) return print("1");
else if(!IsAMember(killerid)) return print("2");
else if(!pInfo[playerid][pJailed] > 0) return print("3");
else if(!pInfo[playerid][pAJailed] > 0) return print("4");
else if(!Iter_Contains(Paintp, playerid)) return print("5");
else if(!pInfo[killerid][pMember] == 8) return print("6");
else if(!vwp[playerid] == pInfo[playerid][pMember]) return print("7");
else if(!pInfo[playerid][pDuel] < INVALID_PLAYER_ID) return print("8");
else if(!(Event_Pos[0] == 0.0 && IsPlayerInRangeOfPoint(playerid, 140.0, Event_Pos[0], Event_Pos[1], Event_Pos[2]))) return print("9");
else return print("10");
// { Forget about the function for one sec
// pInfo[playerid][aVar][64] = killerid, pInfo[playerid][aSpam][7] = gtm+60;
// format(stmsg[playerid], 110, "Ai fost omorat de %s, ai 60 de secunde la dispozitie sa-l reclami folosind /call 112.", GetName(killerid));
// SendClientMessage(playerid, 0x60BF61FF, stmsg[playerid]);
// }
return 1;
}
If it doesn't compile, read the code and figure out the error yourself because all i did was try to make your code a little bit better.