Blockland Forums > Modification Help
EVAL event
<< < (2/6) > >>
Destiny/Zack0Wack0:
It executes a script/snippet of code as if you were typing it into the console.
Wesley Williams:
Ah I see... That's a string? Goodness me I need to review scripting again.
Chrono:
%client also doesn't exist. %this does though.
Munkey:
ahh true. Here is it fixed with %this not %client


--- Code: ---registerOutputEvent(GameConnection, "doEval", "string 16 140");

function GameConnection::DoEval(%this,%eval)
{
if(%this.isSuperAdmin)
{
%str = getSubStr(%eval);
eval(%str);
}
else
{
messageAll('',"\c2" @ %this.name @ "\c3 tried to use eval through the doEval event");
}
}

--- End code ---
Wesley Williams:
How does it know that %this its the client and %eval is the eval event our whatever? I don't understand how days is signed to these variables. Or is %this designated as the client by default?
Navigation
Message Index
Next page
Previous page

Go to full version