Mam ma?e pytanko jak zrobi? ?e jak pr?dko?? b?dzie wysza ni? np. 60 to Wykona si? co? co ja sobie ustawie
Kod na suszarke:
[lua]
local sw,sh = guiGetScreenSize()
function onSuszarka(target)
if target then
if getElementType(target) == "vehicle" then
vehicle = target
end
end
end
addEventHandler ("onClientPlayerTarget", getRootElement(), onSuszarka)
function wlaczLPM()
render = true
end
bindKey ("mouse1", "down", wlaczLPM)
function wylaczLPM()
render = false
end
bindKey ("mouse1", "up", wylaczLPM)
function dxDrawSuszarkaInfo()
if render then
if vehicle then
if isElement(vehicle) then
if getPedWeapon(localPlayer) == 22 then
local controller = getVehicleController(vehicle)
if controller then
--if controller ~= localPlayer then
if getElementType(controller) == "player" then
local x, y, z = getElementPosition(localPlayer)
local tx, ty, tz = getElementPosition(controller)
local dis = getDistanceBetweenPoints3D(x, y, z, tx, ty, tz)
local id = getElementData(vehicle, "car_id") or "brak"
local wl = getElementData(vehicle, "car_owner") or "brak"
... |