12.12.2014, 15:58
I don't why it doesn't? anyone can check it?
please help
Код:
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid, bodypart) { if(issuerid != INVALID_PLAYER_ID && weaponid == 34 && bodypart == 9) { Fitness(playerid); } if(issuerid != INVALID_PLAYER_ID && weaponid == 0 && bodypart == 3) { Bullet(playerid); } return 1; }
Код:
forward Bullet(playerid); public Bullet(playerid) { if(PlayerInfo[playerid][pBullet] >= 1) { SetPlayerHealth(playerid, 0.0); PlayerInfo[playerid][pBullet] -= 1; } return 1; } forward Fitness(playerid); public Fitness(playerid) { if(PlayerInfo[playerid][pFitness] >= 5000) { new Float:HP; GetPlayerHealth(playerid,HP); SetPlayerHealth(playerid,HP-50); } else if(PlayerInfo[playerid][pFitness] >= 2500) { new Float:HP; GetPlayerHealth(playerid,HP); SetPlayerHealth(playerid,HP-35); } else if(PlayerInfo[playerid][pFitness] >= 1500) { new Float:HP; GetPlayerHealth(playerid,HP); SetPlayerHealth(playerid,HP-30); } else if(PlayerInfo[playerid][pFitness] >= 1000) { new Float:HP; GetPlayerHealth(playerid,HP); SetPlayerHealth(playerid,HP-25); } else if(PlayerInfo[playerid][pFitness] >= 700) { new Float:HP; GetPlayerHealth(playerid,HP); SetPlayerHealth(playerid,HP-20); } else if(PlayerInfo[playerid][pFitness] >= 500) { new Float:HP; GetPlayerHealth(playerid,HP); SetPlayerHealth(playerid,HP-15); } else if(PlayerInfo[playerid][pFitness] >= 300) { new Float:HP; GetPlayerHealth(playerid,HP); SetPlayerHealth(playerid,HP-10); } else if(PlayerInfo[playerid][pFitness] >= 100) { new Float:HP; GetPlayerHealth(playerid,HP); SetPlayerHealth(playerid,HP-5); } return 1; }