View Single Post
  #1  
Old 10-01-2006, 04:29 AM
KuJi KuJi is offline
Banned
Join Date: Apr 2004
Location: Staten Island, New York
Posts: 2,202
KuJi will become famous soon enough
Send a message via ICQ to KuJi Send a message via AIM to KuJi Send a message via MSN to KuJi Send a message via Yahoo to KuJi
Reset on Login (Text-Saved)

Text saved for reset. Also allows you to just change a variable to reset everyone easily =). Basically, on login it checks if your reset version is less then the players current version.. if it is lower it will reset you first (for security issues) and then add it. Works great, and well. =). Have fun, don't forget to rep!

In Control-NPC:
PHP Code:
function onCreated()
{
  
this.resetver 1;
}

function 
onActionPlayerOnline()
{
  
temp.rplayers.loadvars("resetlog.txt");

  if (
makevar("temp.rplayers.acct_" player.account) < this.resetver)
  {
    
sendtorc(format("/reset %s"player.account));

    
makevar("temp.rplayers.acct_" player.account) = this.resetver;
    
temp.rplayers.savevars("resetlog.txt"0);
    return 
false;
  }

  
// Whatever else you possibly have in the control-npc under actionplayeronline you can place here =).

The text file should be stored in scriptfiles/resetlog.txt.

Example File
acct_KuJi=1
Reply With Quote