28.11.2010, 19:14
Whenever a cop kills a wanted person, he looses cash unless the person became wanted without using the suspect command. The suspect command uses "new ID = strval(params);". When I replaced
"if(GetPlayerWantedLevel(playerid) == 0)"
with
"if(GetPlayerWantedLevel(ID) == 0)"
I obviously got an error. I tried to state what ID was but I don't think I can add it under OnPlayerDeath.
Is there a way?
"if(GetPlayerWantedLevel(playerid) == 0)"
with
"if(GetPlayerWantedLevel(ID) == 0)"
I obviously got an error. I tried to state what ID was but I don't think I can add it under OnPlayerDeath.
Is there a way?
Код:
} public OnPlayerDeath(playerid, killerid, reason) { SetPlayerWantedLevel(playerid,0); if(killerid == INVALID_PLAYER_ID) { SendDeathMessage(INVALID_PLAYER_ID,playerid,reason); SetPlayerScore(killerid, GetPlayerMoney(killerid)); SetPlayerWantedLevel(killerid,0); } else { if(gTeam[killerid] == Cops) { if(gTeam[killerid] != gTeam[playerid]) { if(GetPlayerWantedLevel(ID) == 0) {