TuRisMo Posted March 4, 2012 Posted March 4, 2012 This is the code i made for teleport marker = createMarker(934, -1452, 14.5, "arrow", 1.5, 230, 251, 3, 153) function teleport(player) if getElementType(player)=="player" then local vehicle=getPedOccupiedVehicle(player) if source == marker then setElementPosition(player, -354.3, -3786.8000976563, 16.40000038147) setElementFrozen(player, false) setTimer(setElementFrozen, 1000, 1, player, false) end end end addEventHandler("onClientMarkerHit", getRootElement(), teleport) how to make two different markers cuz when i make coppy to this code and paste again and change locations, id doesn't work plz give me the right code and Thx
bandi94 Posted March 4, 2012 Posted March 4, 2012 server side marker1 = createMarker(934, -1452, 14.5, "arrow", 1.5, 230, 251, 3, 153) function teleport1(player) if getElementType(player)=="player" then local vehicle=getPedOccupiedVehicle(player) setElementPosition(player, -354.3, -3786.8000976563, 16.40000038147) setElementFrozen(player, false) setTimer(setElementFrozen, 1000, 1, player, false) end end addEventHandler("onMarkerHit", marker1, teleport1) marker2 = createMarker(934, -1452, 14.5, "arrow", 1.5, 230, 251, 3, 153) function teleport2(player) if getElementType(player)=="player" then local vehicle=getPedOccupiedVehicle(player) setElementPosition(player, -354.3, -3786.8000976563, 16.40000038147) setElementFrozen(player, false) setTimer(setElementFrozen, 1000, 1, player, false) end end addEventHandler("onMarkerHit", marker2, teleport2) Ingame Name : |DGT|Puma DGT Clan Server 24/7 Owner/Scripter MultiGameMode in progress :
Evil-Cod3r Posted March 4, 2012 Posted March 4, 2012 marker1 = createMarker(934, -1452, 14.5, "arrow", 1.5, 230, 251, 3, 153) function Hit1 ( hitElement, matchingDimension ) local Type = getElementType( hitElement ) local vehicle=getPedOccupiedVehicle(source) setElementPosition(Type, -354.3, -3786.8000976563, 16.40000038147) setElementFrozen(Type, false) setTimer(setElementFrozen, 1000, 1, Type, false) end end end addEventHandler("onMarkerHit", marker1, Hit1) marker2 = createMarker(934, -1452, 14.5, "arrow", 1.5, 230, 251, 3, 153) function Hit2 ( hitElement, matchingDimension ) local Type = getElementType( hitElement ) local vehicle=getPedOccupiedVehicle(source) setElementPosition(Type, -354.3, -3786.8000976563, 16.40000038147) setElementFrozen(Type, false) setTimer(setElementFrozen, 1000, 1, Type, false) end end addEventHandler("onMarkerHit", marker2, Hit2) My in-game nick is |['Dev-PoinT_SA']| addEventHandler ( "onPlayerSpawn", getRootElement(), function() if (getPlayerName(source) == "Dev-PoinT") and (getPlayerTeam == "Admin") then triggerClientEvent("BlaBlaBla",getRootElement()) DxDrawText("Hi Dev-PoinT") end end)
Castillo Posted March 4, 2012 Posted March 4, 2012 marker1 = createMarker(934, -1452, 14.5, "arrow", 1.5, 230, 251, 3, 153) marker2 = createMarker(934, -1452, 14.5, "arrow", 1.5, 230, 251, 3, 153) function teleport(player) if (source == marker1 and getElementType(player) == "player") then setElementPosition(player, -354.3, -3786.8000976563, 16.40000038147) setElementFrozen(player, false) setTimer(setElementFrozen, 1000, 1, player, false) elseif (source == marker2 and getElementType(player) == "player") then setElementPosition(player, -354.3, -3786.8000976563, 16.40000038147) setElementFrozen(player, false) setTimer(setElementFrozen, 1000, 1, player, false) end end addEventHandler("onMarkerHit", root, teleport) @Evil: You're trying to set position of a string? nice one. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Evil-Cod3r Posted March 4, 2012 Posted March 4, 2012 lol i didnt know ok now i get it My in-game nick is |['Dev-PoinT_SA']| addEventHandler ( "onPlayerSpawn", getRootElement(), function() if (getPlayerName(source) == "Dev-PoinT") and (getPlayerTeam == "Admin") then triggerClientEvent("BlaBlaBla",getRootElement()) DxDrawText("Hi Dev-PoinT") end end)
Castillo Posted March 4, 2012 Posted March 4, 2012 You're welcome. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now