Zaloguj się by uzyskać pełen dostęp. Nie masz jeszcze konta? Założ je już teraz w kilka sekund.
GTAONLINE.PL
Tematy otagowane jako: wleci
1. Wiadomość gdy pociąg wleci w marker
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 )