Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- new Text:Health[MAX_PLAYERS];
- forward vitals(playerid);
- public OnGameModeInit()
- {
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- Health[i] = TextDrawCreate(548.000000, 67.000000, "%100");
- TextDrawBackgroundColor(Health[i], 255);
- TextDrawFont(Health[i], 1);
- TextDrawLetterSize(Health[i], 0.290000, 0.799999);
- TextDrawColor(Health[i], -1);
- TextDrawSetOutline(Health[i], 0);
- TextDrawSetProportional(Health[i], 1);
- TextDrawSetShadow(Health[i], 1);
- }
- SetTimer("vitals",1000,1);
- return 1;
- }
- public vitals(playerid)
- {
- new string[5];
- new Float:pHealth
- GetPlayerHealth(playerid,pHealth);
- format(string, sizeof(string), "%.0f%", pHealth);
- TextDrawSetString(Health[playerid], string);
- }
Advertisement
Add Comment
Please, Sign In to add comment