Wysłany: 2018-06-24, 03:18
Kulegg
Wiek: 46 Na forum: 3125 dni Posty: 283
Piwa : 20
Witam,
Posiadam paczke z PYSA,
Oraz mam wgrany skrypt r?wnie? z tej paczki, montowaniemk
Wszystko dzia?a, montowanie i ceny si? zgadzaj?, lecz poprawiaj? si? osi?gi auta u np. turismo tylko o 10km/h, jak to powi?kszy??
Kod:
--[[
@ author Mikael < mikael . mta @ wp . pl >
Skrypt wykonany dla New World 2016
]]
mk1 = 500000
mk2 = 700000
rh = 900000
local licz = {}
local t = createElement ( 'text' )
setElementData ( t , 'name' , 'Automatyczny monta? tuningu mechanicznego' )
setElementPosition ( t ,- 2052.77 , 159.02 , 28.84 + 0.5 )
-- createBlip (- 1770.96 , 1205.90 , 25.13 , 53 ) -- fancy workshop blip
addEvent ( "mk1" , true )
addEventHandler ( "mk1" , root , function()
pojazd = getPedOccupiedVehicle ( source )
if not pojazd then return end
if ( getPlayerMoney ( source ) > tonumber ( mk1 )) then
local id = getElementData ( pojazd , "vehicle:id" )
exports [ "pystories-db" ]: dbSet ( "UPDATE pystories_vehicles SET mk1=1 WHERE id=?" , id )
outputChatBox ( "* Pomy?lnie zamontowano MK1." , source , true )
outputChatBox ( "* Oddaj auto do przecho aby zobaczy? efekty!" , source , true )
takePlayerMoney ( source , mk1 )
else
outputChatBox ( "* Nie sta? Ci? na to." , source , true )
end
end
)
addEvent ( "mk2" , true )
addEventHandler ( "mk2" , root , function()
pojazd = getPedOccupiedVehicle ( source )
if not pojazd then return end
if ( getPlayerMoney ( source ) > tonumber ( mk2 )) then
local id = getElementData ( pojazd , "vehicle:id" )
exports [ "pystories-db" ]: dbSet ( "UPDATE pystories_vehicles SET mk2=1 WHERE id=?" , id )
outputChatBox ( "* Pomy?lnie zamontowano MK2." , source , true )
outputChatBox ( "* Oddaj auto do przecho aby zobaczy? efekty!" , source , true )
takePlayerMoney ( source , mk2 )
else
outputChatBox ( "* Nie sta? Ci? na to." , source , true )
end
end
)
addEvent ( "rh" , true )
addEventHandler ( "rh" , root , function()
pojazd = isPedInVehicle ( source )
if not pojazd then return end
if ( getPlayerMoney ( source ) > tonumber ( rh )) then
local id = getElementData ( pojazd , "vehicle:id" )
exports [ "pystories-db" ]: dbSet ( "UPDATE pystories_vehicles SET naped=1 WHERE id=?" , id )
outputChatBox ( "* Pomy?lnie zamontowano nap?d 4x4." , source , true )
outputChatBox ( "* Oddaj auto do przecho aby zobaczy? efekty!" , source , true )
takePlayerMoney ( source , rh )
else
outputChatBox ( "* Nie sta? Ci? na to." , source , true )
end
end
)
Oraz drugi kod:
--[[
@ author Mikael < mikael . mta @ wp . pl >
Skrypt wykonany dla New World 2016
]]
mk1 = 500000
mk2 = 700000
rh = 900000
local licz = {}
local t = createElement ( 'text' )
setElementData ( t , 'name' , 'Automatyczny monta? tuningu mechanicznego' )
setElementPosition ( t ,- 2052.77 , 159.02 , 28.84 + 0.5 )
-- createBlip (- 1770.96 , 1205.90 , 25.13 , 53 ) -- fancy workshop blip
addEvent ( "mk1" , true )
addEventHandler ( "mk1" , root , function()
pojazd = getPedOccupiedVehicle ( source )
if not pojazd then return end
if ( getPlayerMoney ( source ) > tonumber ( mk1 )) then
local id = getElementData ( pojazd , "vehicle:id" )
exports [ "pystories-db" ]: dbSet ( "UPDATE pystories_vehicles SET mk1=1 WHERE id=?" , id )
outputChatBox ( "* Pomy?lnie zamontowano MK1." , source , true )
outputChatBox ( "* Oddaj auto do przecho aby zobaczy? efekty!" , source , true )
takePlayerMoney ( source , mk1 )
else
outputChatBox ( "* Nie sta? Ci? na to." , source , true )
end
end
)
addEvent ( "mk2" , true )
addEventHandler ( "mk2" , root , function()
pojazd = getPedOccupiedVehicle ( source )
if not pojazd then return end
if ( getPlayerMoney ( source ) > tonumber ( mk2 )) then
local id = getElementData ( pojazd , "vehicle:id" )
exports [ "pystories-db" ]: dbSet ( "UPDATE pystories_vehicles SET mk2=1 WHERE id=?" , id )
outputChatBox ( "* Pomy?lnie zamontowano MK2." , source , true )
outputChatBox ( "* Oddaj auto do przecho aby zobaczy? efekty!" , source , true )
takePlayerMoney ( source , mk2 )
else
outputChatBox ( "* Nie sta? Ci? na to." , source , true )
end
end
)
addEvent ( "rh" , true )
addEventHandler ( "rh" , root , function()
pojazd = isPedInVehicle ( source )
if not pojazd then return end
if ( getPlayerMoney ( source ) > tonumber ( rh )) then
local id = getElementData ( pojazd , "vehicle:id" )
exports [ "pystories-db" ]: dbSet ( "UPDATE pystories_vehicles SET naped=1 WHERE id=?" , id )
outputChatBox ( "* Pomy?lnie zamontowano nap?d 4x4." , source , true )
outputChatBox ( "* Oddaj auto do przecho aby zobaczy? efekty!" , source , true )
takePlayerMoney ( source , rh )
else
outputChatBox ( "* Nie sta? Ci? na to." , source , true )
end
end
)
Więcej szczegółów
Wystawiono 1 piw(a):Komel123
Wysłany: 2018-06-24, 09:54
Kalizman
Wiek: 23 Na forum: 3652 dni Posty: 1394
Piwa : 4619
poszukaj w skryptach funkcji setVehicleHandling np. w skrypcie od prywatnych pojazd?w, tam znajdziesz dane, kt?rymi mo?esz manipulowa?
Wysłany: 2018-06-24, 11:29
PatryKK.
Emeryt LUA
Wiek: 26 Na forum: 3061 dni Posty: 1060
Nick w MP: PatryKK.
Piwa : 2322
Tak jak kolega wy?ej wspomnia?, osi?gi pojazd?w znajdziesz w skrypcie pystories-vehicles. Kliknij Windows+F jednocze?nie, wyskoczy Ci wyszukiwarka i szukaj funkcji
Podpis
GG:75080675
- ✔
- ✔
- ✔
- ✔
Aktualny projekt: BRAK
Tagi: mk1 :: mk2 :: mk3
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: