Thread: Fire rate
View Single Post
  #3  
Old 12-31-2005, 05:29 AM
Kronan Kronan is offline
yo
Kronan's Avatar
Join Date: May 2001
Location: Florida, USA
Posts: 682
Kronan is on a distinguished road
Send a message via ICQ to Kronan Send a message via AIM to Kronan Send a message via Yahoo to Kronan
Here is a small example:


NPC Code:
//#CLIENTSIDE
function onCreated() {
this.fired = true;
}
function onWeaponFired() {
if (this.fired) {
// your stuff can go here
this.fired = false;
setTimer(5);
}
else
{
player.chat = "You must wait 5 seconds before firing again!";
}
}
function onTimeout() {
if (this.fired == false) {
this.fired = true;
setTimer(5);
}
}

__________________
Reply With Quote