Jump to content

NeXuS™

Retired Staff
  • Posts

    1,134
  • Joined

  • Last visited

  • Days Won

    37

Posts posted by NeXuS™

  1. I'm not sure if it possible to disable that animation, maybe you could try to cancel the shooting itself and create your own projectile for weapons, essentially, creating your own weapon handling system. Are you 100% sure the camera shake is because of this animation?

  2. triggerServerEvent("getHere", localPlayer, showingPlayer)
    function getHere(thePlayer, target) 	if (exports.las_global:isPlayerSeged(thePlayer)) then

    You are checking the target player's admin level as I explained above and I also said that debugging isn't just /debugscript 3.

     

  3. So if I understand right, showingPlayer is set on server-side as a variable, but still, on your trigger you are checking the targetted player's admin level. Debugging goes a long way, not just /debugscript 3.

  4. Heya.

    Your arg "showingPlayer" is existing on the client-side. Right now you are triggering the server-sided event with the showingPlayer argument which is "thePlayer" on server-side. You will have to pass localPlayer and showingPlayer both, which will be thePlayer and target on server-side if I'm looking at it correctly.

    For future reference, please include errors, and also read our debugging tutorial please.

  5. You have to check if the player is in a vehicle, you can use getPedOccupiedVehicle for this.

    If he is in a vehicle, you set the vehicle's position instead of the player, which is returned by the function mentioned above.

    Also, your function will throw errors, as "thePlayer" value defined in your function is actually the command name that was executed, in this case "gotosf", check addCommandHandler for more info on this topic.

  6. Seems like restarting the resource causes the element datas to break.
    Adding a check on the side fixes the issue, but creates another issue, you gotta reenter your car after each resource restart.

    Also, I'm not sure how your code ran, as there is no "distance" value defined in your snippet. If it's needed, readd it in the line please.

    addEventHandler ("onPlayerVehicleEnter", getRootElement(), function (theVehicle, seat, jacked)
    	if theVehicle and seat == 0 then
    		theVehicle:setData("lastPos", theVehicle:getPosition())
    	end
    end)
    
    setTimer(function()
    	for k, veh in ipairs(getElementsByType("vehicle")) do  
    		if veh then
    			local pos = veh:getPosition()
    			local vec = veh:getData("lastPos")
    			if pos and vec and getUserdataType(vec) == "vector3" then
    				local value = getDistanceBetweenPoints3D(vec:getX(), vec:getY(), vec:getZ(), pos:getX(), pos:getY(), pos:getZ())
    				if value then
    				end
    			end
    		end
    	end
    end, 2000, 0)

     

    • Like 1
  7. function DestinationB(hitPlayer)
    	if hitPlayer == localPlayer then
    		markerB = createMarker( -498.54946899414, 191.89947509766, 723.70001220703, "corona", 1, 0, 255, 255, 200, localPlayer )
    		blipB = createBlip( -498.54946899414, 191.89947509766, 723.70001220703, 0, 2.5, 0, 255, 255, 255, 0, 99999, localPlayer)
    		addEventHandler("onClientMarkerHit", markerB, DestinationC)
    	end
    end

    And you'll have to add this to all of your marker creations.

×
×
  • Create New...