SA-MP Forums Archive
[Pedido] Som do Dano - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Pedido] Som do Dano (/showthread.php?tid=374187)



Som do Dano - rugal - 02.09.2012

Queria som do Dano do GM CBS

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

que nem nesse video se pode ve q quando ele acerta o tiro no inimigo faz barulho "um som" Ae queria saber que som й esse


Re: Som do Dano - Diogo123 - 02.09.2012

pawn Код:
#include <a_samp>

#define LGreenColor 0x00FF04FF


#define RedColor 0xE81010FF



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[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;

}
nгo lembro quem fez achei no pc '-'


Re: Som do Dano - rugal - 02.09.2012

Ajudo muito Vlw + REP


Re: Som do Dano - spbruno - 31.07.2015

tenho esse sistema.. foi feito pelo [MsT]Pho3niX
mas quando mudei meu samp pra tiro no lag, quando vc recebe o dano tudo ok, mas
quando vc atira dano na lag arranca a vida mas n mostra o dano e som .. e quando atira na skin mostra o dano e som mas n arranca vida.. alguйm pode dar uma luz de como muda isso?? n precisa fazer o cуdigo sу uma dica, sei que tenho q passar pro OnPlayerTakeDamage mas n estou conseguindo