Lua
local vehicle = createVehicle( 504, 1010.939453125,1210.0639648438,12,10,0,0,90 )
function enterVehicle ( hitPlayer, seat, jacked )
if getElementType( hitPlayer ) == "player" then
blib = createBlip ( 1000.37200927734,1210.2487792969,10, 30, 3, 0, 0, 255, 255, 50, hitPlayer )
marker = createMarker( 1000.06463623047,1210.2487792969,10,"cylinder",8,255,255,0, hitPlayer )
outputChatBox ( ""..getPlayerName(hitPlayer).." have found the Money Car!" )
outputChatBox ( "You have found the Money Car!", hitPlayer )
end
end
addEventHandler ( "onVehicleEnter", vehicle, enterVehicle )
function finish ( hitPlayer )
if getElementType( hitPlayer ) == "player" then
outputChatBox ( "The Mission was complete!", hitPlayer )
removePedFromVehicle ( hitPlayer )
destroyElement ( marker )
destroyElement ( vehicle )
destroyElement ( blib )
givePlayerMoney ( hitPlayer, 10000 )
local vehicle = createVehicle( 504, 1010.939453125,1210.0639648438,12,10,0,0,90 )
end
end
addEventHandler ( "onMarkerHit", getRootElement() , finish )
Alles anzeigen
Mein Problem ist wenn ich das erste Auto nehme und dann in den Marker fahre ist Bilb,Marker und Auto weg nur jetzt spawnt das auto ja auch neu aber wenn ich einsteige kommt der Bilb und der Marker nicht.