Jump to content

[Help]Simple Script


Brad96

Recommended Posts

I want a command to start shooting and another not shoot, and it kills me every time I have to click, and lines Explain to me please .. thanks: D

  
  
function misil () 
vehicle = getPedOccupiedVehicle ( localPlayer ) 
x, y, z = getElementPosition ( vehicle ) 
Pro = createProjectile( localPlayer,19,x,y,z+2,200)  
end 
 addEventHandler ( "onVehicleEnter", getRootElement(), misil) 
  
function bindMisil() 
bindKey ( "mouse1", "down", misil ) 
end 
addEventHandler ("onClientResourceStart" , getRootElement (), bindMisil ) 
  
  

Link to comment
function misil () 
local vehicle = getPedOccupiedVehicle ( getLocalPlayer() ) 
local x, y, z = getElementPosition ( vehicle ) 
createProjectile( getLocalPlayer(),19,x, y, z+2,200)  
end 
bindKey ( "mouse1", "down", misil ) 

"onVehicleEnter" event is server-side only and createProjectile is client-side only.

Edited by Guest
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...