12.08.2015, 00:28
Por favor alguйm pode me ajuda ou uma dica de como passar esse sistema para takedamage? meu server era tiro na skin e funcionava perfeito, agora ta no lag, e nгo consigo mudar o sistema pra lag.. quando vc atira na pessoa mostra o dano que vc tirou dela ..... ja procurei vi algumas coisas relacionadas e ate compila sem erro,.... mas n funciona, nada aparece,
ja fiu em foruns mas sу se fala em givedamage... por favor alguйm pode ajuda? n precisa faze o codigo pra mim, й so dar algumas dicas pra mim se vira
#include <a_samp>
#define LGreenColor 0x00FF04FF
public OnGameModeInit()
{
for(new i; i < MAX_PLAYERS; ++i)
{
GiveDamage = 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);
}
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 DestruirTextoDraw(playerid);
public DestruirTextoDraw(playerid)
{
TextDrawHideForPlayer(playerid, GiveDamage[playerid]);
return 1;
}
ja fiu em foruns mas sу se fala em givedamage... por favor alguйm pode ajuda? n precisa faze o codigo pra mim, й so dar algumas dicas pra mim se vira
#include <a_samp>
#define LGreenColor 0x00FF04FF
public OnGameModeInit()
{
for(new i; i < MAX_PLAYERS; ++i)
{
GiveDamage = 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);
}
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 DestruirTextoDraw(playerid);
public DestruirTextoDraw(playerid)
{
TextDrawHideForPlayer(playerid, GiveDamage[playerid]);
return 1;
}