Balkan SA:MP

PAWN skriptanje, gamemodovi, filterskripte, include fajlovi, mape, pluginovi => Razgovor u vezi PAWN - skriptanja => Temu započeo: Hulk.png poslato Februar 03, 2018, 12:26:09 POSLE PODNE

Naslov: OnPlayerTakeDamage Pomoc
Poruka od: Hulk.png poslato Februar 03, 2018, 12:26:09 POSLE PODNE
Imam problem oko Take Damage.. Give damage kad me neko lupi normalno radi pokazuje mi, a kad mene neko lupa ovaj take damage uopce mi ne pokazuje td da me udara

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

public OnGameModeInit()
{
        for(new i; i < MAX_PLAYERS; ++i)
   {
   GiveDamage = TextDrawCreate(171.000000, 388.000000, " ");
   TextDrawAlignment(GiveDamage, 2);
   TextDrawBackgroundColor(GiveDamage, 255);
   TextDrawFont(GiveDamage, 2);
   TextDrawLetterSize(GiveDamage, 0.160000, 0.599999);
   TextDrawColor(GiveDamage, 0x00FF04FF);
   TextDrawSetOutline(GiveDamage, 1);
   TextDrawSetProportional(GiveDamage, 1);
   }

   for(new i; i < MAX_PLAYERS; ++i)
   {
   TakeDamage = TextDrawCreate(440.000000,388.000000, " ");
   TextDrawAlignment(TakeDamage, 2);
   TextDrawBackgroundColor(TakeDamage, 255);
   TextDrawFont(TakeDamage, 2);
   TextDrawLetterSize(TakeDamage, 0.160000, 0.599999);
   TextDrawColor(TakeDamage, 0xE81010FF);
   TextDrawSetOutline(TakeDamage, 1);
   TextDrawSetProportional(TakeDamage, 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("UnistiTextDraw", 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("UnistiTextDraw", 1000, false, "i", playerid);
    return 1;
}

forward UnistiTextDraw(playerid);
public UnistiTextDraw(playerid)
{
   TextDrawHideForPlayer(playerid, GiveDamage[playerid]);
   TextDrawHideForPlayer(playerid, TakeDamage[playerid]);
   return 1;
}

[/pawn]
Naslov: Odg: OnPlayerTakeDamage Pomoc
Poruka od: Terza Lazarevic poslato Februar 03, 2018, 13:07:08 POSLE PODNE
"Give damage kad me neko lupi normalno radi pokazuje mi, a kad mene neko lupa ovaj take damage uopce mi ne pokazuje td da me udara", ima li smisla ovo sto si rekao?
Naslov: Odg: OnPlayerTakeDamage Pomoc
Poruka od: Hulk.png poslato Februar 03, 2018, 13:14:55 POSLE PODNE
Zeznuo sam se give damage kad ja nekog lupam pokazuje mi, a take damage kad mene neko lupa ne pokazuje mi td
Naslov: Odg: OnPlayerTakeDamage Pomoc
Poruka od: Hulk.png poslato Februar 03, 2018, 14:13:35 POSLE PODNE
Hvala Terzic