Wysłany: 2018-09-11, 20:22
Nywis
Wiek: 29 Na forum: 2847 dni Posty: 60
Nick w MP: Nywis
Piwa : 14
Witam, posiadam skrypt na publiczne rowerki, ktore sa rozmieszczone na spawnie, przecho itp., lecz gdy zaladuje skrypt, to rowerki posiadaja dzialaj?ca interakcje pojazdu, maja zaciagniety hamulec reczny, oraz trzeba odpalic silnik, aby moc jechac tym rowerkiem, lecz gdy klikam SHIFT to interakcja mi sie nie pojawia i nie mam zadnej opcji interakcyjnej, oraz te rowerki po zaladowaniu skryptu, lub gdy ktos je porzuci, respia sie one nad ziemia, zamiast rowno na ziemi, ktos wie jak to ogarnac?
Skrypt:
https://pastebin.com/NACGsfH1
Wysłany: 2018-09-11, 20:28
Query
SyndicateMTA
Wiek: 24 Na forum: 3072 dni Posty: 319
Nick w MP: Query
Piwa : 5257
Daj kod od interakcji pojazdu.
Wysłany: 2018-09-11, 21:08
Nywis
Wiek: 29 Na forum: 2847 dni Posty: 60
Nick w MP: Nywis
Piwa : 14
Wysłany: 2018-09-11, 21:42
Wilq
Wiek: 24 Na forum: 4429 dni Posty: 3410
Piwa : 739
S-SIDE:
--[[
Author : AteX < atexprogramming @ gmail . com >
Edit : Bone < bone . pystories @ gmail . com >
]]--
local rowery = {[ 509 ]= true ,[ 481 ]= true ,[ 462 ]= true ,[ 510 ]= true }
addEvent ( "silnik" , true )
addEventHandler ( "silnik" , root ,function()
local v = getPedOccupiedVehicle ( source )
if v then
if getElementData ( v , "recznySalonData" ) then
outputChatBox ( "* Interakcja, nie dzia?a na pojazd z Salonu / Cygana." , source )
return end
local silnik = getVehicleEngineState ( v )
local przeb = getElementData ( v , "vehicle:mileage" )
if silnik == false then
-- if przeb < 100000 then
setVehicleEngineState ( v , true )
else
setVehicleEngineState ( v , false )
-- end
end
end
end )
addEvent ( "lampy" , true )
addEventHandler ( "lampy" , root ,function()
local v = getPedOccupiedVehicle ( source )
if v then
if getElementData ( v , "recznySalonData" ) then
outputChatBox ( "* Interakcja, nie dzia?a na pojazd z Salonu / Cygana." , source )
return end
if getVehicleOverrideLights ( v ) ~= 2 then
setVehicleOverrideLights ( v , 2 )
else
setVehicleOverrideLights ( v , 1 )
end
end
end )
addEvent ( "drzwi" , true )
addEventHandler ( "drzwi" , root ,function()
local v = getPedOccupiedVehicle ( source )
if v then
if getElementData ( v , "recznySalonData" ) then
outputChatBox ( "* Interakcja, nie dzia?a na pojazd z Salonu / Cygana." , source )
return end
local drzwi = isVehicleLocked ( v )
if drzwi == true then
setVehicleLocked ( v , false )
else
setVehicleLocked ( v , true )
end
end
end )
addEvent ( "handbrake" , true )
addEventHandler ( "handbrake" , root ,function()
local v = getPedOccupiedVehicle ( source )
if v then
if getElementData ( v , "recznySalonData" ) then
outputChatBox ( "* Interakcja, nie dzia?a na pojazd z Salonu / Cygana." , source )
return end
if getElementData ( v , "blokada:reczny_drwal" ) then
outputChatBox ( "* Spuszczanie r?cznego, nie dzia?a na pracy Drwala." , source )
return end
if getElementData ( v , "blokada:reczny_latdziur" ) then
outputChatBox ( "* Spuszczanie r?cznego, nie dzia?a na pracy ?atacza dziur." , source )
return end
if isElementFrozen ( v ) then
setElementFrozen ( v , false )
else
setElementFrozen ( v , true )
end
end
end )
addEvent ( "maska" , true )
addEventHandler ( "maska" , root ,function()
local v = getPedOccupiedVehicle ( source )
if v then
if getElementData ( v , "recznySalonData" ) then
outputChatBox ( "* Interakcja, nie dzia?a na pojazd z Salonu / Cygana." , source )
return end
if getVehicleDoorOpenRatio ( v , 0 ) == 0 then
setVehicleDoorOpenRatio ( v , 0 , 1 , 2000 )
else
setVehicleDoorOpenRatio ( v , 0 , 0 , 2000 )
end
end
end )
addEvent ( "baga?nik" , true )
addEventHandler ( "baga?nik" , root ,function()
local v = getPedOccupiedVehicle ( source )
if v then
if getElementData ( v , "recznySalonData" ) then
outputChatBox ( "* Interakcja, nie dzia?a na pojazd z Salonu / Cygana." , source )
return end
if getVehicleDoorOpenRatio ( v , 1 ) == 0 then
setVehicleDoorOpenRatio ( v , 1 , 1 , 2000 )
else
setVehicleDoorOpenRatio ( v , 1 , 0 , 2000 )
end
end
end )
addEventHandler ( "onVehicleEnter" , root ,function( plr , seat )
if seat == 0 then
if rowery [ getElementModel ( source )] then return end
setVehicleEngineState ( source , false )
end
end )
addEventHandler ( "onVehicleStartExit" , root ,function( plr , seat )
if seat == 0 then
veh = getPedOccupiedVehicle ( plr )
if rowery [ getElementModel ( veh )] then return end
v = getPedOccupiedVehicle ( plr )
end
end )
addEventHandler ( "onVehicleExit" , root ,function( plr , seat )
if seat == 0 then
if not v then return end
setVehicleEngineState ( v , false )
setVehicleLocked ( v , false )
v = nil
end
end )
W tabeli z rowerami nie mia?e? ID rower?w, kt?re s? jako rowery publiczne.
Wysłany: 2018-09-12, 14:16
Nywis
Wiek: 29 Na forum: 2847 dni Posty: 60
Nick w MP: Nywis
Piwa : 14
"Wilq" napisał/a :S-SIDE:
--[[
Author : AteX < atexprogramming @ gmail . com >
Edit : Bone < bone . pystories @ gmail . com >
]]--
local rowery = {[ 509 ]= true ,[ 481 ]= true ,[ 462 ]= true ,[ 510 ]= true }
addEvent ( "silnik" , true )
addEventHandler ( "silnik" , root ,function()
local v = getPedOccupiedVehicle ( source )
if v then
if getElementData ( v , "recznySalonData" ) then
outputChatBox ( "* Interakcja, nie dzia?a na pojazd z Salonu / Cygana." , source )
return end
local silnik = getVehicleEngineState ( v )
local przeb = getElementData ( v , "vehicle:mileage" )
if silnik == false then
-- if przeb < 100000 then
setVehicleEngineState ( v , true )
else
setVehicleEngineState ( v , false )
-- end
end
end
end )
addEvent ( "lampy" , true )
addEventHandler ( "lampy" , root ,function()
local v = getPedOccupiedVehicle ( source )
if v then
if getElementData ( v , "recznySalonData" ) then
outputChatBox ( "* Interakcja, nie dzia?a na pojazd z Salonu / Cygana." , source )
return end
if getVehicleOverrideLights ( v ) ~= 2 then
setVehicleOverrideLights ( v , 2 )
else
setVehicleOverrideLights ( v , 1 )
end
end
end )
addEvent ( "drzwi" , true )
addEventHandler ( "drzwi" , root ,function()
local v = getPedOccupiedVehicle ( source )
if v then
if getElementData ( v , "recznySalonData" ) then
outputChatBox ( "* Interakcja, nie dzia?a na pojazd z Salonu / Cygana." , source )
return end
local drzwi = isVehicleLocked ( v )
if drzwi == true then
setVehicleLocked ( v , false )
else
setVehicleLocked ( v , true )
end
end
end )
addEvent ( "handbrake" , true )
addEventHandler ( "handbrake" , root ,function()
local v = getPedOccupiedVehicle ( source )
if v then
if getElementData ( v , "recznySalonData" ) then
outputChatBox ( "* Interakcja, nie dzia?a na pojazd z Salonu / Cygana." , source )
return end
if getElementData ( v , "blokada:reczny_drwal" ) then
outputChatBox ( "* Spuszczanie r?cznego, nie dzia?a na pracy Drwala." , source )
return end
if getElementData ( v , "blokada:reczny_latdziur" ) then
outputChatBox ( "* Spuszczanie r?cznego, nie dzia?a na pracy ?atacza dziur." , source )
return end
if isElementFrozen ( v ) then
setElementFrozen ( v , false )
else
setElementFrozen ( v , true )
end
end
end )
addEvent ( "maska" , true )
addEventHandler ( "maska" , root ,function()
local v = getPedOccupiedVehicle ( source )
if v then
if getElementData ( v , "recznySalonData" ) then
outputChatBox ( "* Interakcja, nie dzia?a na pojazd z Salonu / Cygana." , source )
return end
if getVehicleDoorOpenRatio ( v , 0 ) == 0 then
setVehicleDoorOpenRatio ( v , 0 , 1 , 2000 )
else
setVehicleDoorOpenRatio ( v , 0 , 0 , 2000 )
end
end
end )
addEvent ( "baga?nik" , true )
addEventHandler ( "baga?nik" , root ,function()
local v = getPedOccupiedVehicle ( source )
if v then
if getElementData ( v , "recznySalonData" ) then
outputChatBox ( "* Interakcja, nie dzia?a na pojazd z Salonu / Cygana." , source )
return end
if getVehicleDoorOpenRatio ( v , 1 ) == 0 then
setVehicleDoorOpenRatio ( v , 1 , 1 , 2000 )
else
setVehicleDoorOpenRatio ( v , 1 , 0 , 2000 )
end
end
end )
addEventHandler ( "onVehicleEnter" , root ,function( plr , seat )
if seat == 0 then
if rowery [ getElementModel ( source )] then return end
setVehicleEngineState ( source , false )
end
end )
addEventHandler ( "onVehicleStartExit" , root ,function( plr , seat )
if seat == 0 then
veh = getPedOccupiedVehicle ( plr )
if rowery [ getElementModel ( veh )] then return end
v = getPedOccupiedVehicle ( plr )
end
end )
addEventHandler ( "onVehicleExit" , root ,function( plr , seat )
if seat == 0 then
if not v then return end
setVehicleEngineState ( v , false )
setVehicleLocked ( v , false )
v = nil
end
end )
W tabeli z rowerami nie mia?e? ID rower?w, kt?re s? jako rowery publiczne.
Zrobi?em tak, wsiad?em na BMX (462) i nie chcia? jecha?, interakcja pod SHIFT sie nie pojawiala, jak spojrzalem na licznik, to widzialem ze silnik jest zgaszony, ale jak mam odpalic silnik w bmx...?
Wysłany: 2018-09-12, 16:05
Query
SyndicateMTA
Wiek: 24 Na forum: 3072 dni Posty: 319
Nick w MP: Query
Piwa : 5257
Z tej tabeli nie powinien si? znajdowa? id roweru. Sprawdzi?em i dzia?a wi?c wystarczy usun?? tylko id 462
Tagi: interakcja :: rowerow
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: