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

Wysłany: 2016-07-14, 15:04


flimbo123







Wiek: 33
Na forum: 5776 dni
Posty: 93
Nick w MP: Flimbo

Piwa: 190

Respekt: 60

local dxfont0_LCD-dxCreateFont(":zegary/LCD-L.ttf"61)
local dxfont1_LCD-dxCreateFont(":zegary/LCD-L.ttf"16)
local dxfont2_LCD-dxCreateFont(":zegary/LCD-L.ttf"10)
local screenWscreenH guiGetScreenSize()



local screenWscreenH guiGetScreenSize() 
function speed ( )
    addEventHandler "onClientRender"rootgetspeed )
end
addEventHandler ("onClientVehicleEnter"rootspeed)

function hideSpeed ( )
    removeEventHandler "onClientRender"rootgetspeed )
end
addEventHandler("onClientVehicleExit"roothideSpeed)

function hud ( )
    local v getPedOccupiedVehicle getLocalPlayer() )
    local przebieg string.format("%.1f",getElementData v,"przeb"))
    local x,y,getElementPositiongetLocalPlayer() )
    local location getZoneName xyztrue )
    local wacha string.format("%.1f",getElementData v,"fuel"))
        if isPedInVehicle (localPlayer) == false then return end
        sxsysz getElementVelocity (getPedOccupiedVehicle(localPlayer))
        kmhs math.floor(((sx^sy^sz^2)^(0.5))*180) --obliczamy pr?dko?? (m/180 1 km/h)
        dxDrawText("..tostring(kmhs).."screenW 0.4135screenH 0.6852screenW 0.5104screenH 0.7759tocolor(247920255), 1.00dxfont0_LCD-L"center""center"falsefalsefalsefalsefalse)
        dxDrawText("km/h"screenW 0.5297screenH 0.7620screenW 0.5604screenH 0.7880tocolor(255255255255), 1.00"default""center""bottom"falsefalsefalsefalsefalse)
        dxDrawText("..tostring(location).."screenW 0.4141screenH 0.7981screenW 0.5203screenH 0.8343tocolor(255255255255), 1.00dxfont1_LCD-L"center""center"falsefalsefalsefalsefalse)
        dxDrawText("..tostring(przebieg).."screenW 0.4349screenH 0.8907screenW 0.4953screenH 0.9269tocolor(247920255), 1.00dxfont1_LCD-L"center""center"falsefalsefalsefalsefalse)
        dxDrawText("..tostring(wacha).."screenW 0.4323screenH 0.8472screenW 0.5005screenH 0.8759tocolor(254254254255), 1.00dxfont2_LCD-L"center""center"falsefalsefalsefalsefalse)
    end
addEventHandler("onClientRender",getRootElement(),hud)




Debugscript wywala mi :
ERROR: Loading script failed: zegary/zegarynew.lua:3: unexpected symbol near "-"

Prosz? o pomoc, nie mam poj?cia dlaczego m?j kod nie dzia?a i nie wy?wietla zupe?nie nic.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-07-14, 15:48


_Wicek_

Majstersztyk






Wiek: 25
Na forum: 4260 dni
Posty: 747
Nick w MP: Wicek

Piwa: 1841

Respekt: 360,5
Respekt: 360,5Respekt: 360,5Respekt: 360,5Respekt: 360,5

Ostrzeżeń: 40%
Testuj.
local dxfont0_LCD_L dxCreateFont(":zegary/LCD-L.ttf"61)
local dxfont1_LCD_L dxCreateFont(":zegary/LCD-L.ttf"16)
local dxfont2_LCD_L dxCreateFont(":zegary/LCD-L.ttf"10)


Podpis

Support-Team: 25.01.2016
Moderator: 10.07.2016




GG: 51274621
Skype : kuba_wicinski
Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-07-15, 12:12


flimbo123







Wiek: 33
Na forum: 5776 dni
Posty: 93
Nick w MP: Flimbo

Piwa: 190

Respekt: 60

local font0 dxCreateFont("LCD-L.ttf"50)
local font1 dxCreateFont("LCD-L.ttf"13)
local font2 dxCreateFont("LCD-L.ttf"18)
local font3 dxCreateFont("LCD-L.ttf"10)


local screenWscreenH guiGetScreenSize() 
function speed ( )
    addEventHandler "onClientRender"rootgetspeed )
end
addEventHandler ("onClientVehicleEnter"rootspeed)

function hideSpeed ( )
    removeEventHandler "onClientRender"rootgetspeed )
end
addEventHandler("onClientVehicleExit"roothideSpeed)

function hud ( )
    local v getPedOccupiedVehicle getLocalPlayer() )
    local przebieg string.format("%.1f",getElementData v,"przeb"))
    local x,y,getElementPositiongetLocalPlayer() )
    local location getZoneName xyztrue )
        if isPedInVehicle (localPlayer) == false then return end
        sxsysz getElementVelocity (getPedOccupiedVehicle(localPlayer))
        kmhs math.floor(((sx^sy^sz^2)^(0.5))*180) --obliczamy pr?dko?? (m/180 1 km/h)
        dxDrawText("..tostring(kmhs).."8397211010802tocolor(2532210255), 1.00font0"center""center"falsefalsefalsefalsefalse)
        dxDrawText("km/h"10107731053802tocolor(255255255255), 1.00font3"left""bottom"falsefalsefalsefalsefalse)
        dxDrawText("..tostring(location).."8398021010842tocolor(255255255255), 1.00font1"center""center"falsefalsefalsefalsefalse)
        dxDrawText("..tostring(przebieg).."8398461010883tocolor(255255255255), 1.00font2"center""center"falsefalsefalsefalsefalse)
    end
addEventHandler("onClientRender",getRootElement(),hud)







Kod dzia?a, ale nie wy?wietla zmiennych



Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-07-15, 12:35


GabWas







Wiek: 24
Na forum: 3881 dni
Posty: 289
Nick w MP: GabWas

Piwa: 65

Respekt: 231,5
Respekt: 231,5Respekt: 231,5

Bo da?e? tostring'i w cudzys?owie...

Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-07-15, 14:21


flimbo123







Wiek: 33
Na forum: 5776 dni
Posty: 93
Nick w MP: Flimbo

Piwa: 190

Respekt: 60

Kurcze, faktycznie ?e te? takiej oczywistej rzeczy nie zauwa?y?em, dzi?ki wam.

Postaw piwo autorowi tego posta
 

 
Tagi: zegary :: cyfrowe
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA » zegary cyfrowe 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