Player Offline command - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Player Offline command (
/showthread.php?tid=368685)
Player Offline command -
SumX - 14.08.2012
Hello!
There is any way to ingame modify an .ini account if the player is offline?
Or to chek something in the .ini account if the player is offline?
Example: I was trying to chek last player's login with a command,but it is working only if the player is online.
Код:
CMD:online(playerid, params[])
{
new pLastOn[ 20 + 20 ];
new OnlineString[ 128 ];
new pLastOnName[ 24 ];
if ( sscanf( params, "u", params[ 0 ], params[ 1 ] ) )
return SendClientMessage( playerid, -1, "Usage: /online [id/name]");
GetPVarString( params[ 0 ], "On", pLastOn, sizeof pLastOn );
GetPlayerName( params[ 0 ],pLastOnName,sizeof(pLastOnName));
format( OnlineString,sizeof(OnlineString),"["REDSV"%s"BLUESV"] last Online time is "REDSV"%s.",pLastOnName,pLastOn);
SCM(playerid,BLUES,OnlineString);
return 1;
}
Re: Player Offline command -
JaKe Elite - 14.08.2012
Not sure, but maybe it was only can be done by MySQL,
it can be also done in dini or y_ini i think

I don't know why you want such a thing a command for player offline.
Re: Player Offline command -
[MM]RoXoR[FS] - 14.08.2012
Well yes, this can be done
pawn Код:
new str[28],path[50];
if(sscanf(params,"s[30]",str)) return SendClientMessage(playerid,-1,"USAGE : ");
format(path,sizeof(path),"YOUR_PATH/%s.ini",str);
if(!fexist(path)) return SendClientMessage(playerid,-1,"User in not registered");
//Open file and do all function's