Make sure when you pass the argument of position that It’s in an array not an object! I think lua gets the position for objects differently than JS. (I could be wrong)

Need to pass the object like this: [0,0,0]
I think lua does it like this {x:0,y:0,z:0}? Or something like that… Try to log what the cords are in the server and check if they are the same on the client logs. If they are not the cords being sent are not in array format!

If you want to place a flare do this

emitNet('roadflare:Server:Place', [x,y,z]);

Pickup

emitNet('roadflare:Server:Pickup', [x,y,z]);

PS: Make sure you turn off standalone inside client.js! (Disable the default keybind)

There are no checks inside the two hooks. Make sure you check if the player is inside a car or holding a flare. The player should be holding a flare to drop (Nothing to pick up), and out side of a car!


For the ‘then’ problem I’m not sure what you are doing there… Looks like you are using lua inside a JS function? Javascript syntax is below, there is no thens!

function name(args) {
    return something;
}