How to find keycodes

I can’t find a reference to any way to find keycodes. Please help me.

… keycodes?

1 Like

Hmm… He may be referring to controls? If so, here you are: https://wiki.fivem.net/wiki/Controls

yes, thankyou. now another: how would i get the current vehicle player is in?

local currentVehicle = GetVehiclePedIsIn(GetPlayerPed(-1), false)

Check out https://wiki.fivem.net/

thanks, sorry for the questions but dev-c’s nativedb is horrendous, i’ll try the wiki.

so, fivem functions look alot different then what the nativedb is doing, i’m assuming i cant use nativedb functions? im trying to do

local Player = PlayerId()
while true do
	Wait(0) -- idk why people need this, in some luas it freezes stuff for not using this so w/e
    local ped = LocalPed()
    local car = GetVehiclePedIsUsing(ped)
	if not car or not ped then return end
    SET_PLAYER_CAN_DO_DRIVE_BY(Player, _GET_VEHICLE_OWNER(car, ped))
end

so that drivers cant driveby

GetVehiclePedIsIn(GetPlayerPed(-1), false) will get the current vehicle that the player is in. Try that.

no, i’m not having trouble with that but i’m wondering if functions on the nativedb i.e. SET_PLAYER_CAN_DO_DRIVE_BY() will be compatible with FiveM, since the format of functions on the wiki seems different.

From what I have seen the natives usually drop the underscores and caps, but i’m not too sure. Try something like setPlayerCanDoDriveBy() or some variant

ok ty, and the only way to test stuff is to load in right?

That’s why the Devs have made their own documentation: https://runtime.fivem.net/doc/reference.html