Witam mam taka suszare :
Kod:
[code]
local resourceRoot = getResourceRootElement(getThisResource())
local screenWidth, screenHeight = guiGetScreenSize ()
vehicle=nil
najwyzsza=0
dop="n/a"
rejstrator=false
moznamierzyc=true
function seter()
moznamierzyc=true
tekst="Oczekuje na pomiar..."
end
function isPlayerInTeam( thePlayer, teamName )
local pTeam = getPlayerTeam( thePlayer )
local fTeam = getTeamFromName( teamName )
if ( pTeam ) and ( fTeam ) then
if ( pTeam == fTeam ) then
return true
end
end
end
addEventHandler("onClientResourceStart",resourceRoot,
function ()
txd = engineLoadTXD ( "files/tec9.txd" )
engineImportTXD ( txd, 372 )
dff = engineLoadDFF ( "files/tec9.dff", 372 )
engineReplaceModel ( dff, 372 )
end)
function targetingActivated ( target )
local wep=getPedWeapon(getLocalPlayer())
if wep==32 then
if isPlayerInTeam( getLocalPlayer(), "SAPD" ) then
if getPedControlState ( getLocalPlayer(), "aim_weapon" ) then
if isPedDucked ( getLocalPlayer() ) then
sx, sy, sz = getElementVelocity ( getLocalPlayer() )
if math.floor((sx^2 + sy^2 + sz^2)^(0.5) * 180)<3 then
if target then
if getElementType(target)=="vehicle" then
if vehicle~=target then najwyzsza=0 end
vehicle=target
rejstrator=true
end
end
end
end
end
end
end
end
addEventHandler ( "onClientPlayerTarget", getRootElement... |