Health - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Health (
/showthread.php?tid=537899)
Health -
AdelS - 18.09.2014
When I shot a player with a weapon,his health is always 100,what can be the problem ? Sorry for my bad English.
Re: Health -
Beckett - 18.09.2014
Show your OnPlayerTakeDamage and OnPlayerWeaponShot
Re: Health -
AdelS - 18.09.2014
Код:
public OnPlayerWeaponShot( playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ )
{
if( hittype != BULLET_HIT_TYPE_NONE )
{
if( !( -1000.0 <= fX <= 1000.0 ) || !( -1000.0 <= fY <= 1000.0 ) || !( -1000.0 <= fZ <= 1000.0 ) )
{
Kicksaporukom(playerid);
}
return 0;
}
return 1;
}
I don't have OnPlayerTakeDamage in my script.
Re: Health -
Stinged - 18.09.2014
pawn Код:
public OnPlayerWeaponShot( playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ )
{
if( hittype != BULLET_HIT_TYPE_NONE )
{
if( !( -1000.0 <= fX <= 1000.0 ) || !( -1000.0 <= fY <= 1000.0 ) || !( -1000.0 <= fZ <= 1000.0 ) )
{
Kicksaporukom(playerid);
return 0;
}
}
return 1;
}
Re: Health -
AdelS - 18.09.2014
Thanks a lot.