I think I got it so if anyone comes across this thread and wonders how I made it heres the code:
works on 0.3x and 1 issue is it doesnt spin around
Код:
//Made by FKu
#include <a_samp>
forward dmgtdhide(playerid);
new Text:FKu_DMGtd[MAX_PLAYERS char],ObjectID[MAX_PLAYERS char];
public OnPlayerConnect(playerid)
{
FKu_DMGtd{playerid} = TextDrawCreate(150.000000, 375.000000, "HIT");
TextDrawLetterSize(FKu_DMGtd{playerid}, 0.480000, 2.000000);
TextDrawColor(FKu_DMGtd{playerid}, 0xFF0000FF);
return 1;
}
public OnPlayerGiveDamage(playerid, damagedid, Float: amount, weaponid)
{
new FKu_string[10],Float:check[MAX_PLAYERS];
format(FKu_string,sizeof(FKu_string),"HIT: %f",amount);
TextDrawSetString(FKu_DMGtd{playerid},FKu_string);
TextDrawShowForPlayer(playerid,FKu_DMGtd{playerid});
GetPlayerArmour(damagedid,check[damagedid]);
if(check[damagedid] == 0) ObjectID{playerid} = CreateObject(1240, 0.0, 0.0, -100.0, 0.0, 0.0, 0.0, 0.0);
else ObjectID{playerid} = CreateObject(1242, 0.0, 0.0, -100.0, 0.0, 0.0, 0.0, 0.0);
AttachObjectToPlayer(ObjectID{playerid}, damagedid, 0.0, 0.0, 1.5, 0.0, 0.0, 0.0);
SetTimerEx("dmgtdhide",750,false,"d",playerid);
return 1;
}
public dmgtdhide(playerid)
{
TextDrawHideForPlayer(playerid,FKu_DMGtd{playerid});
DestroyObject(ObjectID{playerid});
return 1;
}