Jump to content

[HELP] NO ERROR


bebo1king

Recommended Posts

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

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...