12.07.2012, 04:01
In my server when players die wanted they lose it how would i make it so that they die they get it back?
new Wanted[MAX_PLAYERS]; //Add this before anything else, but after includes.
public OnPlayerConnect(playerid)
{
Wanted[playerid] = 0;
return 1;
}
public OnPlayerDeath(playerid, killerid, reason)
{
Wanted[playerid] = GetPlayerWantedLevel(playerid);
return 1;
}
public OnPlayerSpawn(playerid)
{
SetPlayerWantedLevel(playerid, Wanted[playerid]);
return 1;
}