Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /////////////////////////////////////////////////////////////////////////////////////
- // Creditos: //
- // By Adoniiz. //
- /////////////////////////////////////////////////////////////////////////////////////
- #include <a_samp>
- #pragma tabsize 0
- /////////////////////////////////////////////////////////////////////////////////////
- new Text:VerVidaQuito[MAX_PLAYERS];
- new Text:Dano[MAX_PLAYERS];
- /////////////////////////////////////////////////////////////////////////////////////
- forward TiempoEnIrseElDanoSacado(playerid);
- forward TiempoEnIrseElDanoSufrido(playerid);
- /////////////////////////////////////////////////////////////////////////////////////
- public OnFilterScriptInit()
- {
- print("\n\n --------------------------------------------");
- print(" | Ver Daño Sacado/Daño Sufrido by Adoniiz |");
- print(" ---------------------------------------------\n");
- for(new playerid = 0; playerid < GetMaxPlayers(); playerid ++)
- {
- Dano[playerid] = TextDrawCreate(301.000000, 155.000000, "_");
- TextDrawBackgroundColor(Dano[playerid], 255);
- TextDrawFont(Dano[playerid], 3);
- TextDrawLetterSize(Dano[playerid], 0.579999, 1.100000);
- TextDrawColor(Dano[playerid], 16777215);
- TextDrawSetOutline(Dano[playerid], 0);
- TextDrawSetProportional(Dano[playerid], 1);
- TextDrawSetShadow(Dano[playerid], 2);
- VerVidaQuito[playerid] = TextDrawCreate(301.000000, 167.000000, "_");
- TextDrawBackgroundColor(VerVidaQuito[playerid], 255);
- TextDrawFont(VerVidaQuito[playerid], 3);
- TextDrawLetterSize(VerVidaQuito[playerid], 0.579999, 1.100000);
- TextDrawColor(VerVidaQuito[playerid], -16776961);
- TextDrawSetOutline(VerVidaQuito[playerid], 0);
- TextDrawSetProportional(VerVidaQuito[playerid], 1);
- TextDrawSetShadow(VerVidaQuito[playerid], 2);
- }
- return 1;
- }
- /////////////////////////////////////////////////////////////////////////////////////
- public OnPlayerGiveDamage(playerid, damagedid, Float: amount, weaponid)
- {
- if(damagedid != INVALID_PLAYER_ID)
- {
- new string[128];
- format(string, sizeof(string), "%.0f",amount);
- TextDrawSetString(Dano[playerid], string);
- TextDrawShowForPlayer(playerid,Dano[playerid]);
- SetTimerEx("TiempoEnIrseElDanoSacado", 3000, false, "i", playerid);
- }
- return 1;
- }
- public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid)
- {
- if(issuerid != INVALID_PLAYER_ID)
- {
- new string[128];
- format(string, sizeof(string), "%.0f",amount);
- TextDrawSetString(VerVidaQuito[playerid], string);
- TextDrawShowForPlayer(playerid, VerVidaQuito[playerid]);
- SetTimerEx("TiempoEnIrseElDanoSufrido", 3000, false, "i", playerid);
- }
- return 1;
- }
- public TiempoEnIrseElDanoSacado(playerid)
- {
- TextDrawHideForPlayer(playerid,Dano[playerid]);
- return 1;
- }
- public TiempoEnIrseElDanoSufrido(playerid)
- {
- TextDrawHideForPlayer(playerid,VerVidaQuito[playerid]);
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment