View Single Post
  #3  
Old 08-04-2011, 11:18 PM
callimuc callimuc is offline
callimuc's Avatar
Join Date: Nov 2010
Location: Germany
Posts: 1,015
callimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to behold
After using your method it didn“t work:

PHP Code:
//#CLIENTSIDE
function onKeypressed(){
  if (
keydown2(keycode(d),true) && this.key==0){
    
this.key=1;
    
callweapon selectedweapon,"weaponfired";
    while (
keydown2(keycode(d),true))sleep .05;
    
this.key=0;
  }
}
function 
onWeaponFired() {
  
player.chat "test";

Also a lot parts where in GS1 ;I
But the script got me into some ideas so I came up to this:

PHP Code:
//#CLIENTSIDE
function onKeypressed(){
  if (
keydown2(keycode(d),true) && this.key==0){
    
this.key=1;
    
findweapon(name).onWeaponFired();
    while (
keydown2(keycode(d),true)) sleep(.05);
    
this.key=0;
  }
}

public function 
onWeaponFired() {
  
player.chat "test";

This also works. But is it a good way of using it like this?
__________________
MEEP!
Reply With Quote