Wysłany: 2020-11-28, 10:09
k1nG
grove street home
Wiek: 26 Na forum: 3557 dni Posty: 29
Nick w MP: Trust / Tiffergan
Piwa : 12
Siemka, a wi?c mam sobie tak? spraw?, ?e mam poci?g kt?ry samoistnie je?dzi sobie po mapie uczywaj?c setStreamable, ale chce zrobi? co? takiego, ?e jak poci?g wjedzie w Marker to na chacie wyskoczy mi ?adny komunikat o tym, ?e poci?g wjecha? w marker pr?bowa?em zrobi? co? takiego
Kod:
function enter ( targetElem, matchingDimension )
if getElementModel(targetElem) == 537 then
outputChatBox ( "Train Stopped", root, 255, 255, 109 )
end
end
addEventHandler ( "onMarkerHit", marker, enter )
]]
Aczkolwiek komunikat wyskoczy mi tylko jak JA kieruje poci?giem, ale nie chodzzi mi o to, komunikat ma wyskakiwa? gdy poci?g jedzie sam z siebie, bo tak jest... zrobi?em te? co? takiego, ale to r?wnie? nie dzia?a
B??d?w w DB3 nie ma
Kod: function isVehicleEmpty( vehicle )
if not isElement( vehicle ) or getElementType( vehicle ) ~= "vehicle" then
return true
end
if getVehicleOccupant( vehicle, 0 ) then
return false
end
return true
end
function enter ( targetElem, matchingDimension )
if isVehicleEmpty(targetElem) == true and getElementModel(targetElem) == 537 then
outputChatBox ( "Train Stopped", root, 255, 255, 109 )
end
end
addEventHandler ( "onMarkerHit", marker, enter )
Wysłany: 2020-11-29, 21:25
VVirmex
Sgrypter luja
Wiek: 21 Na forum: 3365 dni Posty: 281
Nick w MP: AxyZ
Piwa : 234
Nast?pnym razem kod wklejaj w [.lua] [/lua]
A co do kodu - zrobi?bym co? takiego:
function isVehicleEmpty ( vehicle )
if not isElement ( vehicle ) or getElementType ( vehicle ) ~= "vehicle" then
return false
end
if getVehicleOccupant ( vehicle , 0 ) then
return false
end
return outputChatBox ( "Train Stopped" , root , 255 , 255 , 109 )
end
function enter ( targetElem , matchingDimension )
if getElementModel ( targetElem ) == 537 then
isVehicleEmpty ( targetElem )
end
end
addEventHandler ( "onMarkerHit" , marker , enter )
Wysłany: 2020-11-30, 13:57
k1nG
grove street home
Wiek: 26 Na forum: 3557 dni Posty: 29
Nick w MP: Trust / Tiffergan
Piwa : 12
"Johy*" napisał/a :Nie zrobisz tego
Dlaczego s?yszalem od ludzi, ?e da si? to zrobi? ale na poci?gach si? troch? buguj? i jest trudne ale do zrobienia :f
[ Dodano : 2020-11-30, 14:32 ]
"VVirmex" napisał/a :Nast?pnym razem kod wklejaj w [.lua] [/lua]
A co do kodu - zrobi?bym co? takiego:
function isVehicleEmpty ( vehicle )
if not isElement ( vehicle ) or getElementType ( vehicle ) ~= "vehicle" then
return false
end
if getVehicleOccupant ( vehicle , 0 ) then
return false
end
return outputChatBox ( "Train Stopped" , root , 255 , 255 , 109 )
end
function enter ( targetElem , matchingDimension )
if getElementModel ( targetElem ) == 537 then
isVehicleEmpty ( targetElem )
end
end
addEventHandler ( "onMarkerHit" , marker , enter )
Tw?j kod nie dzia?a b??d?w nie ma, ale nic na chacie nie wyskakuje jak poci?g przeje?d?a przez marker.
Tagi: wiadomość :: gdy :: pociąg :: wleci :: marker
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: