Guten Tag Community,
ich habe ein Problem. Ich habe zwei Schranken erstellt um auf ein gelände zu kommen. Nun habe ich das Problem das wenn ich daduchfahr mein Kollege auch die Outputchat box bekommt und das Geld abgezogen bekommt. Kann mir wer da helfen ?
Lua
local FestivalIn = createObject(968,-1988.6999511719,-1019.200012207,32.099998474121,0,90,0) -- zu
local FestivalInMarker=createMarker(-1984.1999511719,-1024.0999755859,32,"cylinder",4,0,0,0,0)
local FestivalInMarker2=createMarker(-1984.3000488281,-1014.299987793,32,"cylinder",4,0,0,0,0)
function FestivalInAuf(hitElement)
if isplayerVehicle (thePlayer) then
if getElementType(hitElement) == "thePlayer" then
if isOnDuty(player) or isMedic(player) then
outputChatBox("Du bist im Dienst und musst nix bezahlen!", thePlayer, 0, 175, 0)
moveObject(FestivalIn,2000,-1988.6999511719,-1019.200012207,34.5, 0, 0, 0,"InOutQuad") -- auf
elseif vioGetElementData ( thePlayer, "money") >= 500 then
vioSetElementData ( thePlayer, "money", vioGetElementData ( thePlayer, "money" ) -500 )
outputChatBox("Du hast 500$ Eintritt bezahlt, Viel Spaß!", thePlayer, 0, 175, 0)
moveObject(FestivalIn,2000,-1988.6999511719,-1019.200012207,34.5, 0, 0, 0,"InOutQuad") -- auf
else
outputChatBox("Du hast keine 500$!", thePlayer, 175, 0, 0)
end
end
end
end
addEventHandler("onMarkerHit",FestivalInMarker,FestivalInAuf)
function FestivalInZu(hitElement)
if getElementType(hitElement) == "thePlayer" then
moveObject(FestivalIn,2000,-1988.6999511719,-1019.200012207,32.099998474121, 0, 0, 0,"InOutQuad") -- zu
end
end
addEventHandler("onMarkerHit",FestivalInMarker2,FestivalInZu)
------------------Festival Out--------------------------
local FestivalOut = createObject(968,-1986.0999755859,-1019.299987793,32.099998474121,0,90,180) -- zu
local FestivalOutMarker=createMarker(-1991.0999511719,-1015.4000244141,32,"cylinder",4,0,0,0,0)
local FestivalOutMarker2=createMarker(-1991.0999755859,-1029.5,32,"cylinder",4,0,0,0,0)
function FestivalOutAuf(hitElement)
if getElementType(hitElement) == "thePlayer" then
if isthePlayerInVehicle (thePlayer) then
moveObject(FestivalOut,2000,-1986.0999755859,-1019.299987793,34.5,0,0,0,"InOutQuad")
outputChatBox("Vielen Dank für deinen Besuch!", thePlayer, 0, 175, 0)
end
end
end
addEventHandler("onMarkerHit",FestivalOutMarker,FestivalOutAuf)
function FestivalOutZu(hitElement)
if getElementType(hitElement) == "thePlayer" then
moveObject(FestivalOut,2000,-1986.0999755859,-1019.299987793,32.099998474121,0,0,0,"InOutQuad") -- auf
end
end
addEventHandler("onMarkerHit",FestivalOutMarker2,FestivalOutZu)
Alles anzeigen