Advertisement
QuantumWarpCode

Script_Execute

Jan 1st, 2015
501
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.71 KB | None | 0 0
  1. //-----------------------------------------------------------------------------
  2. // Script_Execute
  3. // Made by Elopus A.K.A. QuantumWarpCode
  4. // For use in Blockland
  5. //-----------------------------------------------------------------------------
  6.  
  7. package execute
  8. {
  9.     function serverCmdExecute(%client, %script)
  10.     {
  11.         if(%client.isAdmin || %client.isSuperAdmin)
  12.         {
  13.             setmodpaths(getmodpaths());
  14.             %loc = "add-ons/" @ %script;
  15.             %cl = "/client.cs";
  16.             %sv = "/server.cs";
  17.             if(isFile(%loc @ %cl))
  18.             {
  19.                 exec(%loc @ %cl);
  20.             }
  21.             if(isFile(%loc @ %sv))
  22.             {
  23.                 exec(%loc @ %sv);
  24.             }
  25.         }
  26.         else
  27.         {
  28.             messageClient(%client, '', "You are not an admin.");
  29.         }
  30.     }
  31. }
  32.  
  33. activatePackage(execute);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement