- 0
Sign in to follow this
Followers
0
OnPlayerGiveDamage
Asked by
Yong
,
-
Recently Browsing 0 members
No registered users viewing this page.
-
Similar Content
-
By August_Rothschild
Всем привет , как заменять анимации в игре ? Имеется ввиду анимации танцев , как прочесть файлы с анимациями или как заменять определенную анимацию
-
Posted (edited) · Report post
public OnPlayerGiveDamage(playerid, damagedid, Float: amount, weaponid, bodypart) { new Float:HP; GetPlayerHealth(damagedid, HP); new Float:oldposx, Float:oldposy, Float:oldposz; GetPlayerPos(damagedid, oldposx, oldposy, oldposz); if(IsPlayerInRangeOfPoint(playerid, 52.0, oldposx, oldposy, oldposz)) { if(playerid != INVALID_PLAYER_ID) { switch(weaponid) { case 0: SetPlayerHealth(damagedid, HP -4); case 1: SetPlayerHealth(damagedid, HP -6); case 2: SetPlayerHealth(damagedid, HP -7); case 3: SetPlayerHealth(damagedid, HP -10); case 4..8: SetPlayerHealth(damagedid, HP -13.4); case 9: SetPlayerHealth(damagedid, HP -19.8); case 10..13: SetPlayerHealth(damagedid, HP -30); case 14: SetPlayerHealth(damagedid, HP -18); case 15: SetPlayerHealth(damagedid, HP -20); case 16: SetPlayerHealth(damagedid, HP -30); case 17: SetPlayerHealth(damagedid, HP -3); case 18: SetPlayerHealth(damagedid, HP -13); case 19: SetPlayerHealth(damagedid, HP -3); case 20: SetPlayerHealth(damagedid, HP -3); case 21: SetPlayerHealth(damagedid, HP -3); case 22: SetPlayerHealth(damagedid, HP -8.6); case 23: SetPlayerHealth(damagedid, HP -9.7); case 24: SetPlayerHealth(damagedid, HP -47.8); case 25: SetPlayerHealth(damagedid, HP -25.3); case 26: SetPlayerHealth(damagedid, HP -30.3); case 27: SetPlayerHealth(damagedid, HP -22.4); case 28: SetPlayerHealth(damagedid, HP -8); case 29: SetPlayerHealth(damagedid, HP -9); case 30: SetPlayerHealth(damagedid, HP -8); case 31: SetPlayerHealth(damagedid, HP -8); case 32: SetPlayerHealth(damagedid, HP -7); case 33: SetPlayerHealth(damagedid, HP -24); case 34: SetPlayerHealth(damagedid, HP -400); } } } return true; }
Суть проблемы - Если у игрока есть Armour, он отнимается вместе со здоровьем, как решить данную проблему?
Edited by Yong
Share this post
Link to post