Jump to content

NeXuS™

Retired Staff
  • Posts

    1,134
  • Joined

  • Last visited

  • Days Won

    37

NeXuS™ last won the day on June 20 2021

NeXuS™ had the most liked content!

About NeXuS™

  • Birthday December 20

Member Title

  • Retired Staff

Details

  • Gang
    None
  • Location
    Hungary
  • Occupation
    Programmer
  • Interests
    Motorbikes

Recent Profile Visitors

7,894 profile views

NeXuS™'s Achievements

Banger

Banger (36/54)

402

Reputation

  1. Please check the syntax for setElementInterior.
  2. I mean, it doesn't look like you have the right coordinates and maybe you should look into the setElementInterior function deeper.
  3. Do you mean disable it on your end, or server-wide?
  4. As I can see, you just kinda copy-pasted an old code, there is no trigger in this whole script tho. onClientPlayerWeaponFire should be used.
  5. 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?
  6. 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.
  7. That doesn't really add up. Can you try to print the xa, ya and za variables?
  8. 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.
  9. 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.
  10. Moved to correct section. Right now this script is using a fixed xyz, and not the player's current position. And I also don't understand why there is a new ped created whenever damage is taken.
  11. Heya, You'll just have to use a for loop like in your code above. Using getPlayerAccount and setAccountData should be enough, no need for those if branches inside your function.
  12. 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.
  13. Because onPlayerLogout is called after the logout was successful, at that point the user is in the "guest" account. Check the wiki page for more info, you need to use the first argument of the event which is the previous account the user was in before logging out.
  14. 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)
×
×
  • Create New...