Search the Community
Showing results for tags 'help.'.
-
Well I recently made a new script that gonna attach some weapon to a specific and i bounded this function to key and evrything was going fine the weapons ae attached to the car and its firing and alls good but the issue is when i try to shoot another player car or i try to damage a player , I cannot do well i think because that function is only called for the client when he press the bind and i was looking arround for something to let that fire dmg the others but i cant find in mta client function wiki that's why I'm seeking for help here local replacementGunKey = "vehicle_fire" function addt() bindKey ( replacementGunKey, "both", fireHydraGuns ) end addEventHandler ( "onClientResourceStart", root, addt) function fireHydraGuns ( key, keyState ) if ( keyState == "down" ) then if ( key == replacementGunKey ) and hydraGuns == true then toggleControl ( replacementGunKey, false ) setWeaponState(hydraGunL, "firing") setWeaponState(hydraGunR, "firing") fireWeapon(hydraGunL) fireWeapon(hydraGunR) setWeaponProperty(hydraGunL, "fire_rotation", 10, 4, 0) setWeaponProperty(hydraGunR, "fire_rotation", 10, 4, 0) end end if ( keyState == "up" ) then if ( key == replacementGunKey ) or hydraGuns == false then setWeaponState(hydraGunL, "ready") setWeaponState(hydraGunR, "ready") toggleControl ( replacementGunKey, true ) end end end
- 7 replies
-
- help.
- fireweapon
-
(and 1 more)
Tagged with: