Crook4Money Posted September 2, 2017 Share Posted September 2, 2017 I'm trying to create a toll booth like script, but the marker isn't working with the object and I'm not getting any visible errors. I also don't know how to create a visible marker to check if it's even there. local gate1 = createObject(968, 1544.6999511719, -1623.9000244141, 13, 0, 89.1, 270) local marker1 = createMarker(1540.8000488281, -1627.4000244141, 12.303552627563, "corona",5,225,225,255,0) local marker2 = createMarker(1546.8000488281, -1627.1999511719, 12.303552627563, "corona",5,225,225,255,0) function moveToll(player) if player == localPlayer then return end if source == marker1 then moveObject(gate1, 2000, 968, 1544.6999511719, -1623.9000244141, 13, 0, 270) elseif source==marker2 then moveObject(gate1, 2000, 968, 1544.6999511719, -1623.9000244141, 13, 0, 270) end end addEventHandler("onClientMarkerHit", root, moveToll) Link to comment
WorthlessCynomys Posted September 2, 2017 Share Posted September 2, 2017 1 minute ago, Crook4Money said: local gate1 = createObject(968, 1544.6999511719, -1623.9000244141, 13, 0, 89.1, 270) local marker1 = createMarker(1540.8000488281, -1627.4000244141, 12.303552627563, "cylinder",5,225,225,255,0) local marker2 = createMarker(1546.8000488281, -1627.1999511719, 12.303552627563, "cylinder",5,225,225,255,0) -- Now the markers are visible function moveToll(player) -- The check that you made here... localPlayer is a client sided thing. I don't know if this script is clientsided. Also you said that if the player is the player then do not do a thing if source == marker1 then moveObject(gate1, 2000, 968, 1544.6999511719, -1623.9000244141, 13, 0, 270) elseif source==marker2 then moveObject(gate1, 2000, 968, 1544.6999511719, -1623.9000244141, 13, 0, 270) end end addEventHandler("onClientMarkerHit", root, moveToll) 1 Link to comment
Crook4Money Posted September 2, 2017 Author Share Posted September 2, 2017 (edited) Yeah, it was client sided. I realized that I had the object value in the "x" value by mistake. I added the local player and fixed the values, but the markers are still invisible. I got it to work anyways. I had a few values that were incorrect. Thanks for the help. Edited September 2, 2017 by Crook4Money Link to comment
WorthlessCynomys Posted September 2, 2017 Share Posted September 2, 2017 1 minute ago, Crook4Money said: Yeah, it was client sided. I realized that I had the object value in the "x" value by mistake. I added the local player and fixed the values, but the markers are still invisible. I got it to work anyways. I had a few values that were incorrect. Thanks for the help. The markers are invisible because when you define the color of them you have to use RGBA, which you did. you made your markers white, but defined their alpha 0. So they are completly transparent. Set the forth number to 255 and you'll see them. createMarker() 1 Link to comment
Crook4Money Posted September 2, 2017 Author Share Posted September 2, 2017 Thanks. I set it to one earlier and it didn't do anything. Idk why I didn't try another 255. Link to comment
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