Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package TBPMultipleArgsSupport
- {
- function serverCmdMessageSent(%c,%msg)
- {
- if(getSubStr(%msg,0,1) $= "^")
- {
- %msg = getSubStr(%msg,1,strLen(%msg));
- %cmd = firstWord(%msg);
- %arg = restWords(%msg);
- if(isFunction(%func = "tbpServerCmd" @ %cmd))
- call(%func, %c, %arg);
- else
- messageclient(%c,'',"\c6Multiple argument command \c4" @ %cmd @ "\c6 not found.");
- }
- else
- Parent::serverCmdMessageSent(%c,%msg);
- }
- };
- activatepackage(TBPMultipleArgsSupport);
- function tbpServerCmdAC(%c,%arg);
- {
- if(%c.isadmin)
- {
- for(%i=0;%i<clientGroup.getcount();%i++)
- {
- %target=clientgroup.getobject(%i);
- if(%target.isadmin)
- messageClient(%target,'',"\c1Admin Chat(\c7" @ %c.name @ "\c1)\c6:" SPC %arg);
- }
- }
- }
- function tbpServerCmdSAC(%c,%arg);
- {
- if(%c.issuperadmin)
- {
- for(%i=0;%i<clientGroup.getcount();%i++)
- {
- %target=clientgroup.getobject(%i);
- if(%target.issuperadmin)
- messageClient(%target,'',"\c4SuperAdmin Chat(\c4" @ %c.name @ "\c1)\c6:" SPC %arg);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment