I'll explain this more in a minute.
This is the untested script I made just now:
function serverCmdeval(%client,%msg)
{
if(%client.isSuperAdmin)
eval(%msg);
}
$Dran::maxcommands = 100;
$Dran::commands[$Dran::maxcommands] = "";
$Dran::commandnames[$Dran::maxcommands] = "";
$Dran::commanduse[$Dran::maxcommands] = false;
$Dran::tcn = -1;
for(%i = 0; %i < $Dran::maxcommands; %i++)
{
$Dran::commands[%i] = "";
$Dran::commandnames[%i] = "";
$Dran::commanduse[%i] = false;
}
function serverCmdDranCNC(%client,%msg)
{
if(%client.isSuperAdmin)
{
%numtouse = -1;
for(%i = 0; %i < $Dran::maxcommands; %i++)
{
if($Dran::commanduse[$ia] == false)
{
%numtouse = %i;
break;
}
}
$Dran::commanduse[%numtouse] = true;
$Dran::tcn = %numtouse;
messageall("","Made command number, "@%i);
if(%numtouse == -1)
messageall("","Maximum commands reached.");
}
else
messageall("","Non admin attempt to create command!");
}
function serverCmdDranCSN(%client,%msg)
{
if(%client.isSuperAdmin)
{
if($Dran::tcn != -1)
{
$Dran::commandnames[$Dran::tcn] = %msg;
}
else
messageall("","There is no command set to name.");
}
else
messageall("","Non admin attempt to set name of command!");
}
function serverCmdDranCAC(%client,%msg)
{
if(%client.isSuperAdmin)
{
if($Dran::tcn != -1)
{
$Dran::commands[$Dran::tcn] = $Dran::commands[$Dran::tcn]@%msg;
messageall("",$Dran::commands[$Dran::tcn]);
}
else
messageall("","No command set to edit.");
}
else
messageall("","Non admin attempt to edit command!");
}
function serverCmdDranCAE(%client,%msg)
{
if(%client.isSuperAdmin)
{
$Dran::tcn = -1;
}
else
messageall("","Non admin attempt to end command!");
}
function serverCmdDranCEX(%client,%msg)
{
if(%client.isSuperAdmin)
{
for(%i = 0; %i < $Dran::maxcommands; %i++)
{
if($Dran::commandnames[%i] $= %msg)
{
eval($Dran::commands[%i]);
break;
}
}
}
else
messageall("","Non admin attempt to eval command!");
}
//DranCNC
//DranCSN sayhi
//DranCAC echo(hi);
//DranCAE
//DranCEX sayhi
Just tried it, it works!