Thread: copylevel?
View Single Post
  #21  
Old 06-06-2007, 02:56 PM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
In the NPC-Server's rights, add
rw levels/*.nw

Here is an example of how to copy levels (GUI/Weapon-Script):
PHP Code:
function onActionServerSidecmd )
{
  switch ( 
cmd )
  {
    case 
"createHouse":
    {
       
temp.levelCopy "levels/housetemplate.nw"// Copys from levels/housetemplate.nw
       
temp.newCopy format"levels/house_%s.nw"player.account ); // New level in levels/ and named house_ACCOUNT.nw
       
temp.templateLevel.loadLinestemp.levelCopy );
       
       
saveLinestemp.newCopytemp.templateLevelfalse );
       break;
    }
  }
}
//#CLIENTSIDE
function onPlayerChats()
{
  if ( 
player.chat == "/create house" )
  {
    
triggerServer"gui"name"createHouse" );
  }

__________________
Reply With Quote