Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #define Filterscript
- #include <a_samp>
- #include <dini>
- #include <zcmd>
- new Text:Hungry[MAX_PLAYERS];
- new Float:thing[256];
- public OnFilterScriptInit()
- {
- new file[256],n[MAX_PLAYER_NAME];
- for(new playerid; playerid < MAX_PLAYERS; playerid++)
- {
- GetPlayerName(playerid,n,MAX_PLAYER_NAME);
- format(file,sizeof(file),"Stats/%s.txt",n);
- if(!dini_Exists(file))
- {
- dini_Create(file);
- dini_IntSet(file,"Hunger",100);
- }
- }
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- thing = dini_Get(file, "Hunger");
- Hungry[i] = TextDrawCreate(43.000000, 147.000000, thing);
- TextDrawBackgroundColor(Hungry[i], -1);
- TextDrawFont(Hungry[i], 0);
- TextDrawLetterSize(Hungry[i], 0.919999, 2.399999);
- TextDrawColor(Hungry[i], -16776961);
- TextDrawSetOutline(Hungry[i], 1);
- TextDrawSetProportional(Hungry[i], 1);
- TextDrawTextSize(Hungry[i], 139.000000, 754.000000);
- }
- return 1;
- }
- public OnPlayerConnect(playerid)
- {
- }
- public OnPlayerSpawn(playerid)
- {
- TextDrawShowForPlayer(playerid, Hungry[playerid]);
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment