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

Wysłany: 2015-11-21, 13:38


BlackTen

LUA Dev.






Wiek: 28
Na forum: 4471 dni
Posty: 698

Piwa: 2080

Respekt: 157
Respekt: 157Respekt: 157

Witam, mam tutaj kod na mk1 i mam debugscript 3


--TUNE STANOWISKO 1
function tune (thePlayer, seat)
if isElementWithinMarker(thePlayer, mk) then
local hajs = getPlayerMoney(thePlayer)
if  (hajs < 30000 ) then
outputChatBox("Nie masz wystarczajaco pieniedzy",thePlayer, 0, 170, 255, true)
else
if isPedInVehicle ( thePlayer ) then
local car = getPedOccupiedVehicle ( thePlayer )
local acceleration = getVehicleHandlingProperty(car,"engineAcceleration")
setVehicleHandling(car,"engineAcceleration",tonumber(acceleration)+10)
takePlayerMoney(thePlayer, 30000)
outputChatBox("Dodales do auta mk1 zaplaciles 30000$", thePlayer, 0, 170, 255, true)
else
outputChatBox ("nie jestes w aucie!", thePlayer, 0, 170, 255, true)
end
end
end  
end
addCommandHandler("dodaj.mk1", tune)

function wjechal (thePlayer)
outputChatBox ("Wpisz /dodaj.mk1 ( koszt 30000$ )", thePlayer, 0, 170, 255, true)
end
addEventHandler("onMarkerHit",mk,wjechal) 

--TUNE STANOWISKO 2
function tune1 (thePlayer, seat)
if isElementWithinMarker(thePlayer, mk1) then
local hajs = getPlayerMoney(thePlayer)
if  (hajs < 35000 ) then
outputChatBox("Nie masz wystarczajaco pieniedzy",thePlayer, 0, 170, 255, true)
else
if isPedInVehicle ( thePlayer ) then
local car = getPedOccupiedVehicle ( thePlayer )
 local driveType = getVehicleHandlingProperty(car,"driveType")
setVehicleHandling(car,"driveType","awd")
takePlayerMoney(thePlayer, 35000)
outputChatBox("Dodales do auta mk2 zaplaciles 35000$", thePlayer, 0, 170, 255, true)
else
outputChatBox ("nie jestes w aucie!", thePlayer, 0, 170, 255, true)
end
end
end
end
addCommandHandler("dodaj.mk2", tune1)

function wjechal (thePlayer)
outputChatBox ("Wpisz /dodaj.mk2 ( koszt 35000$ )", thePlayer, 0, 170, 255, true)
end
addEventHandler("onMarkerHit",mk1,wjechal) 


db3: 196: attempt to call global 'getVehicleHandlingProperty' (a nil value)

Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-11-21, 13:50


ironmaiden666

Voight...






Wiek: 30
Na forum: 4161 dni
Posty: 125
Nick w MP: Irons

Piwa: 2946

Respekt: 102
Respekt: 102

Ostrzeżeń: 40%
Jakby? m?g? ponumerowa? linijki to bym podzi?kowa? :)

Podpis
Intelligence gonna get you..
Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-11-21, 13:51


Barcioo

Kiedyś to było ST






Wiek: 26
Na forum: 4190 dni
Posty: 458
Nick w MP: Bartek.

Piwa: 1892

Respekt: 460
Respekt: 460


--TUNE STANOWISKO 1
function tune (thePlayer, seat)
if isElementWithinMarker(thePlayer, mk) then
local hajs = getPlayerMoney(thePlayer)
if  (hajs < 30000 ) then
outputChatBox("Nie masz wystarczajaco pieniedzy",thePlayer, 0, 170, 255, true)
else
if isPedInVehicle ( thePlayer ) then
local car = getPedOccupiedVehicle ( thePlayer )
setVehicleHandling(car,"engineAcceleration",10)
takePlayerMoney(thePlayer, 30000)
outputChatBox("Dodales do auta mk1 zaplaciles 30000$", thePlayer, 0, 170, 255, true)
else
outputChatBox ("nie jestes w aucie!", thePlayer, 0, 170, 255, true)
end
end
end  
end
addCommandHandler("dodaj.mk1", tune)

function wjechal (thePlayer)
outputChatBox ("Wpisz /dodaj.mk1 ( koszt 30000$ )", thePlayer, 0, 170, 255, true)


Podpis
Kanał Youtube;
A tu zapraszam
, pomogłem Ci? Wynagrodź mnie :piwo: :)


SUPPORT TEAM- 2016-09-03 do 2018-05-25
Test Mod- 2018-05-25
1k dni na Forum - 2018-01-28


GG: 62111935
Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-11-21, 13:59


BlackTen

LUA Dev.






Wiek: 28
Na forum: 4471 dni
Posty: 698

Piwa: 2080

Respekt: 157
Respekt: 157Respekt: 157

Dziala do zamkniecia :D

Postaw piwo autorowi tego posta
 

 
Tagi: mk1
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






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