Thread: gui windows x_X
View Single Post
  #14  
Old 03-18-2006, 09:06 PM
excaliber7388 excaliber7388 is offline
Banned
excaliber7388's Avatar
Join Date: Jul 2005
Location: US
Posts: 5,229
excaliber7388 can only hope to improve
Send a message via AIM to excaliber7388
thanks, this is what I currently have for a staff weapon, it's not calling the action, or the parameters are wrong. (I'm trying gs2, finally)
PHP Code:
function onActionserverside()
{
  if(
params[0]==jail)
  {
    
with(getplayer(params[1]))
    {
      
setlevel2 jail_darkrival2.nw,30,30;
      
#c="Jailed For params[2]";
      
savelog2 StaffToollog.txt,Staff="player.account" Jailed Player="params[1]" Reason="params[2]";
    }
    
with(getplayer(player.account))
    {
      
#c="Jailed params[1] for params[2]";
    
}
  }
  if(
params[0]==disconnect)
  {
//same stuff as jail, but with serevrwarp Login thrown in ;)
  
}
}
//#CLIENTSIDE
function onWeaponfired()

  
staffwindow.showtop();
  new 
GuiWindowCtrl("staffwindow"
  { 
    
extent = {21090}; 
    
position = {0screenheight-100}; 
    
text "Staff Control"
    new 
GuiTextEditCtrl("Player")
    {
      
position = {5,25};
      
extent = {100,20};
      
text "Account";
    }
    new 
GuiTextEditCtrl("Reason")
    {
      
position = {5,45};
      
extent = {100,20};
      
text "Reason";
    }
    new 
GuiButtonCtrl("Jail"
    { 
      
position = {10525}; 
      
extent = {10030}; 
      
text "Jail"
    }
    new 
GuiButtonCtrl("Disconnect"
    { 
      
position = {10555}; 
      
extent = {10030}; 
      
text "Disconnect"
    }
  } 
}
function 
Jail.onAction() 

    
triggeraction 0,0,serverside,Staff Control,jail,Player.text,Reason.text;
}
function 
Disconnect.onAction()
{
  
//stuff

Reply With Quote