Quote:
Originally Posted by cbkbud
PHP Code:
//#CLIENTSIDE
function onKeyPressed( code, key )
{
if ( key == "d" )
{
( @ player.weapon ).trigger( "onWeaponFired", "" );
}
}
|
Should actually look like this:
PHP Code:
//#CLIENTSIDE
function onKeyPressed(code, key) {
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.