Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Добавил в public OnPlayerGiveDamage(playerid, damagedid, Float: amount, weaponid, bodypart)
- if(weaponid >= 22 && weaponid <= 34 && amount > 5.0)
- {
- /*if(pTemp[damagedid][pAFK] >= 6) return true;
- if(GetPVarInt(damagedid,#death)) return true;
- new Float:Health,Float:Armour;
- GetPlayerArmour(damagedid,Armour);
- GetPlayerHealth(damagedid,Health);
- if(Armour > 0) SetTimerEx("GetTakeAP",TimerUpdateDamage,0,"ddffd",playerid,damagedid,Armour,amount,weaponid);
- else SetTimerEx("GetTakeHP",TimerUpdateDamage,0,"ddffd",playerid,damagedid,Health,amount,weaponid);
- PlayerPlaySound(playerid,34604,0,0,0);
- PlayerPlaySound(damagedid,34604,0,0,0);*/
- switch(weaponid)
- {
- case 22: amount = 8.6;
- case 23: amount = 9.7;
- case 24: amount = 47.8;
- case 25: amount = 15.3;
- case 26: amount = 30.3;
- case 27: amount = 22.4;
- case 28: amount = 8;
- case 29: amount = 9;
- case 30: amount = 8;
- case 31: amount = 8;
- case 32: amount = 7;
- case 33: amount = 24;
- case 34: amount = 47.8;
- default:
- {
- amount = 0.0;
- print("Урон не зафиксирован");
- }
- }
- }
- /////
- в конец паблика добавил:
- if(pTemp[damagedid][pAFK] > 6) return true;
- new Float:Health, Float:Armour;
- GetPlayerHealth(damagedid,Health);
- GetPlayerArmour(damagedid,Armour);
- new string[30];
- format(string, sizeof(string), "{FF0000}- {D3D3D3}%.0f",amount);
- SetPlayerChatBubble(damagedid, string, COLOR_BLUE, 20.0, 10000);
- PlayerPlaySound(damagedid,1150,0.0,0.0,0.0);
- if(amount < 0) return true;
- if((Armour - amount) <= 0)
- {
- SetPlayerArmourAC(damagedid,0);
- return SetPlayerHealthAC(damagedid, Health + (Armour - amount));
- }
- else if((Armour - amount) > 0)
- {
- return SetPlayerArmourAC(damagedid,Armour - amount);
- }
- ////
- Создал публичный массив в начале мода:
- new pLastAnimIndex[MAX_PLAYERS];
- //
- добавил в onplayerupdate после строки об проверки игрока на коннект:
- pLastAnimIndex[playerid] = GetPlayerAnimationIndex(playerid);
- //
- Добавил в начало паблика onplayerdeath:
- new animlib[32], animname[32];
- GetAnimationName(pLastAnimIndex[playerid],animlib,32,animname,32);
- if(strcmp(animlib, "PED", true) != 0) ClearAnimations(playerid);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement