Guest User

Untitled

a guest
Dec 7th, 2012
838
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.77 KB | None | 0 0
  1. #include <a_samp>
  2.  
  3. new Text:Health[MAX_PLAYERS];
  4.  
  5. forward vitals(playerid);
  6.  
  7. public OnGameModeInit()
  8. {
  9. for(new i = 0; i < MAX_PLAYERS; i++)
  10. {
  11. Health[i] = TextDrawCreate(548.000000, 67.000000, "%100");
  12. TextDrawBackgroundColor(Health[i], 255);
  13. TextDrawFont(Health[i], 1);
  14. TextDrawLetterSize(Health[i], 0.290000, 0.799999);
  15. TextDrawColor(Health[i], -1);
  16. TextDrawSetOutline(Health[i], 0);
  17. TextDrawSetProportional(Health[i], 1);
  18. TextDrawSetShadow(Health[i], 1);
  19. }
  20. SetTimer("vitals",1000,1);
  21. return 1;
  22. }
  23.  
  24. public vitals(playerid)
  25. {
  26. new string[5];
  27. new Float:pHealth
  28. GetPlayerHealth(playerid,pHealth);
  29. format(string, sizeof(string), "%.0f%", pHealth);
  30. TextDrawSetString(Health[playerid], string);
  31. }
Advertisement
Add Comment
Please, Sign In to add comment