arkadaşlar LUA'da ilk scriptimi yazmış bulunmaktayım

,script server-side'dır.
mHiz.lua:
function RandL(source,key,keyState)
if(getPedOccupiedVehicle(source) and getPedOccupiedVehicleSeat(source)==0) then
local x,y,z = getElementVelocity( getPedOccupiedVehicle(source) )
setElementVelocity( getPedOccupiedVehicle(source),x+x,y+y,z)
end
end
function CAndLC(source,key,keyState)
if(getPedOccupiedVehicle(source) and getPedOccupiedVehicleSeat(source)==0) then
local x,y,z = getElementVelocity( getPedOccupiedVehicle(source) )
setElementVelocity( getPedOccupiedVehicle(source),x-x,y-y,z)
end
end
function connectBind()
bindKey(source,"ralt","down",RandL)
bindKey(source,"lalt","down",RandL)
bindKey(source,"lctrl","down",CAndLC)
bindKey(source,"rctrl","down",CAndLC)
end
addEventHandler ( "onPlayerJoin", getRootElement(), connectBind )meta.xml
<meta>
<info author="LaserLaser" name="Multi Hiz" version="1" type="script"/>
<script src="mHiz.lua" type="server"/>
</meta>100% çalışır denenmiştir.
NOT:
Sağ alt veya sol alt tuşları ile hızlanabilir,
Sağ ctrl veya sol ctrl tuşları ile hemen durabilirsiniz.