Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- datablock ShapeBaseImageData(k : AdminWandImage)
- {
- showBricks = 0;
- colorShiftColor = "1 1 0 1";
- };
- function servercmdkillwand(%c)
- {
- if(isObject(%p = %c.player))
- %p.mountImage(k,0);
- }
- function k::onMount(%t,%o)
- {
- fixArmReady(%o);
- }
- function k::onPreFire(%t,%o)
- {
- WandImage.onPreFire(%o);
- }
- function k::onStopFire(%t,%o)
- {
- %o.playThread(2,root);
- }
- function k::onFire(%t,%o)
- {
- AdminWandImage::onFire(%t,%o);
- }
- function k::onHitObject(%t,%o,%s,%c,%p,%v)
- {
- if(%c.getClassName() $= "fxDTSBrick")
- {
- %c[0] = %c;
- %b[%c] = 1;
- %b = 1;
- for(%a = 0; %a != %b; %a++)
- {
- %c = %c[%a];
- if(getTrustLevel(%o,%c) < 2)
- {
- %o.client.centerPrint("You need full trust for that.",2);
- return;
- }
- if(%c.getColorFXID() != 1)
- %c.fakeKillBrick(0,9);
- for(%i = 0; %i < %c.getNumDownBricks(); %i++)
- {
- %d = %c.getDownBrick(%i);
- if(!%b[%d])
- {
- %b[%d] = 1;
- %c[%b] = %d;
- %b++;
- }
- }
- for(%i = 0; %i < %c.getNumUpBricks(); %i++)
- {
- %d = %c.getUpBrick(%i);
- if(!%b[%d])
- {
- %b[%d] = 1;
- %c[%b] = %d;
- %b++;
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement