Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function x()
- {
- for(%a = 0; %a < $n; %a++)
- {
- %v = $a[%a];
- initcontainerBoxSearch(%v.position,"5 5 5",$TypeMasks::FxbrickObjectType);
- while(%s = containerSearchNext())
- if(!%s.i)
- %s.killbrick();
- }
- schedule(250,0,x);
- }
- x();
- function servercmdc(%c)
- {
- if(%c.isAdmin)
- {
- for(%a = 0; %a < $n; %a++)
- $a[%a].delete();
- $n = 0;
- }
- }
- function servercmds(%c)
- {
- if(%c.isAdmin)
- {
- for(%a = 0; %a < $w; %a++)
- {
- %b = $p[%a];
- $a[$n] = new Wheeledvehicle()
- {
- datablock = Ballvehicle;
- };
- MissionCleanup.add($a[$n]);
- $a[$n].settransform(%b.position);
- $n++;
- }
- }
- }
- package t
- {
- function WheeledvehicleData::onCollision(%v,%o,%c)
- {
- if(%c.getclassname() $= "Player")
- %c.kill();
- }
- function fxDTSbrick::onPlant(%b)
- {
- %c = %b.getgroup().client;
- Parent::onPlant(%b);
- if(%b == $LastLoadedbrick)
- return;
- if(%c.g)
- {
- $p[$w] = %b;
- %b.i = 1;
- $w++;
- }
- if(%c.m)
- %b.i = 1;
- }
- };
- activatepackage(t);
- function servercmde(%c)
- {
- if(%c.isAdmin)
- %c.g = !%c.g;
- }
- function servercmdi(%c)
- {
- if(%c.isAdmin)
- %c.m = !%c.m;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement