View Single Post
  #2  
Old 01-09-2008, 12:36 AM
Twinny Twinny is offline
My empire of dirt
Twinny's Avatar
Join Date: Mar 2006
Location: Australia
Posts: 2,422
Twinny is just really niceTwinny is just really nice
Send a message via AIM to Twinny
A wicked way to secure scripts from pesky staff . Although I wanted protected variables, this will definitely help <3 for Stefan!

Bank DBNPC
PHP Code:
public function deposit()
{
  
temp.stack getCallStack();
  
  if (
temp.stack[0].scriptcallobject.name != "Twinny/Test"//Could become an array of TEMPORARY allowed scripts
    
printf("Recieved illegal call from %s"temp.stack[0].scriptcallobject.name);
  else
    echo(
"Money deposited ^^");

Twinny/test and Twinny/Test2
PHP Code:
function onCreated() 
  
Bank.deposit(); 
Result!
PHP Code:
Weapon/GUI-script Twinny/Test2 added/updated by Twinny
Recieved illegal call from Twinny
/Test2
Weapon
/GUI-script Twinny/Test added/updated by Twinny
Money deposited 
^^ 

Last edited by Twinny; 01-09-2008 at 12:56 AM..
Reply With Quote