Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- //==============================================================================
- new Text:Textdraw0;
- new Text:Textdraw1;
- new Text:Textdraw2;
- new Text:Textdraw3;
- //==============================================================================
- forward Update();
- //==============================================================================
- public OnFilterScriptInit()
- {
- Textdraw0 = TextDrawCreate(536.799743, 417.386627, "Health:");
- TextDrawLetterSize(Textdraw0, 0.464399, 1.734400);
- TextDrawAlignment(Textdraw0, 1);
- TextDrawColor(Textdraw0, 16777215);
- TextDrawSetShadow(Textdraw0, 0);
- TextDrawSetOutline(Textdraw0, 1);
- TextDrawBackgroundColor(Textdraw0, 51);
- TextDrawFont(Textdraw0, 1);
- TextDrawSetProportional(Textdraw0, 1);
- //==========================================================================
- Textdraw1 = TextDrawCreate(600.000000, 418.133300, "100");
- TextDrawLetterSize(Textdraw1, 0.366800, 1.629866);
- TextDrawAlignment(Textdraw1, 1);
- TextDrawColor(Textdraw1, -16776961);
- TextDrawSetShadow(Textdraw1, 0);
- TextDrawSetOutline(Textdraw1, 1);
- TextDrawBackgroundColor(Textdraw1, 51);
- TextDrawFont(Textdraw1, 2);
- TextDrawSetProportional(Textdraw1, 1);
- //==========================================================================
- Textdraw2 = TextDrawCreate(536.000183, 431.573242, "Armor:");
- TextDrawLetterSize(Textdraw2, 0.476400, 1.659733);
- TextDrawAlignment(Textdraw2, 1);
- TextDrawColor(Textdraw2, 16777215);
- TextDrawSetShadow(Textdraw2, 0);
- TextDrawSetOutline(Textdraw2, 1);
- TextDrawBackgroundColor(Textdraw2, 51);
- TextDrawFont(Textdraw2, 1);
- TextDrawSetProportional(Textdraw2, 1);
- //==========================================================================
- Textdraw3 = TextDrawCreate(600.000122, 432.319946, "100");
- TextDrawLetterSize(Textdraw3, 0.382000, 1.585066);
- TextDrawAlignment(Textdraw3, 1);
- TextDrawColor(Textdraw3, -16776961);
- TextDrawSetShadow(Textdraw3, 0);
- TextDrawSetOutline(Textdraw3, 1);
- TextDrawBackgroundColor(Textdraw3, 51);
- TextDrawFont(Textdraw3, 2);
- TextDrawSetProportional(Textdraw3, 1);
- //==========================================================================
- SetTimer("Update", 50, true);
- //==========================================================================
- return 1;
- }
- //==============================================================================
- public Update()
- {
- new playerid;
- new Float:Health;
- new Float:Armour;
- GetPlayerHealth(playerid, Health);
- GetPlayerArmour(playerid, Armour);
- new New[41];
- format(New, sizeof(New), "%f", Health);
- TextDrawSetString(Textdraw1, New);
- format(New, sizeof(New), "%f", Armour);
- TextDrawSetString(Textdraw3, New);
- //--------------------------------------------------------------------------
- TextDrawShowForPlayer(playerid, Textdraw0);
- TextDrawShowForPlayer(playerid, Textdraw1);
- TextDrawShowForPlayer(playerid, Textdraw2);
- TextDrawShowForPlayer(playerid, Textdraw3);
- //--------------------------------------------------------------------------
- }
- //==============================================================================
- public OnPlayerSpawn(playerid)
- {
- TextDrawShowForPlayer(playerid, Textdraw0);
- TextDrawShowForPlayer(playerid, Textdraw1);
- TextDrawShowForPlayer(playerid, Textdraw2);
- TextDrawShowForPlayer(playerid, Textdraw3);
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement