Quote:
Originally Posted by Stryke
@cbkbud: How would you check if a player went online/offline?
@Tigarius: Nothing really for future reference. I just made a stupid mistake I overlooked. The ones that others solved for me are still alive and well.
|
In NPC-Control script:
PHP Code:
function onActionPlayerOnline()
{
player.loadVars( "control/players/" @ player.account @ ".txt" );
}
function onPlayerLogOut( p )
{
if ( p.account.length() > 2 )
{
p.saveVars( "control/players/" @ player.account @ ".txt", false );
}
}
Something like this perhaps?