[Pedido] Como faz isso ?
#1

Oi Galera, alguйm sabe fazer isso. quando um player atira no outro, e acerta, mostrar o dano do tiro ?

Igual a esse video :

[ame]http://www.youtube.com/watch?v=c1WeY3F9xgw[/ame]

Obrigado !
To o dia todo atras disso
Reply
#2

pawn Код:
public OnPlayerGiveDamage(playerid, damagedid, Float: amount, weaponid)
{ if(damagedid != INVALID_PLAYER_ID)
{ new string[20]; format(string, sizeof(string), "~g~-~r~%.0f", amount);
  GameTextForPlayer(playerid, string, 1000, 6);
  GameTextForPlayer(damagedid, string, 1000, 5);
}
  return 1;
}

Ta certo assim ?
Reply
#3

Tem um FS ali na бrea de lanзamentos, sу procurar. Й recente.
Reply
#4

pawn Код:
#include <a_samp>

public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid)
{
    if(IsPlayerConnected(playerid)
        && issuerid != 65535)
    {
        new dano[80];
        format(dano, sizeof(dano),"~r~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~Perda: ~h~~h~~h~~h~ -%d", floatround(amount, floatround_round));
        GameTextForPlayer(playerid, dano, 2500, 3);
    }

    printf("%d | %d", playerid, issuerid);
    return true;
}

public OnPlayerGiveDamage(playerid, damagedid, Float: amount, weaponid)
{
    new dano[80];
    format(dano, sizeof(dano),"~g~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~Dano: ~h~~h~~h~ +%d", floatround(amount, floatround_round));
    GameTextForPlayer(playerid, dano, 2500, 3);
    return true;
}
fonte: garfield -q
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)