Player Offline command
#1

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;
}
Reply
#2

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.
Reply
#3

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)