SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help > Discussion

Thread Tools Display Modes
Old 13/12/2017, 07:43 PM   #1
Little Clucker
Join Date: Nov 2013
Posts: 16
Reputation: 2
Default Offline loading data y_ini

So, I'm making a command that will load user activity while he is offline.
The problem is that it always shows 0...
Here is the code:

CMD:aktivnostigraca(playerid, params[])
	new ime[40];
	new string[264], string2[264];
	if(PlayerInfo[playerid][pAdmin] < 1337) return SCM(playerid, COLOR_GREY, "[GRESKA] Samo Admini!");
	if(sscanf(params, "s[40]", ime)) return SCM(playerid, COLOR_GREY, "[Komanda] /aktivnositgraca [IME_PREZIME]");
	new id = GetPlayerID(ime);
		INI_ParseFile(string, "LoadAkt_%s", .bExtra = true, .extra = playerid);
		format(string, 264, "| [OFFLINE] Igrac: %s | Admin Aktivnost: %d | GS Aktivnost: %d | Lider Aktivnost: %d |", ime, AdmAkti, GSAkti, LAkti);
		SCM(playerid, COLOR_GREY, string);
		AdmAkti = 0; GSAkti = 0; LAkti = 0;
		format(string, 264, "| [ONLINE] Igrac: %s | Admin Aktivnost: %d | GS Aktivnost: %d | Lider Aktivnost: %d |", ime, PlayerInfo[id][AdmAkt], PlayerInfo[id][GSAkt], PlayerInfo[playerid][LAkt]);
		SCM(playerid, COLOR_GREY, string);
    return true;

forward LoadAkt_data(name[],value[]);
public LoadAkt_data(name[],value[])
INI_Int("AdmAktivnost", AdmAkti);
INI_Int("GSAktivnost", GSAkti);
INI_Int("LAktivnost", LAkti);
return 1;
for online, it loads ok, it saves when player loggs out and loads when he get ig..
My GameModes :
My Maps :
A base
My FilterScripts :
SaNeLSANY is offline   Reply With Quote

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Loading offline player Data (MySQL System) Juvanii Scripting Help 3 30/07/2016 02:34 PM
y_ini loops a lot of times while loading data Muted Scripting Help 0 11/06/2015 01:56 PM
Problem loading object data with y_ini iOxide Scripting Help 6 12/09/2014 08:21 AM
Loading & saving Objects data problem with Y_ini + SetPlayerAttachedObject CharlieSanchez Scripting Help 2 10/06/2014 01:28 PM
Loading data with Y_INI sim_sima Scripting Help 15 15/12/2013 10:53 PM

All times are GMT. The time now is 11:26 PM.

Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.