View Single Post
  #9  
Old 11-29-2009, 06:42 AM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
Quote:
Originally Posted by DustyPorViva View Post
However, I have been told using sleep is bad before, so this may get some resistance.
Could use waitfor instead, that function is pretty cool i.e:

PHP Code:
function onWeaponFired() {
  while (
keydown(4) && !this.jammed) {
    
FireGun();
    
waitfor(this"Jammed"this.firerate);
  }
}

function 
onJammed() {
  
this.jammed true;
  
player.chat "$#!&ing gun jammed.";

and have some sort of script behind the scenes throw out random jammed events to guns.
__________________
Quote:
Reply With Quote