ehm eine Frage ?
warum funtzt das nicht ?
der erste Checkpoint erscheint zwar aber wenn er durch fährt passiert nichts..
Lua
--busse ids
busid = { [437]=true }
--Busfahrer Zone
buspoint = createColSphere ( 1211.5759277344, -1750.0367431641, 12.594135284424, 5 )
function busjob(player,command)
if getElementData ( player, "Job" ) ~= 0 then
outputChatBox("Du hast bereits einen Job!", player, 255,0,0)
else
if ( isElementWithinColShape ( player, buspoint) ) then
setElementData(player, "Job", 8)
outputChatBox("Du bist nun Nusfahrer", player,0,255,0)
end
end
end
addCommandHandler("job", busjob)
function checkbusDriver ( thePlayer, seat, jacked )
local seat = getPedOccupiedVehicleSeat ( thePlayer )
if ( busid[getElementModel(source)] ) and ( seat == 0 ) then
if ( getElementData ( thePlayer, "Job" ) ~= 8 ) then
removePedFromVehicle ( thePlayer )
outputChatBox ( "Du bist kein Busfahrer!", thePlayer )
else
outputChatBox ( "Nächster halt Los Santos Stadthalle!", thePlayer )
busmarker1 = createMarker ( 1661.4858398438, -1734.9073486328, 12.3828125, "cylinder", 4, 255, 0, 0, 255, thePlayer )
end
end
end
addEventHandler ( "onVehicleEnter", getRootElement(), checkbusDriver )
function busstation1( hitplayer ) -- define MarkerHit function for the handler
busmarker2 = createMarker ( 2145.0534667969, -1754.7033691406, 12.393218994141, "cylinder", 4, 255, 0, 0, 255, hitplayer )
outputChatBox ( "Nächster halt Groove Pizza!", hitplayer )
end
addEventHandler( "onMarkerHit", busmarker1, busstation1 ) -- attach onMarkerHit event to MarkerHit function
function busstation2( hitplayer) -- define MarkerHit function for the handler
busmarker3 = createMarker ( 2030.3455810547, -1467.1174316406, 14.985424995422, "cylinder", 4, 255, 0, 0, 255, hitplayer )
outputChatBox ( "Nächster halt Los Santos Medical Center!", hitplayer )
end
addEventHandler( "onMarkerHit", busmarker2, busstation2 ) -- attach onMarkerHit event to MarkerHit function
function busstation3( hitplayer ) -- define MarkerHit function for the handler
busmarker4 = createMarker ( 2355.5546875, -1734.8107910156, 12.3828125, "cylinder", 4, 255, 0, 0, 255, hitplayer )
outputChatBox ( "Nächster halt Groove Pizza!", hitplayer )
end
addEventHandler( "onMarkerHit", busmarker3, busstation3 ) -- attach onMarkerHit event to MarkerHit function
function busstation4( hitplayer ) -- define MarkerHit function for the handler
busmarker5 = createMarker ( 2284.9350585938, -1749.4235839844, 12.3828125, "cylinder", 4, 255, 0, 0, 255, hitplayer )
outputChatBox ( "Nächster halt Groove Pizza!", hitplayer )
end
addEventHandler( "onMarkerHit", busmarker4, busstation4 ) -- attach onMarkerHit event to MarkerHit function
function busstation5( hitplayer ) -- define MarkerHit function for the handler
busmarker6 = createMarker ( 2156.9970703125, -1749.4732666016, 12.381184577942, "cylinder", 4, 255, 0, 0, 255, hitplayer )
outputChatBox ( "Nächster halt Groove Pizza!", hitplayer )
end
addEventHandler( "onMarkerHit", busmarker5, busstation5 ) -- attach onMarkerHit event to MarkerHit function
function busstation6( hitplayer ) -- define MarkerHit function for the handler
busmarker7 = createMarker ( 1650.9818115234, -1729.7879638672, 12.3828125, "cylinder", 4, 255, 0, 0, 255, hitplayer )
outputChatBox ( "Nächster halt Groove Pizza!", hitplayer )
end
addEventHandler( "onMarkerHit", busmarker6, busstation6 ) -- attach onMarkerHit event to MarkerHit function
function busstation7( hitplayer ) -- define MarkerHit function for the handler
busmarker8 = createMarker ( 1650.9818115234, -1729.7879638672, 12.3828125, "cylinder", 4, 255, 0, 0, 255, hitplayer )
outputChatBox ( "Nächster halt Groove Pizza!", hitplayer )
end
addEventHandler( "onMarkerHit", busmarker7, busstation7 ) -- attach onMarkerHit event to MarkerHit function
function busstation8( hitplayer ) -- define MarkerHit function for the handler
busmarker9 = createMarker ( 1182.3114013672, -1714.2890625, 12.50975227356, "cylinder", 4, 255, 0, 0, 255, hitplayer )
outputChatBox ( "Nächster halt Groove Pizza!", hitplayer )
end
addEventHandler( "onMarkerHit", busmarker8, busstation8 ) -- attach onMarkerHit event to MarkerHit function
function busstation9( hitplayer ) -- define MarkerHit function for the handler
outputChatBox ( "Du hast es erfolgreich geschafft!", hitplayer )
end
addEventHandler( "onMarkerHit", busmarker9, busstation9 ) -- attach onMarkerHit event to MarkerHit function
Alles anzeigen