Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public OnPlayerGiveDamage ( playerid, damagedid, Float: amount, weaponid )
- {
- if ( damagedid == INVALID_PLAYER_ID ) return 1;
- if(groupVariables[pData[playerid][pGroup]][gGroupType] == 1 && OnDuty[playerid] == 1)
- {
- if(weaponid == 23 && pData[damagedid][pWarrants] >= 4)
- {
- ApplyAnimation(damagedid, "CRACK", "crckdeth2", 4.0, 1, 0, 0, 0, 0);
- format(string,sizeof(string),"~r~%s ~g~is tazed!",GetName(damagedid));
- GameTextForPlayer(playerid, string, 3000, 1);
- Freezes[damagedid] = 1;
- SetTimerEx("UnfreezePlayer", 10000, 0, "i", damagedid);
- }
- }
- PlayerPlaySound(playerid,17802,0.0,0.0,0.0);
- if(IsPlayerPause(damagedid) == 1 && IsACop(playerid) && pData[damagedid][pWarrants] >= 1)
- {
- if(GoToJail[damagedid] >= 3)
- {
- new arrestInfo[3];
- new price = pData[damagedid][pWarrants] * 2000;
- format(string, sizeof(string), "~w~AFK Suspect~r~Captured~n~Bonus~g~$%d", price);
- GameTextForPlayer(playerid, string, 5000, 1);
- pData[playerid][pMoney] += price / 2;
- Update(playerid, pCashu);
- pData[damagedid][pMoney] -= price;
- Update(damagedid, pCashu);
- pData[damagedid][pCrimes] += pData[damagedid][pWarrants];
- pData[damagedid][pPrisonTime] = pData[damagedid][pWarrants]*100;
- format(string, sizeof(string), "* You are in Jail for %d Seconds and lose $%d because you was AFK with wanted!", pData[damagedid][pPrisonTime], price);
- SendClientMessage(damagedid, COLOR_LIGHTRED, string);
- if(pData[damagedid][pWarrants] >= 4)
- {
- format(string, sizeof(string), "( Lastest News ): {FFFFFF}Suspect "THE"%s{FFFFFF} was captured by a cop team because he was AFK!", GetName(damagedid));
- SendClientMessageToAll(COLOR_THEG,string);
- }
- if( damagedid != INVALID_PLAYER_ID )
- {
- format(string, sizeof(string), "[*]: {FFFFFF} You were arrested by the cop "THE"%s"WHITE"[ID: %d] because you was AFK with wanted!", GetName(damagedid), damagedid);
- SendClientMessage(damagedid, COLOR_LIGHTRED, string);
- }
- Robbing[damagedid] = 0;
- DisablePlayerCheckpoint(damagedid);
- arrestInfo[2] = random(sizeof(JailSpawns));
- pData[damagedid][pPrisonID] = 3;
- format(pData[damagedid][pAccent], 20, "No-one");
- pData[damagedid][pHealth] = 100.0;
- SetPlayerHealth(damagedid, pData[damagedid][pHealth]);
- Robbing[damagedid] = 0;
- pData[damagedid][pWarrants] = 0;
- OnPlayerSpawn(damagedid);
- GoToJail[damagedid] = 0;
- } else {
- GoToJail[damagedid]++;
- format(string,sizeof(string),"[ANTI-AFK]: {FFFFFF}Mai trage inca %d gloante in suspect pentru a intra la jail!",4-GoToJail[damagedid]);
- SCM(playerid,COLOR_RED,string);
- }
- }
- if(RBTeam[playerid] > 0 && RBTeam[damagedid] > 0 && RBTeam[playerid] == RBTeam[damagedid])
- {
- new Float:heal;
- GetPlayerHealth(damagedid, heal);
- SetPlayerHealth(damagedid, heal);
- SCM(playerid,COLOR_THEG,"[!!!]: {FFFFFF}Stop trying to kill your group members!");
- }
- if(RBTeam[playerid] > 0 && RBTeam[damagedid] > 0 && RBEvent[1] == 0)
- {
- new Weapon[36];
- GetWeaponName(weaponid, Weapon, 36);
- format(string, sizeof(string),"~g~%s ~w~/ -%0.0f ~g~(%s)",GetName(damagedid), amount, Weapon);
- PlayerTextDrawSetString(playerid, DMGRecevied[playerid], string);
- PlayerTextDrawShow(playerid, DMGRecevied[playerid]);
- RBTaked[playerid] = SetTimerEx("HideRecivied", 4000, false, "ii",playerid,damagedid);
- format(string, sizeof(string),"~r~%s ~w~/ -%0.0f ~r~(%s)",GetName(playerid), amount, Weapon);
- PlayerTextDrawSetString(damagedid, DMGTaked[damagedid], string);
- PlayerTextDrawShow(damagedid, DMGTaked[damagedid]);
- }
- if(GetPlayerWeapon(playerid) == 4 && IsPlayerStreamedIn(playerid, damagedid))
- {
- amount = 100;
- }
- new
- Float: HP;
- HP = GetPlayerHealth(damagedid, HP);
- if(Freezes[playerid] == 1){
- HP = HP - amount;
- }
- if(amount >= 151.0 )
- {
- Kick(playerid);
- //[128];
- format(string, 256, "Warning: (%d) is using Global Kill.", playerid);
- submitToAdmins(string, COLOR_LIGHTRED);
- return 0;
- }
- if(pData[playerid][pWeaponLic] == 0 && pData[playerid][pLevel] == 1 && pData[playerid][pMaterials] < 10 && RBTeam[playerid] == 0)
- {
- new m;
- m = GetPlayerWeapon(playerid);
- if((m > 1) && (m < 43))
- {
- if(m != 9)
- {
- format(string, sizeof(string), "{f03337}ADM-CMD: %s[ID: %d] possible have weapon hack.", GetName(playerid), playerid);
- submitToAdmins(string, COLOR_RED);
- }
- }
- }
- if(damagedid != INVALID_PLAYER_ID && weaponid == 34 && RBTeam[playerid] == 0)
- {
- SetPlayerHealth(damagedid, 0.0);
- OnPlayerDeath ( damagedid, playerid, weaponid ), noOPD [ damagedid ] = true;
- return 1;
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement