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

Wysłany: 2014-09-21, 19:33


Dixers

No-Life






Wiek: 26
Na forum: 4313 dni
Posty: 549
Nick w MP: Dixers

Piwa: 412

Respekt: 56,8

Jak zrobi? ten button :


button1 guiCreateButton(1410032357"Zatankuj 10% za 3.67 PLN"falsepanelfuel)


Aby dzia?a?o tankowanie, kt?re jest zawarte w tej funkcji. Po prostu tej funkcji chce si? pozby?, a chc?, ?eby tankowanie by?o poprzez przycisk.


function setTimerRefillGas(enabled) 
 if(isPedInVehicle(getLocalPlayer())) then
        local player getLocalPlayer()
        local vehicle getPedOccupiedVehicle(player)
        local fuel getElementData(vehicle,"fuel")
        if(tonumber(fuel) < 100then

setElementData(vehicle,"fuel",getElementData(vehicle"fuel") +10)
distanceOld distance
end
end
end 
addEventHandler("onGasRefill",getRootElement(),setTimerRefillGas


Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-09-21, 19:42


MeeShuffle

Programista/Grafik






Wiek: 32
Na forum: 4395 dni
Posty: 2758
Nick w MP: Shuffle

Piwa: 8575

Respekt: 535,3
Respekt: 535,3

function setTimerRefillGas(enabled) 
 if(isPedInVehicle(getLocalPlayer())) then
        local player getLocalPlayer()
        local vehicle getPedOccupiedVehicle(player)
        local fuel getElementData(vehicle,"fuel")
        if(tonumber(fuel) < 100then

setElementData(vehicle,"fuel",getElementData(vehicle"fuel") +10)
distanceOld distance
end
end
end 
addEventHandler("onClientGUIClick",button1,setTimerRefillGas



Polecam jeszcze zrobi? skalowanie okna.

Podpis

https://shufflecode.pl
Static Codes and Graphics - Join our discord!
Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-09-21, 19:55


Dixers

No-Life






Wiek: 26
Na forum: 4313 dni
Posty: 549
Nick w MP: Dixers

Piwa: 412

Respekt: 56,8

Shuffle, oj?. Zapomnia?em. Da si? to zrobi? w kodzie? Czy gui musz? od nowa?

[ Dodano: 2014-09-21, 20:01 ]
Shuffle, sprawdzi?em skrypt i nie tankuje.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-09-21, 20:46


MeeShuffle

Programista/Grafik






Wiek: 32
Na forum: 4395 dni
Posty: 2758
Nick w MP: Shuffle

Piwa: 8575

Respekt: 535,3
Respekt: 535,3

Polecam zrobi? od nowa GUI na najmniejszej rozdzielczo?ci, wtedy pokieruj? Ci? dalej.

Podpis

https://shufflecode.pl
Static Codes and Graphics - Join our discord!
Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-09-21, 21:27


Dixers

No-Life






Wiek: 26
Na forum: 4313 dni
Posty: 549
Nick w MP: Dixers

Piwa: 412

Respekt: 56,8

Shuffle, ale jak na najmniejszej rozdzielczo?ci?

Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-09-21, 22:42


MeeShuffle

Programista/Grafik






Wiek: 32
Na forum: 4395 dni
Posty: 2758
Nick w MP: Shuffle

Piwa: 8575

Respekt: 535,3
Respekt: 535,3

Rozdzielczo?? w ustawieniach zmieniasz na najmniejsz? i wtedy gui robisz.

Podpis

https://shufflecode.pl
Static Codes and Graphics - Join our discord!
Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-09-21, 22:53


Dixers

No-Life






Wiek: 26
Na forum: 4313 dni
Posty: 549
Nick w MP: Dixers

Piwa: 412

Respekt: 56,8

Shuffle, to wtedy b?dzie 680x520 czy jako? tak.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-09-22, 10:33


MeeShuffle

Programista/Grafik






Wiek: 32
Na forum: 4395 dni
Posty: 2758
Nick w MP: Shuffle

Piwa: 8575

Respekt: 535,3
Respekt: 535,3

Pogrzeb w kodzie kt?ry Ci da?em i na tak? ustaw.

Podpis

https://shufflecode.pl
Static Codes and Graphics - Join our discord!
Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-09-23, 16:51


Dixers

No-Life






Wiek: 26
Na forum: 4313 dni
Posty: 549
Nick w MP: Dixers

Piwa: 412

Respekt: 56,8

Shuffle, w kt?rym kodzie? Poda?e? mi tylko jeden, ten poprawiony :)

Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-09-23, 21:33


MeeShuffle

Programista/Grafik






Wiek: 32
Na forum: 4395 dni
Posty: 2758
Nick w MP: Shuffle

Piwa: 8575

Respekt: 535,3
Respekt: 535,3

Oj wybacz pomyli?y mi si? dzia?y.


W tym kodzie:

mojeW,mojeH 640480
sW,sH guiGetScreenSize()
widthheight = (sW/mojeW), (sH/mojeH)


Podpis

https://shufflecode.pl
Static Codes and Graphics - Join our discord!
Postaw piwo autorowi tego posta
 

 
Tagi: tankowanie :: button
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






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