61
Modification Help / Checking if a function exists
« on: March 27, 2014, 03:04:31 PM »
How do I check from the server side if a function exists.
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
function fxDTSBrick::checkVip(%client)
{
echo("Event Called");
if(findclientbyname(%client).isVip)
{
echo("Is a VIP");
fxDTSBrick::onVipTrue();
}
}
fxDTSBrick::checkVip();
in the console I see both "Event Called" and "Is a VIP".// Events
registerOutputEvent(fxDTSBrick, "checkVip");
registerInputEvent(fxDtsBrick,"onVipTrue","Self fxDtsBrick\tPlayer Player\tClient GameConnection\tMinigame Minigame");
fxDTSBrick::checkVip(%client)
{
if(%client.isVip)
{
fxDTSBrick::onVipTrue();
}
}
fxDTSBrick::onVipTrue(%brick)
{
$inputTarget_Self = %brick;
$inputTarget_Player = %client.player;
$inputTarget_Client = %client;
$inputTarget_Minigame = getMinigameFromObject(%client);
%brick.processInputEvent("onVipTrue",%client);
}
function ServerCmdwriteToFile(%filename, %content)
{
%outFileHandle = new FileObject() ;
%outFileHandle.openForWrite(%filename) ;
%outFileHandle.writeLine(%content) ;
%outFileHandle.close() ;
%outFileHandle.delete() ;
}
My question is that if I the client side I call commandToServer("ServerCmdwriteToFile","my doc.txt","I can speak");
will that write the file on the Clients host computer or the Servers host computer?start BlocklandLauncher.exe -profilePath .