I made this cog for a map i was making. It was supposed to be for a wepon dispenser. It works when i try the level by myself, but with others, it boots everyone out of the game. couls someone tell me what's wrong with it?
If you can help, thanks
[This message has been edited by SaberMaster (edited September 23, 2002).]
Code:
# Jedi Knight Cog Script
#
# Made for a gun dispenser
#
symbols
thing console desc=console
thing player local
flex delay=8.0 desc=delay
int firing=0 local
int dummy local
int amount=1
int bin=6
int ammo=30
int ammobin=12
sound on_snd=Activate04.wav local
sound pickupsnd=powerpu1.wav local
message activated
end
# ==========================================
code
activated:
player = GetSourceRef();
if(firing == 1) Return;
firing = 1;
dummy = playsoundthing(on_snd,console,1.0,-1,3.0,0x0);
PlaySoundThing(pickupsnd, console, 1.0, -1, -1, 0);
AddDynamicTint(player, 0.0, 0.0, 0.2);
jkPrintUNIString(player, bin);
ChangeInv(player,bin,amount);
ChangeInv(player, ammobin, ammo);
Sleep(delay);
firing = 0;
Return;
end
============================================If you can help, thanks
[This message has been edited by SaberMaster (edited September 23, 2002).]
![http://forums.massassi.net/html/wink.gif [http://forums.massassi.net/html/wink.gif]](http://forums.massassi.net/html/wink.gif)