Wysłany: 2015-09-12, 22:51
mlodasnygo
Wiek: 16 Na forum: 3973 dni Posty: 205
Piwa : 518
Witam chcialbym przerobi? ten skrypt aby po wpisaniu komendy w pojezdzie robi? si? taki handling.. Lecz nie wiem jak.. Prosz? o pomoc. ;d
elseif getElementModel ( v ) == 404 then
local velocity = 260.0 -- ( Predkosc maksymalna )
local acceleration = 20.0 -- ( Przyspieszenie )
local slock = 38.0 -- ( Promien )
local trac = 0.8 -- ( Przyczepno ??)
setVehicleHandling ( v , "tractionMultiplier" , trac )
setVehicleHandling ( v , "steeringLock" , slock )
setVehicleHandling ( v , "maxVelocity" , velocity )
setVehicleHandling ( v , "engineAcceleration" , acceleration )
end
end
addEventHandler ( "onVehicleEnter" , root , handling )
Za pomoc stawiam piffko ;D
Pozdrawiam,
mlodasny
Podpis
600 dni -
10 marca 2017
500 piw -
10 marca 2017
Więcej szczegółów
Wystawiono 1 piw(a):pawelloo
Wysłany: 2015-09-12, 23:58
mlodasnygo
Wiek: 16 Na forum: 3973 dni Posty: 205
Piwa : 518
function handling ( plr , s , j )
if s ~= 0 then return end
local v = source
-- CHEETACH
if getElementModel ( v ) == 415 then
local velocity = 260.0 -- ( Predkosc maksymalna )
local acceleration = 20.0 -- ( Przyspieszenie )
local slock = 38.0 -- ( Promien )
local trac = 0.9 -- ( Przyczepno ??)
setVehicleHandling ( v , "tractionMultiplier" , trac )
setVehicleHandling ( v , "steeringLock" , slock )
setVehicleHandling ( v , "maxVelocity" , velocity )
setVehicleHandling ( v , "engineAcceleration" , acceleration )
-- [[ PERENNIAL ]] --
elseif getElementModel ( v ) == 404 then
local velocity = 260.0 -- ( Predkosc maksymalna )
local acceleration = 19.0 -- ( Przyspieszenie )
local slock = 48.0 -- ( Promien )
local trac = 0.7 -- ( przyczepo ??
setVehicleHandling ( v , "tractionMultiplier" , trac )
setVehicleHandling ( v , "steeringLock" , slock )
setVehicleHandling ( v , "maxVelocity" , velocity )
setVehicleHandling ( v , "engineAcceleration" , acceleration )
end
end
addEventHandler ( "onVehicleEnter" , root , handling )
Prosz. ;D
Podpis
600 dni -
10 marca 2017
500 piw -
10 marca 2017
Wysłany: 2015-09-13, 08:22
#404
Wiek: 26 Na forum: 4771 dni Posty: 1438
Piwa : 2512
mlodasnygo
function handling ( gracz , cmd )
pojazd = getPedOccupiedVehicle ( gracz )
if pojazd then
local velocity = 260.0 -- ( Predkosc maksymalna )
local acceleration = 20.0 -- ( Przyspieszenie )
local slock = 38.0 -- ( Promien )
local trac = 0.8 -- ( Przyczepno ??)
setVehicleHandling ( pojazd , "tractionMultiplier" , trac )
setVehicleHandling ( pojazd , "steeringLock" , slock )
setVehicleHandling ( pojazd , "maxVelocity" , velocity )
setVehicleHandling ( pojazd , "engineAcceleration" , acceleration )
end
end
addCommandHandler ( " komenda" , handling )
Powinno dzia?a?.
Wysłany: 2015-09-14, 17:27
mlodasnygo
Wiek: 16 Na forum: 3973 dni Posty: 205
Piwa : 518
Dzia?a, dzi?ki wszystko pi?knie smiga, ale mam jeszcze pytanko, jak mog? doda?, aby tylko admin to m?g??
Podpis
600 dni -
10 marca 2017
500 piw -
10 marca 2017
Wysłany: 2015-09-14, 18:03
#404
Wiek: 26 Na forum: 4771 dni Posty: 1438
Piwa : 2512
Pomi?dzy "function handling(gracz,cmd)" a "pojazd = getPedOccupiedVehicle(gracz)"
Wysłany: 2015-09-15, 17:08
mlodasnygo
Wiek: 16 Na forum: 3973 dni Posty: 205
Piwa : 518
No nie dzia?a teraz ju? wgl.
Zobacz czy dobrze zrobi?em.
function handling ( gracz , cmd )
if isObjectInACLGroup ( "user." .. getAccountName ( getPlayerAccount ( source )), aclGetGroup ( "Admin" )) then
pojazd = getPedOccupiedVehicle ( gracz )
if pojazd then
local velocity = 260.0 -- ( Predkosc maksymalna )
local acceleration = 20.0 -- ( Przyspieszenie )
local slock = 38.0 -- ( Promien )
local trac = 0.8 -- ( Przyczepno ??)
setVehicleHandling ( pojazd , "tractionMultiplier" , trac )
setVehicleHandling ( pojazd , "steeringLock" , slock )
setVehicleHandling ( pojazd , "maxVelocity" , velocity )
setVehicleHandling ( pojazd , "engineAcceleration" , acceleration )
end
end
end
addCommandHandler ( "xs260" , handling )
Podpis
600 dni -
10 marca 2017
500 piw -
10 marca 2017
Wysłany: 2015-09-15, 17:22
Jurandovsky
Kurdebele
Wiek: 17 Na forum: 4838 dni Posty: 915
Piwa : 2697
Zmien source na gracz
Podpis
Jedyny kontakt ze mną to PW forum
Kod:
local noobs = getElementsByTitle("player", "Programista LUA")
for k, v in ipairs(noobs) do
outputChatBox("Bez mózgu jest użytkownik o nicku: "..getPlayerName(v), root)
destroyElement(v)
end
Wysłany: 2015-09-15, 18:22
mlodasnygo
Wiek: 16 Na forum: 3973 dni Posty: 205
Piwa : 518
dzi?ki, a jeszcze chcia?bym sie spyta? jak zrobi? aby uzyc jeszcze outPutChatBox
np.
po wpisaniu komendy wyskakuje wiadomo?? ale tylko dla tego co wpisa?
" Pomy?lnie doda?e? handling do pojazdu."
Podpis
600 dni -
10 marca 2017
500 piw -
10 marca 2017
Wysłany: 2015-09-15, 18:52
#404
Wiek: 26 Na forum: 4771 dni Posty: 1438
Piwa : 2512
do kodu dodaj
outputChatBox ( "Tekst" , gracz )
Tagi: handling :: komendę.
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: