Zaloguj się by uzyskać pełen dostęp. Nie masz jeszcze konta? Założ je już teraz w kilka sekund.
GTAONLINE.PL
Tematy otagowane jako: predkosc
1. Predkosc w suszarce
Jak zrobi? w tym kodzie tak, ?eby pokazywa?o maksymalnie 1 wiadomo?? i a nie 10 jak kto? przekroczy pr?dko??? Bo dodaje im x10 kasy

kod
[lua]
--[[ Pobieranie predkosci ]]--
-- #prorok

function isPedAiming ( thePedToCheck )
if getElementData(localPlayer,"player:duty") and getElementData(localPlayer,"player:duty") == "SAPD" or getElementData(localPlayer,"player:duty") == "SMSA" then
else cancelEvent() end
if isElement(thePedToCheck) then
if getElementType(thePedToCheck) == "player" or getElementType(thePedToCheck) == "ped" then
if getPedTask(thePedToCheck, "secondary", 0) == "TASK_SIMPLE_USE_GUN" then
return true
end
end
end
return false
end

function blokujStrzal()
if getPedWeapon(localPlayer) == 22 then
toggleControl("fire",false)
else
toggleControl("fire",true)
end
end

addEventHandler("onClientRender",root,blokujStrzal)


function pobierzPredkosc ( cel )
if getElementData(localPlayer,"player:duty") and getElementData(localPlayer,"player:duty") == "SAPD" or getElementData(localPlayer,"player:duty") == "SMSA" then
else return end
if ( cel ) then
if isPedAiming(source) then
local weapon = getPedWeapon ( source )
if weapon == 22 then
local predkosc = math.floor(getDistanceBetweenPoints3D(0,0,0,getElementVelocity(cel)) * 100 * 1.61)
if predkosc >=...
2. predkosc pojazdu
Siema, mam serwer na OGRPG i chce ustawi? vmax samochod?w, jest gdzies taka mo?liwo?? bo szukam i nie moge znale??
3. predkosc
Witajcie,
chcia?em zrobi? licznik auta, ale zamiast np. 120 km/h wy?wietla 120.4595495.
Jak to naprawi??

function velocity_render()
local sWidthsHeight guiGetScreenSize()
local auto getPedOccupiedVehicle(localPlayer)
if 
auto then
local speedx
speedyspeedz getElementVelocity(auto)
actualspeed = (speedx^speedy^speedz^2)^(0.5)
kmh actualspeed*180
        dxDrawText
(kmh.." km/h"sWidth*0.797sHeight*0.859sWidth*0.993sHeight*0.917tocolor(000255), 3.00"default-bold""left""top"falsefalsetruefalsefalse)
        
dxDrawText(kmh.." km/h"sWidth*0.796sHeight*0.858sWidth*0.992sHeight*0.916tocolor(136125117255), 3.00"default-bold""left""top"falsefalsetruefalsefalse)
end
end
addEventHandler
("onClientRender"rootvelocity_render)


Wygl?da to tak: