Advertisement
Guest User

Untitled

a guest
Jan 24th, 2011
192
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.17 KB | None | 0 0
  1. function x()
  2. {
  3.     for(%a = 0; %a < $n; %a++)
  4.     {
  5.         %v = $a[%a];
  6.         initcontainerBoxSearch(%v.position,"5 5 5",$TypeMasks::FxbrickObjectType);
  7.        
  8.         while(%s = containerSearchNext())
  9.             if(!%s.i)
  10.                 %s.killbrick();
  11.     }
  12.    
  13.     schedule(250,0,x);
  14. }
  15.  
  16. x();
  17.  
  18. function servercmdc(%c)
  19. {
  20.     if(%c.isAdmin)
  21.     {
  22.         for(%a = 0; %a < $n; %a++)
  23.             $a[%a].delete();
  24.        
  25.         $n = 0;
  26.     }
  27. }
  28.  
  29. function servercmds(%c)
  30. {
  31.     if(%c.isAdmin)
  32.     {
  33.         for(%a = 0; %a < $w; %a++)
  34.         {
  35.             %b     = $p[%a];
  36.             $a[$n] = new Wheeledvehicle()
  37.             {
  38.                 datablock = Ballvehicle;
  39.             };
  40.            
  41.             MissionCleanup.add($a[$n]);
  42.             $a[$n].settransform(%b.position);
  43.            
  44.             $n++;
  45.         }
  46.     }
  47. }
  48.  
  49. package t
  50. {
  51.     function WheeledvehicleData::onCollision(%v,%o,%c)
  52.     {
  53.         if(%c.getclassname() $= "Player")
  54.             %c.kill();
  55.     }
  56.    
  57.     function fxDTSbrick::onPlant(%b)
  58.     {
  59.         %c = %b.getgroup().client;
  60.         Parent::onPlant(%b);
  61.        
  62.         if(%b == $LastLoadedbrick)
  63.             return;
  64.        
  65.         if(%c.g)
  66.         {
  67.             $p[$w] = %b;
  68.             %b.i   = 1;
  69.             $w++;
  70.         }
  71.        
  72.         if(%c.m)
  73.             %b.i = 1;
  74.     }
  75. };
  76. activatepackage(t);
  77.  
  78. function servercmde(%c)
  79. {
  80.     if(%c.isAdmin)
  81.         %c.g = !%c.g;
  82. }
  83.  
  84. function servercmdi(%c)
  85. {
  86.     if(%c.isAdmin)
  87.         %c.m = !%c.m;
  88. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement