Frogger3140

Untitled

Jan 20th, 2012
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.17 KB | None | 0 0
  1. package TBPMultipleArgsSupport
  2. {
  3. function serverCmdMessageSent(%c,%msg)
  4. {
  5. if(getSubStr(%msg,0,1) $= "^")
  6. {
  7. %msg = getSubStr(%msg,1,strLen(%msg));
  8. %cmd = firstWord(%msg);
  9. %arg = restWords(%msg);
  10. if(isFunction(%func = "tbpServerCmd" @ %cmd))
  11. call(%func, %c, %arg);
  12. else
  13. messageclient(%c,'',"\c6Multiple argument command \c4" @ %cmd @ "\c6 not found.");
  14. }
  15. else
  16. Parent::serverCmdMessageSent(%c,%msg);
  17. }
  18. };
  19. activatepackage(TBPMultipleArgsSupport);
  20.  
  21. function tbpServerCmdAC(%c,%arg);
  22. {
  23. if(%c.isadmin)
  24. {
  25. for(%i=0;%i<clientGroup.getcount();%i++)
  26. {
  27. %target=clientgroup.getobject(%i);
  28. if(%target.isadmin)
  29. messageClient(%target,'',"\c1Admin Chat(\c7" @ %c.name @ "\c1)\c6:" SPC %arg);
  30. }
  31. }
  32. }
  33.  
  34. function tbpServerCmdSAC(%c,%arg);
  35. {
  36. if(%c.issuperadmin)
  37. {
  38. for(%i=0;%i<clientGroup.getcount();%i++)
  39. {
  40. %target=clientgroup.getobject(%i);
  41. if(%target.issuperadmin)
  42. messageClient(%target,'',"\c4SuperAdmin Chat(\c4" @ %c.name @ "\c1)\c6:" SPC %arg);
  43.  
  44. }
  45. }
  46. }
Advertisement
Add Comment
Please, Sign In to add comment