Hello MTA Community,
i have a Problem with onMarkerHit
Here the code:
AdminbaseAllowedNames={
["Lorenzo"]=true,}
GoInAdminbaseMarker=createMarker(-2039.7,216.6,34.8,"cylinder",2,255,125,0,140)
function TeleportInAdminbase_Func(player)
if AdminbaseAllowedNames[getPlayerName(player)]then
if isElementWithinMarker(player,GoInAdminbaseMarker)then
if getPedOccupiedVehicle(player)==true then
setElementFrozen(player,true)
setTimer(setElementFrozen,200,1,player,false)
setElementPosition(player,-2023.3,295.7,895)
else
setElementPosition(player,-2023.3,295.7,894.6)
end
end
else
outputChatBox("You dont have permissions!",player,255,0,0)
end
end
addEventHandler("onMarkerHit",GoInAdminbaseMarker,TeleportInAdminbase_Func)
if a player in vehicle then a problem with: if AdminbaseAllowedNames[getPlayerName(player)]then