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

Wysłany: 2019-05-30, 17:16


AsterBonzo

Otwórz ogień






Wiek: 21
Na forum: 3109 dni
Posty: 187
Nick w MP: Hirahi

Piwa: 61

Respekt: 35,8

witam mam problem taki ?e chce sobie przerobi? telefon pod komende ale gdy zrobi?em to komenda nie dzia?a prosze o pomoc.
DAJE PIWKO!


--[[
    Autor: Malentas
]]
local okno = false
screenW, screenH = guiGetScreenSize()
local sx,sy = (screenW/1440), (screenH/900)
local scaleTable =
{
    [1920] = 1.4,
    [1680] = 1.25,
    [1600] = 1.24,
    [1366] = 1.0,
    [1280] = 0.94,
    [1152] = 0.85,
    [1024] = 0.76, 
}
if scaleTable[screenW] then
    sx,sy = scaleTable[screenW], scaleTable[screenW]
end
function telefon()
    dxDrawImage(576*sx, 157*sy, 288*sx, 586*sy, ":np-telefon/img/bg.png", 0, 0, 0, tocolor(255, 255, 255, 255), false)
    dxDrawImage(603*sx, 245*sy, 233*sx, 408*sy, ":np-telefon/img/tap2.png", 0, 0, 0, tocolor(255, 255, 255, 255), false)
    dxDrawImage(603*sx, 274*sy, 60*sx, 64*sy, ":np-telefon/img/kontakty.png", 0, 0, 0, tocolor(255, 255, 255, 255), false)
    dxDrawRectangle(603*sx, 245*sy, 230*sx, 25*sy, tocolor(0, 0, 0, 100), false)
    dxDrawText("00:00", 781*sx, 245*sy, 828*sx, 274*sy, tocolor(255, 255, 255, 255), 1.00, "default", "right", "center", false, false, false, false, false)
    dxDrawText("T-Mobile", 607*sx, 245*sy, 654*sx, 274*sy, tocolor(255, 255, 255, 255), 1.00, "default", "left", "center", false, false, false, false, false)
    dxDrawImage(663*sx, 274*sy, 60*sx, 64*sy, ":np-telefon/img/ustawienia.png", 0, 0, 0, tocolor(255, 255, 255, 255), false)
end


addEventHandler("onClientRender", root, okno, telefon)

addCommandHandler("telefon",okno,telefon)


Podpis

Pomagam jak potrafię :)

Postaw piwo autorowi tego posta
 

 
Wysłany: 2019-05-30, 17:42


Nexisten

Moderator






Wiek: 22
Na forum: 4248 dni
Posty: 552
Nick w MP: Nexisten

Piwa: 1486

Respekt: 287,3
Respekt: 287,3Respekt: 287,3Respekt: 287,3


--[[
    Autor: Malentas
]]
local okno = false
screenW, screenH = guiGetScreenSize()
local sx,sy = (screenW/1440), (screenH/900)
local scaleTable =
{
    [1920] = 1.4,
    [1680] = 1.25,
    [1600] = 1.24,
    [1366] = 1.0,
    [1280] = 0.94,
    [1152] = 0.85,
    [1024] = 0.76, 
}
if scaleTable[screenW] then
    sx,sy = scaleTable[screenW], scaleTable[screenW]
end
function telefon()
    dxDrawImage(576*sx, 157*sy, 288*sx, 586*sy, ":np-telefon/img/bg.png", 0, 0, 0, tocolor(255, 255, 255, 255), false)
    dxDrawImage(603*sx, 245*sy, 233*sx, 408*sy, ":np-telefon/img/tap2.png", 0, 0, 0, tocolor(255, 255, 255, 255), false)
    dxDrawImage(603*sx, 274*sy, 60*sx, 64*sy, ":np-telefon/img/kontakty.png", 0, 0, 0, tocolor(255, 255, 255, 255), false)
    dxDrawRectangle(603*sx, 245*sy, 230*sx, 25*sy, tocolor(0, 0, 0, 100), false)
    dxDrawText("00:00", 781*sx, 245*sy, 828*sx, 274*sy, tocolor(255, 255, 255, 255), 1.00, "default", "right", "center", false, false, false, false, false)
    dxDrawText("T-Mobile", 607*sx, 245*sy, 654*sx, 274*sy, tocolor(255, 255, 255, 255), 1.00, "default", "left", "center", false, false, false, false, false)
    dxDrawImage(663*sx, 274*sy, 60*sx, 64*sy, ":np-telefon/img/ustawienia.png", 0, 0, 0, tocolor(255, 255, 255, 255), false)
end


addEventHandler("onClientRender", root, okno, telefon)

addCommandHandler("telefon", telefon)


Spr?buj.

Postaw piwo autorowi tego posta
 

 
Więcej szczegółów
Wystawiono 1 piw(a):
AsterBonzo
Wysłany: 2019-05-30, 18:22


MeeShuffle

Programista/Grafik






Wiek: 33
Na forum: 4535 dni
Posty: 2758
Nick w MP: Shuffle

Piwa: 8578

Respekt: 535,3
Respekt: 535,3

Pozdro.


--[[
    Autor: Malentas
]]
local okno = false
screenW, screenH = guiGetScreenSize()
local sx,sy = (screenW/1440), (screenH/900)
local scaleTable =
{
    [1920] = 1.4,
    [1680] = 1.25,
    [1600] = 1.24,
    [1366] = 1.0,
    [1280] = 0.94,
    [1152] = 0.85,
    [1024] = 0.76, 
}
if scaleTable[screenW] then
    sx,sy = scaleTable[screenW], scaleTable[screenW]
end
function telefon()
    dxDrawImage(576*sx, 157*sy, 288*sx, 586*sy, ":np-telefon/img/bg.png", 0, 0, 0, tocolor(255, 255, 255, 255), false)
    dxDrawImage(603*sx, 245*sy, 233*sx, 408*sy, ":np-telefon/img/tap2.png", 0, 0, 0, tocolor(255, 255, 255, 255), false)
    dxDrawImage(603*sx, 274*sy, 60*sx, 64*sy, ":np-telefon/img/kontakty.png", 0, 0, 0, tocolor(255, 255, 255, 255), false)
    dxDrawRectangle(603*sx, 245*sy, 230*sx, 25*sy, tocolor(0, 0, 0, 100), false)
    dxDrawText("00:00", 781*sx, 245*sy, 828*sx, 274*sy, tocolor(255, 255, 255, 255), 1.00, "default", "right", "center", false, false, false, false, false)
    dxDrawText("T-Mobile", 607*sx, 245*sy, 654*sx, 274*sy, tocolor(255, 255, 255, 255), 1.00, "default", "left", "center", false, false, false, false, false)
    dxDrawImage(663*sx, 274*sy, 60*sx, 64*sy, ":np-telefon/img/ustawienia.png", 0, 0, 0, tocolor(255, 255, 255, 255), false)
end




addCommandHandler("telefon", function()
addEventHandler("onClientRender", root, telefon)
end)


Postaw piwo autorowi tego posta
 

 
Więcej szczegółów
Wystawiono 1 piw(a):
AsterBonzo
Wysłany: 2019-05-30, 19:28


AsterBonzo

Otwórz ogień






Wiek: 21
Na forum: 3109 dni
Posty: 187
Nick w MP: Hirahi

Piwa: 61

Respekt: 35,8

a mam jeszcze pytanie jak zrobi? by wy?wietli? kursor ?

Postaw piwo autorowi tego posta
 

 
Wysłany: 2019-05-30, 21:13


serigorro







Wiek: 28
Na forum: 2988 dni
Posty: 41
Nick w MP: Igorro

Piwa: 3

Respekt: 40

"DjMaXimoMax" napisał/a:

a mam jeszcze pytanie jak zrobi? by wy?wietli? kursor ?


function telefon()
    showCursor(true, false)
    dxDrawImage(576*sx, 157*sy, 288*sx, 586*sy, ":np-telefon/img/bg.png", 0, 0, 0, tocolor(255, 255, 255, 255), false)
    dxDrawImage(603*sx, 245*sy, 233*sx, 408*sy, ":np-telefon/img/tap2.png", 0, 0, 0, tocolor(255, 255, 255, 255), false)
    dxDrawImage(603*sx, 274*sy, 60*sx, 64*sy, ":np-telefon/img/kontakty.png", 0, 0, 0, tocolor(255, 255, 255, 255), false)
    dxDrawRectangle(603*sx, 245*sy, 230*sx, 25*sy, tocolor(0, 0, 0, 100), false)
    dxDrawText("00:00", 781*sx, 245*sy, 828*sx, 274*sy, tocolor(255, 255, 255, 255), 1.00, "default", "right", "center", false, false, false, false, false)
    dxDrawText("T-Mobile", 607*sx, 245*sy, 654*sx, 274*sy, tocolor(255, 255, 255, 255), 1.00, "default", "left", "center", false, false, false, false, false)
    dxDrawImage(663*sx, 274*sy, 60*sx, 64*sy, ":np-telefon/img/ustawienia.png", 0, 0, 0, tocolor(255, 255, 255, 255), false)
end


Postaw piwo autorowi tego posta
 

 
Więcej szczegółów
Wystawiono 1 piw(a):
AsterBonzo
Wysłany: 2019-05-31, 10:02


AsterBonzo

Otwórz ogień






Wiek: 21
Na forum: 3109 dni
Posty: 187
Nick w MP: Hirahi

Piwa: 61

Respekt: 35,8

nie wiem jak zrobi? to ?e jak si? napisze telefon 2 raz to zniknie prosze o pomoc

Postaw piwo autorowi tego posta
 

 
Wysłany: 2019-05-31, 10:27


Wilq







Wiek: 24
Na forum: 4569 dni
Posty: 3409

Piwa: 739

Respekt: 1225,8
Respekt: 1225,8

Mo?esz u?y? zmiennej, w kt?rej zapisujesz stan wy?wietlania telefonu, i usuwa? event za pomoc?

Więcej informacji znajdziesz w Wikipedii MTA:

removeEventHandler


Postaw piwo autorowi tego posta
 

 
Wysłany: 2019-05-31, 10:51


AsterBonzo

Otwórz ogień






Wiek: 21
Na forum: 3109 dni
Posty: 187
Nick w MP: Hirahi

Piwa: 61

Respekt: 35,8


addCommandHandler("telefon2", function()
removeEventHandler("onClientRender", root, telefon)
end)
co? takiego ?

[ Dodano: 2019-05-31, 10:58 ]
dobra dzia?a mo?na zamkn?? :)

Postaw piwo autorowi tego posta
 

 
Tagi: komenda
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






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