Jump to content

stop driveby


Sami_~>

Recommended Posts

  • Moderators

Only ADD, with the code you already used.

This code will replace the original setPedDoingGangDriveby function clientside and use it serverside instead. It will fix your de-synchronization. Remember, you still need to use setPedDoingGangDriveby in your original code.

 

 

clientside

function setPedDoingGangDriveby (ped, state )
	triggerServerEvent("setPedDoingGangDriveby", resourceRoot, ped, state )
end

 

 

serverside

addEvent("setPedDoingGangDriveby", true)
addEventHandler("setPedDoingGangDriveby", resourceRoot,
function (ped, state )
	if isElement(ped) then
		setPedDoingGangDriveby(ped, state )  
	end
end, false)

 

Edited by IIYAMA
  • Thanks 1
Link to comment
15 hours ago, IIYAMA said:

Only ADD, with the code you already used.

Can u fix this :

i want to disable rino fire

    local blockedVehicles = {[432] = true}

    function blockEnterOnBlockedVehicles(player, seat, jacked)
    local model = getElementModel(source)
    if isElement(source) and getElementType(source) == "vehicle" and (model and blockedVehicles[model]) then
    if isElement(player) and getElementType(player) == "player" and seat == 0 then
                                    toggleControl ( "vehicle_fire", false ) (true, "blockedvehicle")
    end
    end
    end
    addEventHandler("onVehicleStartEnter", getRootElement(), blockEnterOnBlockedVehicles)

 

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