View Single Post
  #7  
Old 05-03-2008, 05:02 PM
Crow Crow is offline
ǝɔɐɹq ʎןɹnɔ
Crow's Avatar
Join Date: Dec 2006
Location: Germany
Posts: 5,153
Crow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond repute
Quote:
Originally Posted by cbkbud View Post
PHP Code:
//#CLIENTSIDE
function onKeyPressedcodekey )
{
  if ( 
key == "d" )
  {
    ( @ 
player.weapon ).trigger"onWeaponFired""" );
  }

Should actually look like this:

PHP Code:
//#CLIENTSIDE
function onKeyPressed(codekey) {
  if (
key == "d") {
    
findWeapon(player.weapon.name).trigger("WeaponFired"nil);
  }

Well, some things are preference, but trigger("Event", nil) triggers "onEvent", not "Event", and I had some problem triggering weapons when not using findWeapon() before, might have been me back then though.
Reply With Quote