Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- Time and Date: 2014-5-11 @ 19:47:32
- Instructions:
- 1- Compile this file using the compiler provided with the sa-mp server package.
- 2- Copy the .amx file to the filterscripts directory.
- 3- Add the filterscripts in the server.cfg file (more info here:
- [url]http://wiki.sa-mp.com/wiki/Server.cfg[/url])
- 4- Run the server!
- Disclaimer:
- Do not remove any credits!!!
- Need scripter? Add: hitmansfcrrpg on skype.
- v1.0 By: HitterHitman a.k.a Kick_Ass
- v2.0 By: iReacheR aka ReacheR_Z
- Further Edits By: HitterHitman a.k.a Kick_Ass
- */
- #include <a_samp>
- new Text:DamageTD[10];
- new Timer[MAX_PLAYERS];
- stock CreateTextDraws()
- {
- //Creating the Damage Textdraws//
- DamageTD[0] = TextDrawCreate(2.000000, 3.000000, "~n~");
- TextDrawBackgroundColor(DamageTD[0], 255);
- TextDrawFont(DamageTD[0], 0);
- TextDrawLetterSize(DamageTD[0], 4.379998, 1.700001);
- TextDrawColor(DamageTD[0], -1);
- TextDrawSetOutline(DamageTD[0], 0);
- TextDrawSetProportional(DamageTD[0], 1);
- TextDrawSetShadow(DamageTD[0], 1);
- TextDrawUseBox(DamageTD[0], 1);
- TextDrawBoxColor(DamageTD[0], -16776961);
- TextDrawTextSize(DamageTD[0], 636.000000, 275.000000);
- DamageTD[1] = TextDrawCreate(2.000000, 20.000000, "~n~");
- TextDrawBackgroundColor(DamageTD[1], 255);
- TextDrawFont(DamageTD[1], 0);
- TextDrawLetterSize(DamageTD[1], 4.379998, 1.700001);
- TextDrawColor(DamageTD[1], -1);
- TextDrawSetOutline(DamageTD[1], 0);
- TextDrawSetProportional(DamageTD[1], 1);
- TextDrawSetShadow(DamageTD[1], 1);
- TextDrawUseBox(DamageTD[1], 1);
- TextDrawBoxColor(DamageTD[1], -16777066);
- TextDrawTextSize(DamageTD[1], 636.000000, 275.000000);
- DamageTD[2] = TextDrawCreate(2.000000, 35.000000, "~n~");
- TextDrawBackgroundColor(DamageTD[2], 255);
- TextDrawFont(DamageTD[2], 0);
- TextDrawLetterSize(DamageTD[2], 4.379998, 1.700001);
- TextDrawColor(DamageTD[2], -1);
- TextDrawSetOutline(DamageTD[2], 0);
- TextDrawSetProportional(DamageTD[2], 1);
- TextDrawSetShadow(DamageTD[2], 1);
- TextDrawUseBox(DamageTD[2], 1);
- TextDrawBoxColor(DamageTD[2], -16777116);
- TextDrawTextSize(DamageTD[2], 636.000000, 275.000000);
- DamageTD[3] = TextDrawCreate(2.000000, 50.000000, "~n~");
- TextDrawBackgroundColor(DamageTD[3], 255);
- TextDrawFont(DamageTD[3], 0);
- TextDrawLetterSize(DamageTD[3], 4.379998, 1.700001);
- TextDrawColor(DamageTD[3], -1);
- TextDrawSetOutline(DamageTD[3], 0);
- TextDrawSetProportional(DamageTD[3], 1);
- TextDrawSetShadow(DamageTD[3], 1);
- TextDrawUseBox(DamageTD[3], 1);
- TextDrawBoxColor(DamageTD[3], -16777166);
- TextDrawTextSize(DamageTD[3], 636.000000, 275.000000);
- DamageTD[4] = TextDrawCreate(2.000000, 65.000000, "~n~");
- TextDrawBackgroundColor(DamageTD[4], 255);
- TextDrawFont(DamageTD[4], 0);
- TextDrawLetterSize(DamageTD[4], 4.379998, 1.700001);
- TextDrawColor(DamageTD[4], -1);
- TextDrawSetOutline(DamageTD[4], 0);
- TextDrawSetProportional(DamageTD[4], 1);
- TextDrawSetShadow(DamageTD[4], 1);
- TextDrawUseBox(DamageTD[4], 1);
- TextDrawBoxColor(DamageTD[4], -16777206);
- TextDrawTextSize(DamageTD[4], 636.000000, 275.000000);
- DamageTD[5] = TextDrawCreate(2.000000, 430.000000, "~n~");
- TextDrawBackgroundColor(DamageTD[5], 255);
- TextDrawFont(DamageTD[5], 0);
- TextDrawLetterSize(DamageTD[5], 4.379998, 1.700001);
- TextDrawColor(DamageTD[5], -1);
- TextDrawSetOutline(DamageTD[5], 0);
- TextDrawSetProportional(DamageTD[5], 1);
- TextDrawSetShadow(DamageTD[5], 1);
- TextDrawUseBox(DamageTD[5], 1);
- TextDrawBoxColor(DamageTD[5], -16776961);
- TextDrawTextSize(DamageTD[5], 636.000000, 275.000000);
- DamageTD[6] = TextDrawCreate(2.000000, 414.000000, "~n~");
- TextDrawBackgroundColor(DamageTD[6], 255);
- TextDrawFont(DamageTD[6], 0);
- TextDrawLetterSize(DamageTD[6], 4.379998, 1.700001);
- TextDrawColor(DamageTD[6], -1);
- TextDrawSetOutline(DamageTD[6], 0);
- TextDrawSetProportional(DamageTD[6], 1);
- TextDrawSetShadow(DamageTD[6], 1);
- TextDrawUseBox(DamageTD[6], 1);
- TextDrawBoxColor(DamageTD[6], -16777066);
- TextDrawTextSize(DamageTD[6], 636.000000, 275.000000);
- DamageTD[7] = TextDrawCreate(2.000000, 400.000000, "~n~");
- TextDrawBackgroundColor(DamageTD[7], 255);
- TextDrawFont(DamageTD[7], 0);
- TextDrawLetterSize(DamageTD[7], 4.379998, 1.700001);
- TextDrawColor(DamageTD[7], -1);
- TextDrawSetOutline(DamageTD[7], 0);
- TextDrawSetProportional(DamageTD[7], 1);
- TextDrawSetShadow(DamageTD[7], 1);
- TextDrawUseBox(DamageTD[7], 1);
- TextDrawBoxColor(DamageTD[7], -16777116);
- TextDrawTextSize(DamageTD[7], 636.000000, 275.000000);
- DamageTD[8] = TextDrawCreate(2.000000, 383.000000, "~n~");
- TextDrawBackgroundColor(DamageTD[8], 255);
- TextDrawFont(DamageTD[8], 0);
- TextDrawLetterSize(DamageTD[8], 4.379998, 1.700001);
- TextDrawColor(DamageTD[8], -1);
- TextDrawSetOutline(DamageTD[8], 0);
- TextDrawSetProportional(DamageTD[8], 1);
- TextDrawSetShadow(DamageTD[8], 1);
- TextDrawUseBox(DamageTD[8], 1);
- TextDrawBoxColor(DamageTD[8], -16777166);
- TextDrawTextSize(DamageTD[8], 636.000000, 275.000000);
- DamageTD[9] = TextDrawCreate(1.000000, 366.000000, "~n~");
- TextDrawBackgroundColor(DamageTD[9], 255);
- TextDrawFont(DamageTD[9], 0);
- TextDrawLetterSize(DamageTD[9], 4.379998, 1.700001);
- TextDrawColor(DamageTD[9], -1);
- TextDrawSetOutline(DamageTD[9], 0);
- TextDrawSetProportional(DamageTD[9], 1);
- TextDrawSetShadow(DamageTD[9], 1);
- TextDrawUseBox(DamageTD[9], 1);
- TextDrawBoxColor(DamageTD[9], -16777206);
- TextDrawTextSize(DamageTD[9], 636.000000, 275.000000);
- }
- public OnFilterScriptInit()
- {
- print("Damage TD v3.0 loaded.");
- CreateTextDraws();
- return 1;
- }
- public OnFilterScriptExit()
- {
- for(new i = 0; i < 10; i++)
- {
- TextDrawHideForAll(DamageTD[i]);
- TextDrawDestroy(DamageTD[i]);
- }
- return 1;
- }
- public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid)
- {
- for(new i = 0; i < 10; i++)
- {
- TextDrawShowForPlayer(playerid, DamageTD[i]);
- }
- KillTimer(Timer[playerid]);
- Timer[playerid] = SetTimerEx("Hide", 1000, 0, "i", playerid);
- PlayerPlaySound(issuerid, 17802, 0.0, 0.0, 0.0); // Ding Sound
- return 1;
- }
- forward Hide(playerid);
- public Hide(playerid)
- {
- for(new i = 0; i < 10; i++)
- {
- TextDrawHideForPlayer(playerid, DamageTD[i]);
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement