12.12.2014, 08:07
Hello, im making my own fitness system and 1 shot bullet but it does not do any of it.
heres the code
This should be the respond
any ideas what is wrong or wrong scripting?
heres the code
Код:
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; }
Код:
Delay:Bullet[100, i](playerid) { if(!PlayerInfo[playerid][pHitbul]) { SetPlayerHealth(playerid, 0.0); PlayerInfo[playerid][pBullet] -= 1; } return 1; } Delay:Fitness[10, i](playerid) { if(PlayerInfo[playerid][pFitness] >= 1500) { new Float:HP; GetPlayerHealth(playerid,HP); SetPlayerHealth(playerid,HP-30); } if(PlayerInfo[playerid][pFitness] >= 1000) { new Float:HP; GetPlayerHealth(playerid,HP); SetPlayerHealth(playerid,HP-25); } if(PlayerInfo[playerid][pFitness] >= 700) { new Float:HP; GetPlayerHealth(playerid,HP); SetPlayerHealth(playerid,HP-20); } if(PlayerInfo[playerid][pFitness] >= 500) { new Float:HP; GetPlayerHealth(playerid,HP); SetPlayerHealth(playerid,HP-15); } if(PlayerInfo[playerid][pFitness] >= 300) { new Float:HP; GetPlayerHealth(playerid,HP); SetPlayerHealth(playerid,HP-10); } if(PlayerInfo[playerid][pFitness] >= 100) { new Float:HP; GetPlayerHealth(playerid,HP); SetPlayerHealth(playerid,HP-5); } return 1; }