hi ,i want to explainme how i am use the bindKey function in server-side
this is my script ,i want to create a vehicle when i press the key ,thanks
function cas(player,key)
x, y, z = getElementPosition(player)
cs = createVehicle (411 ,x+5 ,y, z)
css = createObject (359, x, y, z)
css2 = createObject (359, x, y, z)
x, y, z = getElementRotation ( cs )
attachElements ( css, cs, 1, 2, 0.20, 0, 0, 90)
attachElements ( css2, cs, -1, 2, 0.20, 0, 0, 90)
end
addEventHandler("onResourceStart",getRootElement(),function ()
bindKey(player,"2","down",cas)
end)