Jump to content

NeXuS™

Retired Staff
  • Posts

    1,134
  • Joined

  • Last visited

  • Days Won

    37

Everything posted by NeXuS™

  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)
  15. This post was created back in 2018, why was this bumped? Do you still require help @Notorious^?
  16. Because you are getting the vehicle's speed at the resource startup. You'll have to use a timer to check more than once.
  17. There is probably a cancelEvent in the gamemode for debugscript 3. We also dont provide help for downloaded gamemodes.
  18. You can cancelEvent() the pickup with onPlayerPickupHit, then create your own system for respawning and managing pickups.
  19. If it uses downloadFile, you can use onClientFileDownloadComplete.
  20. Easy way would be using two objects. moveObject and setCameraMatrix with the object's position.
  21. Any error in the debugscript?
  22. @killingyasoon You'll have to add an event to remove the eventhandler when the player logins.
  23. 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.
  24. What do you mean by "for i = 10,1"?
×
×
  • Create New...