[FilterScript] DamageBar - Show damage on players head!
#1

DamageBar - Show damage on players head!
version: 0.2.1

Explanation
When you damage player (armour or health) the FS will automatically create 3Dtext on players head.
After some time the text will blow up.

Screenshots





Settings
You can simply change FS settings by editing those lines:
pawn Код:
#define COLOR_BAR        0xFF0000FF // First color of 3DText
#define HEALTH_LENGTH    3 // Max langth of damage (100 is 3, 10 is 2, 1 is 1)
#define HEALTH_DRAW      30.0 // Draw distance for the 3DText
#define HEALTH_OFFSET    0.2 // First 3DText offset
#define HEALTH_OFFSETADD 0.01 // Add every update to 3D offser - commant to disable
#define COLOR_DELETE     10 // Color brightnes to delet every update
#define TIME_FIRST       400 // Time from creation to first update
#define TIME_BLOW        66 // Time from update tp update
Credits
Quote:

Thanks to:
- RaFaeL - Scripter, PAWN
- SA:MP team - SA:MP

Download
Pastebin - http://pastebin.com/Wf9x4j8H

Bugs & Suggestions
Quote:

Known bugs:
* None

Quote:

Suggestions:
* None

Enjoy!
Reply
#2

Hey,

This filterscript have so much Timers, he can be one timer.
I didn't like the order in which your program.
Reply
#3

Quote:
Originally Posted by Nautica
Посмотреть сообщение
Hey,

This filterscript have so much Timers, he can be one timer.
I didn't like the order in which your program.
Oh,
How you can do it with one timer without any variables? you can't.
This no meter the result is same, timer runs every time in loop. just like you want to do.
Oh yes, You can't do it with one timer becouse you must pass updated variables every time.
Reply
#4

Quote:
Originally Posted by Nautica
Посмотреть сообщение
Hey,

This filterscript have so much Timers, he can be one timer.
I didn't like the order in which your program.
Indeed, I had to read the code about 4 times to even grasp what was going on, once I did, I died a little inside.
Reply
#5

pawn Код:
public OnFilterScriptInit()
{
    SetTimer("MainTimer",1000,true);
    return 1;
}
new Update[MAX_PLAYERS];
Update[playerid] = 400;

forward MainTimer();
public MainTimer()
{
    for(new i = 0; i < MAX_PLAYERS; i++) if(IsPlayerConnected(i))
    {
        if(Update[i] > 1) Update[i]--;
        else if(Update[i] == 00)
        {
            //Message....
        }
    }
    return 1;
}
Not possible?
Reply
#6

Quote:
Originally Posted by Nautica
Посмотреть сообщение
pawn Код:
public OnFilterScriptInit()
{
    SetTimer("MainTimer",1000,true);
    return 1;
}
new Update[MAX_PLAYERS];
Update[playerid] = 400;

forward MainTimer();
public MainTimer()
{
    for(new i = 0; i < MAX_PLAYERS; i++) if(IsPlayerConnected(i))
    {
        if(Update[i] > 1) Update[i]--;
        else if(Update[i] == 00)
        {
            //Message....
        }
    }
    return 1;
}
Not possible?
No, If you doing this you must add 5 variables...
Still my better :P
Reply
#7

Quote:
Originally Posted by Swimor
Посмотреть сообщение
No, If you doing this you must add 5 variables...
Still my better :P
I do not think so
You can do it in the array
Reply
#8

Interesting technique. I greatly appreciate it. Whatever it is. Congratulations on your efforts.

Note - Simple and might be useful.

#March
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)