Problem With Hit Indicator
#1

I Got problem in the script Hit Indicator,
that where if the shot hit the body only to players who ran it would sound, but when his shot did not hit lagshoot should use, how to fix this, I just want to hit the enemy if hit emerging sound and textdraw .

i use this script
pawn Код:
#include <a_samp>

#define LGreenColor   0x00FF04FF
#define RedColor      0xE81010FF

new Text:GiveDamage[MAX_PLAYERS];
new Text:TakeDamage[MAX_PLAYERS];

    public OnFilterScriptInit() {
    print("\n----------------------------------------------------");
    print(" Hitting Sounds Loaded ");
    print("----------------------------------------------------\n");
    return 1;
}
public OnGameModeInit()
{
    for(new i; i < MAX_PLAYERS; ++i)
    {
    GiveDamage[i] = TextDrawCreate(171.000000, 388.000000, " ");
    TextDrawAlignment(GiveDamage[i], 2);
    TextDrawBackgroundColor(GiveDamage[i], 255);
    TextDrawFont(GiveDamage[i], 2);
    TextDrawLetterSize(GiveDamage[i], 0.160000, 0.599999);
    TextDrawColor(GiveDamage[i], 0x00FF04FF);
    TextDrawSetOutline(GiveDamage[i], 1);
    TextDrawSetProportional(GiveDamage[i], 1);
    }

    for(new i; i < MAX_PLAYERS; ++i)
    {
    TakeDamage[i] = TextDrawCreate(440.000000,388.000000, " ");
    TextDrawAlignment(TakeDamage[i], 2);
    TextDrawBackgroundColor(TakeDamage[i], 255);
    TextDrawFont(TakeDamage[i], 2);
    TextDrawLetterSize(TakeDamage[i], 0.160000, 0.599999);
    TextDrawColor(TakeDamage[i], 0xE81010FF);
    TextDrawSetOutline(TakeDamage[i], 1);
    TextDrawSetProportional(TakeDamage[i], 1);
    }
    return 1;
}

forward OnPlayerGiveDamage(playerid, damagedid, Float: amount, weaponid);
public OnPlayerGiveDamage(playerid, damagedid, Float: amount, weaponid)
{
    new s[20];
    format(s, 20, "+Damage %.0f", amount);
    TextDrawSetString(GiveDamage[playerid], s);
    TextDrawShowForPlayer(playerid, GiveDamage[playerid]);
    PlayerPlaySound(playerid,17802,0.0,0.0,0.0);
    SetTimerEx("DestruirTextoDraw", 1000, false, "i", playerid);
    return 1;
}

forward OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid);
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid)
{
    new s[20];
    format(s, 20, "-Damage %.0f", amount);
    TextDrawSetString(TakeDamage[playerid], s);
    TextDrawShowForPlayer(playerid, TakeDamage[playerid]);
    SetTimerEx("DestruirTextoDraw", 1000, false, "i", playerid);
    return 1;
}

forward DestruirTextoDraw(playerid);
public DestruirTextoDraw(playerid)
{
    TextDrawHideForPlayer(playerid, GiveDamage[playerid]);
    TextDrawHideForPlayer(playerid, TakeDamage[playerid]);
    return 1;
}
Reply
#2

Please Help Me
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)