Zaloguj się by uzyskać pełen dostęp. Nie masz jeszcze konta? Założ je już teraz w kilka sekund.

Wysłany: 2011-05-15, 20:44


Gratka







Wiek: 29
Na forum: 5608 dni
Posty: 1
Nick w MP: Grzesiekxxx



Respekt: 50

Zrobi?em skrypt na suszark? i jak w??czam go na serwerze to nie dzia??.

local x,y = guiGetScreenSize()
pr = guiCreateLabel(0.3219,0.8281,0.5164,0.0869,"(brak celu) : 0 km/h",true)
guiLabelSetColor(pr,255,255,255)
guiLabelSetVerticalAlign(pr,"top")
guiLabelSetHorizontalAlign(pr,"left",false)
guiSetFont(pr,"sa-header")
guiSetVisible(pr,false)

function vehicleLabel2(target)
for k,v in pairs(getElementsByType("player")) do
local x,y,z = getElementPosition(v)
local X1,Y1 = getScreenFromWorldPosition(x,y,z)
if X1 and Y1 then
local px,py,pz=getElementPosition(getLocalPlayer())
local dystans=getDistanceBetweenPoints3D(x,y,z,px,py,pz)
local car = getPedOccupiedVehicle( v )
if car then
local speed = math.floor(getDistanceBetweenPoints3D(0,0,0,getElementVelocity(car)) * 100 * 1.61)
if speed then
if v ~= getLocalPlayer() then
if getVehicleController(car) == v then
if dystans < 45 then
if ( target ) then
local cx,cy,cz = getCameraMatrix()
local px,py,pz = getElementPosition(v)
if isLineOfSightClear(cx,cy,cz,px,py,pz,true,false,false,true,false,false,false,getPedOccupiedVehicle(getLocalPlayer())) then
if getPlayerTeam(getLocalPlayer()) == getTeamFromName("Policja") then
guiSetText(pr,getPlayerName(getVehicleController(car)).." : "..speed.." km/h")
end
end
end
end
end
end
end
end
end
end
end
addEventHandler("onClientPlayerTarget",getRootElement(),vehicleLabel2)

function pokaz()
if getPlayerTeam(getLocalPlayer()) == getTeamFromName("Policja") then
guiSetVisible(pr,true)
end
end
addEventHandler("onClientRender", getRootElement(), pokaz)


Je?eli jest gdzie? b?ad prosz? o powiedzenie.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2011-05-15, 21:58


fck.best







Wiek: 34
Na forum: 5759 dni
Posty: 3
Nick w MP: player



Respekt: 33,5

Ostrzeżeń: 100%
Napisz na GG: 33148s02 s=9.

Postaw piwo autorowi tego posta
 

 
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA » Suszarka Ten temat jest zablokowany bez możliwości zmiany postów lub pisania odpowiedzi

Nie możesz pisać nowych tematów
Nie możesz odpowiadać w tematach
Nie możesz zmieniać swoich postów
Nie możesz usuwać swoich postów
Nie możesz głosować w ankietach
Dodaj temat do Ulubionych
Wersja do druku