Search the Community
Showing results for tags 'projectiles'.
-
Hello there, I am a total noob in scripting, but I thought I'd give it a try for the sake of learning new things. What I am trying to accomplish with this script is disabling the "standard" rustler guns (this works thanks to an example script of the wiki.) and make it fire "custom" projectiles when the player presses the left mouse button. For now I just want to check if the script recognizes a player inside a rustler pressing left mouse button (hence the outputChatBox) However, when I am inside a rustler and use the left mouse button to fire nothing pops up in the chatbox (luckily, as intended, the rustler doesn't fire its guns) What am I doing wrong? I'm sure I made some kind of noob mistake but hey, I am still learning function disableFireForRustler ( theVehicle, seat ) if ( getElementModel ( theVehicle ) == 476 ) then toggleControl ( "vehicle_secondary_fire", false ) else toggleControl ( "vehicle_secondary_fire", true ) end addEventHandler ( "onClientPlayerVehicleEnter", getLocalPlayer(), disableFireForRustler ) function addTracer (mouse1, press) if (press) then outputChatBox ("guns fired") end addEventHandler("onClientKey", root, addTracer)