SA-MP Forums Archive
[FilterScript] HidBar - Displaying the damage above players' heads! - 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: Filterscripts (https://sampforum.blast.hk/forumdisplay.php?fid=17)
+--- Thread: [FilterScript] HidBar - Displaying the damage above players' heads! (/showthread.php?tid=250076)

Pages: 1 2


Re: HidBar - Displaying the damage above players' heads! - Michael@Belgium - 22.04.2011

Whoh Nice ! But i need it for a car xD


Re: HidBar - Displaying the damage above players' heads! - Hiddos - 22.04.2011

Quote:
Originally Posted by Michael@Belgium
View Post
Whoh Nice ! But i need it for a car xD
You might be able to do it yourself by looking at the code. Do notice that the vehicle health decreases very rapidly when on fire, so you might wish not to execute the code there. You'll most probably need to find another callback, as there isn't anything like OnPlayerUpdate for vehicles.


Re: HidBar - Displaying the damage above players' heads! - Michael@Belgium - 22.04.2011

Quote:
Originally Posted by Hiddos
View Post
You might be able to do it yourself by looking at the code. Do notice that the vehicle health decreases very rapidly when on fire, so you might wish not to execute the code there. You'll most probably need to find another callback, as there isn't anything like OnPlayerUpdate for vehicles.
Mmm... ok i gonna edit a few things and hope it works x)


Re: HidBar - Displaying the damage above players' heads! - sherlock - 22.04.2011

another awesome release hiddos


Re: HidBar - Displaying the damage above players' heads! - Mean - 22.04.2011

Quote:
Originally Posted by Hiddos
View Post
So I made them for nothing?
Not quite, I just found Turty Turtle useful as finding hackers when flying.

But cows kinda are useless :]. Your script are epic, but sometimes useless lol. You didn't make them for nothing, I wuw them. I actually use the turtle as an Admin Command in new mAdmin.


Re : HidBar - Displaying the damage above players' heads! - Naruto_Emilio - 22.04.2011

Great Awesome, Best FS I've saw on my freaky life!!, Keep go in


Re: HidBar - Displaying the damage above players' heads! - Michael@Belgium - 23.04.2011

Quote:
Originally Posted by Michael@Belgium
View Post
Mmm... ok i gonna edit a few things and hope it works x)
Lol it just work fine when i keep it under OnPlayerUpdate()



Re: HidBar - Displaying the damage above players' heads! - Leroytjuh - 23.04.2011

Wooh! Nice work man :P


Re: HidBar - Displaying the damage above players' heads! - Gamer_007 - 19.02.2013

cool,nice


Re: HidBar - Displaying the damage above players' heads! - s3ek - 12.06.2017

: warning 219: local variable "Pos" shadows a variable at a preceding level
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Warning.

PHP Code:
public OnPlayerTakeDamage(playeridissueridFloat:amountweaponid)
{
    new 
str[4];
    new 
Float:Pos[3];
    
GetPlayerPos(playeridPos[0], Pos[1], Pos[2]);
    
format(str4"%.1f"amount);
    new 
Text3D:hitbar Create3DTextLabel(str0xFF0000FFPos[0], Pos[1], Pos[2] + 0.630.00);
    
SetTimerEx("UpdateHitBar"660"iffffii"playeridamountPos[0], Pos[1], Pos[2] + 0.8160xFF0000FF);
    
SetPVarInt(playerid"hidbar_HitBar"_:hitbar 1);
    return 
1;

line is :
PHP Code:
new Float:Pos[3]; 
pleas help ?


Re: HidBar - Displaying the damage above players' heads! - Romz - 12.06.2017

Quote:
Originally Posted by s3ek
View Post
...
PHP Code:
public OnPlayerTakeDamage(playeridissueridFloat:amountweaponid)
{
    new 
str[4];
    new 
Float:tPos[3];
    
GetPlayerPos(playeridtPos[0], tPos[1], tPos[2]);
    
format(str4"%.1f"amount);
    new 
Text3D:hitbar Create3DTextLabel(str0xFF0000FFtPos[0], tPos[1], tPos[2] + 0.630.00);
    
SetTimerEx("UpdateHitBar"660"iffffii"playeridamounttPos[0], tPos[1], tPos[2] + 0.8160xFF0000FF);
    
SetPVarInt(playerid"hidbar_HitBar"_:hitbar 1);
    return 
1;




Re: HidBar - Displaying the damage above players' heads! - s3ek - 12.06.2017

Quote:
Originally Posted by Kolstin
View Post
PHP Code:
public OnPlayerTakeDamage(playeridissueridFloat:amountweaponid)
{
    new 
str[4];
    new 
Float:tPos[3];
    
GetPlayerPos(playeridtPos[0], tPos[1], tPos[2]);
    
format(str4"%.1f"amount);
    new 
Text3D:hitbar Create3DTextLabel(str0xFF0000FFtPos[0], tPos[1], tPos[2] + 0.630.00);
    
SetTimerEx("UpdateHitBar"660"iffffii"playeridamounttPos[0], tPos[1], tPos[2] + 0.8160xFF0000FF);
    
SetPVarInt(playerid"hidbar_HitBar"_:hitbar 1);
    return 
1;

i change Pos to pos and this fixed !!! but thnx for help


Re: HidBar - Displaying the damage above players' heads! - Bernadeath - 12.06.2017

Nice and simple..