bebo1king Posted August 22, 2015 Share Posted August 22, 2015 i was trying to make Special car for Console group FULL CODES: Client function shootProjectile() local vehicle = getPedOccupiedVehicle(localPlayer) local id = getElementModel ( vehicle ) -- get the model ID of the vehicle local car = createBlipAttachedTo ( vehicle, 55 ) setBlipVisibleDistance (car, 220) setVehicleDamageProof ( vehicle, true ) setVehicleColor (vehicle,0,0,0) if ( getElementData ( vehicle, "VIPData" ) == true ) then if id == 579 then if(vehicle) then local x, y, z = getElementPosition(vehicle) createProjectile(vehicle, 19, x, y, z) createProjectile(vehicle, 19, x, y-1, z) createProjectile(vehicle, 19, x, y+1, z) createProjectile(vehicle, 19, x, y-2, z) createProjectile(vehicle, 19, x, y+2, z) createProjectile(vehicle, 19, x, y+3, z) createProjectile(vehicle, 19, x, y-3, z) createProjectile(vehicle, 19, x, y-4, z) createProjectile(vehicle, 19, x, y+4, z) end end end end bindKey("vehicle_fire", "down", shootProjectile) server : addEventHandler ( "onResourceStart", resourceRoot, function ( ) for _,players in ipairs ( getElementsByType ( "player" ) ) do if ( getPlayerAccount( players ) and not isGuestAccount( getPlayerAccount( players ) ) ) then if ( isObjectInACLGroup ( "user."..getAccountName ( getPlayerAccount ( players ) ), aclGetGroup ( "Console" ) ) ) then setElementData ( players, "VIPData", true ) end end end end ) addEventHandler ( "onPlayerLogin", root, function ( _,acc ) if ( isObjectInACLGroup ( "user."..getAccountName( acc ), aclGetGroup ( "Console" ) ) ) then setElementData ( source, "VIPData", true ) end end ) i am beginer Link to comment
bebo1king Posted August 22, 2015 Author Share Posted August 22, 2015 Change the Key name. change it to what? could u show me please Link to comment
Walid Posted August 22, 2015 Share Posted August 22, 2015 Check the key names on the wiki page . Example : mouse1 or space Link to comment
bebo1king Posted August 22, 2015 Author Share Posted August 22, 2015 The proplem i got is when i press the bindkey it shot the vehicle go black + not destroyed but it don't throw Projectile thats the proplem i got Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now