Blockland Forums > Modification Help
needing a script for something
Arcturus:
I was wondering about this:
I wanted to add a code that has an ifBlid function that would check for blids when a addon is being executed into the server, and if the blid of the person who has that addon matches the one in the list, the add-on is blocked from being executed.
I need this for a few reasons, so can anyone help with this? if so, thank you.
otto-san:
--- Quote from: Arcturus on March 28, 2011, 10:29:47 PM ---I was wondering about this:
I wanted to add a code that has an ifBlid function that would check for blids when a addon is being executed into the server, and if the blid of the person who has that addon matches the one in the list, the add-on is blocked from being executed.
I need this for a few reasons, so can anyone help with this? if so, thank you.
--- End quote ---
Eh. The idea isn't that great, but okay.
should be in coding help by the way
Something like this, using two files
server.cs or whatever you want it to be since you apparently want to execute midgame
--- Code: ---$SomeID = 1234;
for(%i = 0; %i < clientGroup.getCount(); %i++)
{
%b = clientGroup.getObject(%i);
if(%b.bl_id == $SomeID)
%count = 1;
break;
}
if(%count != 1)
exec("./somescript.cs");
--- End code ---
and somescript.cs would be in the same .zip with all the real code in it.
Don't use this directly, edit it as you need to and do what I said to do.
Someone may come in and have a better way for this.
soba:
People can always go into the code and get rid of it :/ unless you plan on making it a .dso or something
Kalphiter:
--- Quote from: soba on March 29, 2011, 12:03:46 AM ---People can always go into the code and get rid of it :/ unless you plan on making it a .dso or something
--- End quote ---
Which you can't, so you have two options:
1. don't hand it out
Destiny/Zack0Wack0:
This isn't allowed. Your add-on will be failed. If you don't want one person to use it, don't release it at all.