Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Creditos: Kuendo //
- //www.facebook.com/brygarciabg
- #include <a_samp>
- #if defined FILTERSCRIPT
- public OnFilterScriptInit()
- {
- return 1;
- }
- public OnFilterScriptExit()
- {
- return 1;
- }
- #else
- main()
- {
- }
- #endif
- //news
- new Text:Agredir[MAX_PLAYERS];
- new Text:Agredido[MAX_PLAYERS];
- public OnGameModeInit()
- {
- for(new i; i < MAX_PLAYERS; ++i)
- {
- Agredir[i] = TextDrawCreate(570.000000, 320.000000, "-100");
- TextDrawBackgroundColor(Agredir[i], 255);
- TextDrawFont(Agredir[i], 1);
- TextDrawLetterSize(Agredir[i], 0.500000, 1.000000);
- TextDrawColor(Agredir[i], -16776961);
- TextDrawSetOutline(Agredir[i], 0);
- TextDrawSetProportional(Agredir[i], 1);
- TextDrawSetShadow(Agredir[i], 1);
- TextDrawSetSelectable(Agredir[i], 0);
- Agredido[i] = TextDrawCreate(566.000000, 310.000000, "+100");
- TextDrawBackgroundColor(Agredido[i], 255);
- TextDrawFont(Agredido[i], 1);
- TextDrawLetterSize(Agredido[i], 0.500000, 1.000000);
- TextDrawColor(Agredido[i], 16711935);
- TextDrawSetOutline(Agredido[i], 0);
- TextDrawSetProportional(Agredido[i], 1);
- TextDrawSetShadow(Agredido[i], 1);
- TextDrawSetSelectable(Agredido[i], 0);
- }
- return 1;
- }
- public OnGameModeExit()
- {
- return 1;
- }
- forward OnPlayerGiveDamage(playerid, damagedid, Float: amount);
- public OnPlayerGiveDamage(playerid, damagedid, Float: amount)
- {
- new string[50];
- format(string, 50, "~g~+%.0f", amount);
- PlayerPlaySound(playerid, 5205, 0.0, 0.0, 0.0);
- TextDrawSetString(Agredido[playerid], string);
- TextDrawShowForPlayer(playerid, Agredido[playerid]);
- SetTimerEx("RemoveTextDraw", 2000, false, "i", playerid);
- return 1;
- }
- public OnPlayerTakeDamage(playerid, issuerid, Float: amount)
- {
- new string[50];
- format(string, 50, "~r~-%.0f", amount);
- TextDrawSetString(Agredir[playerid], string);
- TextDrawShowForPlayer(playerid, Agredir[playerid]);
- SetTimerEx("RemoveTextDraw", 2000, false, "i", playerid);
- return 1;
- }
- forward RemoveTextDraw(playerid);
- public RemoveTextDraw(playerid)
- {
- TextDrawHideForPlayer(playerid, Agredir[playerid]);
- TextDrawHideForPlayer(playerid, Agredido[playerid]);
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement