Guest User

Untitled

a guest
Jan 5th, 2015
362
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.05 KB | None | 0 0
  1. #define Filterscript
  2.  
  3. #include <a_samp>
  4. #include <dini>
  5. #include <zcmd>
  6.  
  7.  
  8.  
  9. new Text:Hungry[MAX_PLAYERS];
  10. new Float:thing[256];
  11.  
  12. public OnFilterScriptInit()
  13. {
  14. new file[256],n[MAX_PLAYER_NAME];
  15. for(new playerid; playerid < MAX_PLAYERS; playerid++)
  16. {
  17. GetPlayerName(playerid,n,MAX_PLAYER_NAME);
  18. format(file,sizeof(file),"Stats/%s.txt",n);
  19. if(!dini_Exists(file))
  20. {
  21. dini_Create(file);
  22. dini_IntSet(file,"Hunger",100);
  23. }
  24. }
  25. for(new i = 0; i < MAX_PLAYERS; i++)
  26. {
  27. thing = dini_Get(file, "Hunger");
  28. Hungry[i] = TextDrawCreate(43.000000, 147.000000, thing);
  29. TextDrawBackgroundColor(Hungry[i], -1);
  30. TextDrawFont(Hungry[i], 0);
  31. TextDrawLetterSize(Hungry[i], 0.919999, 2.399999);
  32. TextDrawColor(Hungry[i], -16776961);
  33. TextDrawSetOutline(Hungry[i], 1);
  34. TextDrawSetProportional(Hungry[i], 1);
  35. TextDrawTextSize(Hungry[i], 139.000000, 754.000000);
  36. }
  37.  
  38. return 1;
  39. }
  40.  
  41.  
  42.  
  43. public OnPlayerConnect(playerid)
  44. {
  45.  
  46. }
  47.  
  48. public OnPlayerSpawn(playerid)
  49. {
  50. TextDrawShowForPlayer(playerid, Hungry[playerid]);
  51. return 1;
  52. }
Advertisement
Add Comment
Please, Sign In to add comment