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
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
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
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
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(playerid, issuerid, Float:amount, weaponid)
{
new str[4];
new Float:Pos[3];
GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
format(str, 4, "%.1f", amount);
new Text3D:hitbar = Create3DTextLabel(str, 0xFF0000FF, Pos[0], Pos[1], Pos[2] + 0.6, 30.0, 0);
SetTimerEx("UpdateHitBar", 66, 0, "iffffii", playerid, amount, Pos[0], Pos[1], Pos[2] + 0.8, 16, 0xFF0000FF);
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
...
|
PHP Code:
public OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid)
{
new str[4];
new Float:tPos[3];
GetPlayerPos(playerid, tPos[0], tPos[1], tPos[2]);
format(str, 4, "%.1f", amount);
new Text3D:hitbar = Create3DTextLabel(str, 0xFF0000FF, tPos[0], tPos[1], tPos[2] + 0.6, 30.0, 0);
SetTimerEx("UpdateHitBar", 66, 0, "iffffii", playerid, amount, tPos[0], tPos[1], tPos[2] + 0.8, 16, 0xFF0000FF);
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
PHP Code:
public OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid)
{
new str[4];
new Float:tPos[3];
GetPlayerPos(playerid, tPos[0], tPos[1], tPos[2]);
format(str, 4, "%.1f", amount);
new Text3D:hitbar = Create3DTextLabel(str, 0xFF0000FF, tPos[0], tPos[1], tPos[2] + 0.6, 30.0, 0);
SetTimerEx("UpdateHitBar", 66, 0, "iffffii", playerid, amount, tPos[0], tPos[1], tPos[2] + 0.8, 16, 0xFF0000FF);
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..