Call Native functions


#1

Hello! Does anyone know how to call native functions like GRAPHICS::DRAW_MARKER in lua?


#2

read on the wiki, natives are slightly different on here than in gta 5


#3

I read the wiki and there is no draw_marker function and thats why I ask how to call native functions


#4

There is a lua file called natives.lua that is located in your client folder: /citizen/scripting/lua/natives.lua

It contains all the available natives there. And DrawMarker() is also there.


#5

Thank you very much

Edit: Seems like the function is not working for me
DrawMarker(2, 1194.38f, -3253.87f, 7.09519f, 0.0f, 0.0f, 0.0f, 180.0f, 0.0f, 0.0f, 0.75f, 0.75f, 0.75f, 204, 204, 0, 100, false, true, 2, false, false, false, false)

Am I doing something wrong?


#6

Try it this way: http://pastebin.com/raw/vWyKM7U0

I removed all the ‘f’ and it seems that this function should be called each frame, so I put it in the separate thread with zero latency.


#7

Thank you, but it is still not showing anything…


#8

Works fine for me http://qs.lc/nef21

Make sure that this script is running on client side.


#9

Alright I wanted to trigger this via a /command but seems like there was the problem…
Thank you very much