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 = {210, 90};
position = {0, screenheight-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 = {105, 25};
extent = {100, 30};
text = "Jail";
}
new GuiButtonCtrl("Disconnect")
{
position = {105, 55};
extent = {100, 30};
text = "Disconnect";
}
}
}
function Jail.onAction()
{
triggeraction 0,0,serverside,Staff Control,jail,Player.text,Reason.text;
}
function Disconnect.onAction()
{
//stuff
}