10.04.2014, 09:31
Hi everyone.
I had a little (Mhh big too) on my SA-MP Server.
I explain, this is a Zombie RP Server, so Zombie have got more health than humans
(1000 HP)
But, there is a problem because when i want to know my health, it's say me i've only 232 HP.
So , I tested with a cleo mod to show my life, it's show me i had 1000 HP, so it's have good.
This is a big problem because i use custom damage, so when a player shot on a zombie, his player life (1000 HP) become 232...
Why did say me i've only 232 HP?
Code :
Thank you for your help and sorry for my bad english :S
I had a little (Mhh big too) on my SA-MP Server.
I explain, this is a Zombie RP Server, so Zombie have got more health than humans
(1000 HP)
But, there is a problem because when i want to know my health, it's say me i've only 232 HP.
So , I tested with a cleo mod to show my life, it's show me i had 1000 HP, so it's have good.
This is a big problem because i use custom damage, so when a player shot on a zombie, his player life (1000 HP) become 232...
Why did say me i've only 232 HP?
Code :
Код:
if (!strcmp(cmd, "/test", true))
{
new string1[100];
new Float:healthzombie;
GetPlayerHealth(playerid, healthzombie);
format(string1, sizeof(string1), "%f HP", healthzombie);
SendClientMessage(playerid, ROUGE, string1);
return 1;
}
Код:
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid)
{
if(issuerid != INVALID_PLAYER_ID)
{
new Float:HP;
//new stringvie[256];
GetPlayerHealth(playerid, HP);
printf("ISSUEUR %f", HP);
if(weaponid == 0 && !IsLigotte[issuerid]) //Poings
{
if(PlayerInfo[issuerid][pMforce] >= 23) { AC_BS_SetPlayerHealth(playerid, HP-15.0); }
else if(PlayerInfo[issuerid][pMforce] >= 20) { AC_BS_SetPlayerHealth(playerid, HP-14.0); }
else if(PlayerInfo[issuerid][pMforce] >= 18) { AC_BS_SetPlayerHealth(playerid, HP-13.0); }
else if(PlayerInfo[issuerid][pMforce] >= 14) { AC_BS_SetPlayerHealth(playerid, HP-12.0); }
else if(PlayerInfo[issuerid][pMforce] >= 11) { AC_BS_SetPlayerHealth(playerid, HP-11.0); }
else if(PlayerInfo[issuerid][pMforce] >= 9) { AC_BS_SetPlayerHealth(playerid, HP-10.0); }
else if(PlayerInfo[issuerid][pMforce] >= 7) { AC_BS_SetPlayerHealth(playerid, HP-9.0); }
else if(PlayerInfo[issuerid][pMforce] >= 5) { AC_BS_SetPlayerHealth(playerid, HP-8.0); }
else if(PlayerInfo[issuerid][pMforce] >= 3) { AC_BS_SetPlayerHealth(playerid, HP-7.0); }
else if(PlayerInfo[issuerid][pMforce] >= 1) { AC_BS_SetPlayerHealth(playerid, HP-6.0); }
else { AC_BS_SetPlayerHealth(playerid, HP-5.0); }
}
//etc...


