Witam, nie dzia?a rejestrator dla sapd, powinien on si? pojawia? i pokazywa? pr?dko?? pojazdu z przodu itp niestety tak nie jest.
B?ed?w brak
[lua]local sx,sy=guiGetScreenSize()
local wlaczony=false
local isPolicjant=(
function(plr)
if getElementData(plr, "player:duty") == "SAPD" or getElementData (plr, "player:duty") == "ITD" then
return true
end
return false
end
)
function findRotation( x1, y1, x2, y2 )
local t = -math.deg( math.atan2( x2 - x1, y2 - y1 ) )
return t < 0 and t + 360 or t
end
function getElementSpeed(theElement, unit)
assert(isElement(theElement), "Bad argument 1 @ getElementSpeed (element expected, got " .. type(theElement) .. ")")
assert(getElementType(theElement) == "player" or getElementType(theElement) == "ped" or getElementType(theElement) == "object" or getElementType(theElement) == "vehicle", "Invalid element type @ getElementSpeed (player/ped/object/vehicle expected, got " .. getElementType(theElement) .. ")")
assert((unit == nil or type(unit) == "string" or type(unit) == "number") and (unit == nil or (tonumber(unit) and (tonumber(unit) == 0 or tonumber(unit) == 1 or tonumber(unit) == 2)) or unit == "m/s" or unit == "km/h" or unit == "mph"), "Bad argument 2 @ getElementSpeed (invalid speed unit)")
unit = unit == n... |