A jak mam zrobi? tak ?e, jak gracz siedzi w pojezdzie to ma si? pojawi? mu text???
function cos_tam (el)
if isPedInVehicle (el) then
outputChatBox ("Jeste? w aucie xD", el)
else
ohtputChatBox ("Nie ma cie w aucie xD", el)
end
end
addEventHandler ("onMarkerHit", getRootElement (), cos_tam)
O co? takiego ci chodzi?o?
W eventHandlerze zmien getRoota na defibicje markera
Nie. Chem zrobi? co? takiego ?e jak wejde w marker to ?e mi si? pojawi"" jeste? bez auta"" i gui a jak wjad? pojazdem ""jeste? w aucie""i gui ma nie by?. A ten tw kod nie dzia?.
Nie. Chem zrobi? co? takiego ?e jak wejde w marker to ?e mi si? pojawi"" jeste? bez auta"" i gui a jak wjad? pojazdem ""jeste? w aucie""i gui ma nie by?. A ten tw kod nie dzia?.
Szczerze m?wi?c to nie mia? dzia?a?. Da?em przyk?ad u?ycia IF.
To mo?e spr?buj czego? na wz?r tego:
function pokaz (source)
if not isPedInVehicle (source) then
guiSetVisible (nazwa_tego_gui, true)
outputChatBox ("Jeste? bez auta")
else
outputChatBox ("Jeste? w aucie, wysi?d? z niego!")
end
end
addEventHandler ("onMarkerHit", jakis_tam_marker, pokaz)
addEventHandler ("onClientResourceStart", getResourceRootElement(getThisResource()),
function qwerty
createMarker ( -725.2596, 969.4474, 11.2028 ,"cylinder", 6, 0, 102, 255, 170 )
end
)
function pokaz (source)
if not isPedInVehicle (source) then
--guiSetVisible (nazwa_tego_gui, true)
outputChatBox ("Jeste? bez auta")
else
outputChatBox ("Jeste? w aucie, wysi?d? z niego!")
end
end
addEventHandler ("onMarkerHit", qwerty, pokaz)
mk1 = createMarker ( -725.2596, 969.4474, 11.2028 ,"cylinder", 6, 0, 102, 255, 170 )
function MarkerHit (hitElement, md)
if not md then return end
if source ~= mk1 then return end
if getElementType(hitElement) == "player" then
if isPedInVehicle(hitElement) then
outputChatBox("Jeste? w poje?dzie")
else
outputChatBox("Nie jeste? w poje?dzie")
end
end
end
addEventHandler ( "onClientMarkerHit", getRootElement(), MarkerHit )
[00:10] restart: Requested by Console
[00:10] restart: Resource restarting...
[00:10] Stopping r
[00:10] Resource 'r' changed, reloading and starting
[00:10] WARNING: r/c-r.lua [Client] is encoded in ANSI instead of UTF-8. Please convert your file to UTF-8.
[00:10] Some files in 'r' use deprecated functions.
[00:10] Use the 'upgrade' command to perform a basic upgrade of resources.
[00:10] Starting r
[00:10] r restarted successfully
Nie możesz pisać nowych tematów Nie możesz odpowiadać w tematach Nie możesz zmieniać swoich postów Nie możesz usuwać swoich postów Nie możesz głosować w ankietach