06.06.2015, 14:41
Код:
public OnPlayerGiveDamage(playerid, damagedid, Float:amount, weaponid) { new string[256]; new Houseid = PlayerInfo[playerid][pLastOutSideID]; if (PlayerInfo[playerid][pGiveDamageToPolice] <=1 && PlayerInfo[playerid][pAJailed] == 0 && !IsPlayerNPC(damagedid) && PlayerInfo[playerid][pTeam] != TEAM_LAW && PlayerInfo[playerid][pVigilante] == 0) { if (PlayerInfo[playerid][pJailed] == 1) { PlayerInfo[playerid][pJailHour] += 2; PlayerInfo[playerid][pBail] += 1000; format(string, sizeof(string), "Committed A Crime (Attacking Law Enforcement) - Jail Sentence Extended %i Hour %i Minute $%i Bail.",PlayerInfo[playerid][pJailHour],PlayerInfo[playerid][pJailMinute],PlayerInfo[playerid][pBail]); SendClientMessage(playerid, COLOR_WANTED_LEVEL_5, string); PlayerInfo[playerid][pGiveDamageToPolice] =30; }else{ if (PlayerInfo[playerid][pGiveDamageToPolice] <=1 && PlayerInfo[playerid][pAJailed] == 0 && !IsPlayerNPC(damagedid) && PlayerInfo[playerid][pTeam] != TEAM_LAW && PlayerInfo[playerid][pVigilante] == 0) { if (HouseInfo[Houseid][h_cpbustype] == BUS_TYPE_POLICE) { if (PlayerInfo[damagedid][pTeam] == TEAM_LAW || PlayerInfo[damagedid][pVigilante] == 1) { if (PlayerInfo[playerid][pWantedLevel] < 6) { PlayerInfo[playerid][pWantedLevel] =6; SetPlayerWantedStats(playerid,"Attacking On Law Enforcement"); PlayerInfo[playerid][pGiveDamageToPolice] =30; }else{ if (PlayerInfo[playerid][pWantedLevel] > 5) { PlayerInfo[playerid][pWantedLevel] =10; SetPlayerWantedStats(playerid,"Attacking On Law Enforcement"); PlayerInfo[playerid][pGiveDamageToPolice] =30; } } } }else{ if (GetPlayerWeapon(playerid) == 0 || GetPlayerWeapon(playerid) == 2 || GetPlayerWeapon(playerid) == 5 || GetPlayerWeapon(playerid) == 6 || GetPlayerWeapon(playerid) == 7 || GetPlayerWeapon(playerid) == 9 || GetPlayerWeapon(playerid) == 10|| GetPlayerWeapon(playerid) == 14 || GetPlayerWeapon(playerid) == 15|| GetPlayerWeapon(playerid) == 12|| GetPlayerWeapon(playerid) == 11|| GetPlayerWeapon(playerid) == 49) { if (PlayerInfo[playerid][pWantedLevel] < 3) { PlayerInfo[playerid][pWantedLevel] =3; SetPlayerWantedStats(playerid,"Attacking On Law Enforcement"); PlayerInfo[playerid][pGiveDamageToPolice] =30; } else if (PlayerInfo[playerid][pWantedLevel] > 2) { PlayerInfo[playerid][pWantedLevel] =6; SetPlayerWantedStats(playerid,"Attacking On Law Enforcement"); PlayerInfo[playerid][pGiveDamageToPolice] =30; } else if (PlayerInfo[playerid][pWantedLevel] > 5) { PlayerInfo[playerid][pWantedLevel] =10; SetPlayerWantedStats(playerid,"Attacking On Law Enforcement"); PlayerInfo[playerid][pGiveDamageToPolice] =30; } }else{ if (GetPlayerWeapon(playerid) == 22 || GetPlayerWeapon(playerid) == 23 || GetPlayerWeapon(playerid) == 24 || GetPlayerWeapon(playerid) == 25 || GetPlayerWeapon(playerid) == 26 || GetPlayerWeapon(playerid) == 27 || GetPlayerWeapon(playerid) == 28 || GetPlayerWeapon(playerid) == 29 || GetPlayerWeapon(playerid) == 30 || GetPlayerWeapon(playerid) == 31 || GetPlayerWeapon(playerid) == 32 || GetPlayerWeapon(playerid) == 33 || GetPlayerWeapon(playerid) == 34) { if (PlayerInfo[playerid][pWantedLevel] < 6) { PlayerInfo[playerid][pWantedLevel] =6; SetPlayerWantedStats(playerid,"Attacking On Law Enforcement"); PlayerInfo[playerid][pGiveDamageToPolice] =30; } else if (PlayerInfo[playerid][pWantedLevel] > 5) { PlayerInfo[playerid][pWantedLevel] =10; SetPlayerWantedStats(playerid,"Attacking On Law Enforcement"); PlayerInfo[playerid][pGiveDamageToPolice] =30; } } } } } } } return 1; }