montel Posted April 6, 2013 Share Posted April 6, 2013 Zombies don't open the door.How to do ? local gate1 = createObject(980, 2493.5, 2350.6001, 12.6, 0, 0, 0) local marker = createMarker(2493.5, 2350.6001, 10, "cylinder", 6, 0, 0, 0, 0 ) function moveGate(hitPlayer, matchingDimension) moveObject(gate1, 2000, 2493.5, 2350.6001, 17.6) end addEventHandler("onMarkerHit", marker, moveGate) function moveBack() moveObject(gate1, 2000, 2493.5, 2350.6001, 12.6) end addEventHandler( "onMarkerLeave", marker, moveBack ) Link to comment
FraN-724 Posted April 6, 2013 Share Posted April 6, 2013 You can ban skins with getElementModel Link to comment
xXMADEXx Posted April 6, 2013 Share Posted April 6, 2013 when a player joins, you can use: setElementData and, for the get you can use: getElementData Link to comment
tosfera Posted April 6, 2013 Share Posted April 6, 2013 when a player joins, you can use: setElementData and, for the get you can use: getElementData Why the hell,,, you want to set data to each player just to check if its a zombie or not? Zombies most likely have a skin, like the hobo one or something. If thats true in his situation, just let him check the skin and see if its a zombie or not. Way faster and a cleaner code. :3 Link to comment
xXMADEXx Posted April 6, 2013 Share Posted April 6, 2013 when a player joins, you can use: setElementData and, for the get you can use: getElementData Why the hell,,, you want to set data to each player just to check if its a zombie or not? Zombies most likely have a skin, like the hobo one or something. If thats true in his situation, just let him check the skin and see if its a zombie or not. Way faster and a cleaner code. :3 Zombies can have any skin that there scripted for, and this code isn't really messy... Link to comment
manawydan Posted April 6, 2013 Share Posted April 6, 2013 try local gate1 = createObject(980, 2493.5, 2350.6001, 12.6, 0, 0, 0) local marker = createMarker(2493.5, 2350.6001, 10, "cylinder", 6, 0, 0, 0, 0 ) function moveGate(hitPlayer, matchingDimension) if getElementType ( hitPlayer ) == "player" then moveObject(gate1, 2000, 2493.5, 2350.6001, 17.6) end end addEventHandler("onMarkerHit", marker, moveGate) function moveBack(hitPlayer, matchingDimension) if getElementType ( hitPlayer ) == "player" then moveObject(gate1, 2000, 2493.5, 2350.6001, 12.6) end end addEventHandler( "onMarkerLeave", marker, moveBack ) Link to comment
tosfera Posted April 6, 2013 Share Posted April 6, 2013 when a player joins, you can use: setElementData and, for the get you can use: getElementData Why the hell,,, you want to set data to each player just to check if its a zombie or not? Zombies most likely have a skin, like the hobo one or something. If thats true in his situation, just let him check the skin and see if its a zombie or not. Way faster and a cleaner code. :3 Zombies can have any skin that there scripted for, and this code isn't really messy... Thats true, but most likely they have one skin. IF they dont, your idea is the best way to solve it. but if they do, its just a matter of getElementModel. Link to comment
Mega9 Posted April 6, 2013 Share Posted April 6, 2013 Are zombies supposed to open gates or not? Link to comment
xXMADEXx Posted April 6, 2013 Share Posted April 6, 2013 Are zombies supposed to open gates or not? It depends, if its scripted so they don't open gates, then they won't, but if there is no protection in the script, they will be able to open the gate. Link to comment
Mega9 Posted April 6, 2013 Share Posted April 6, 2013 I know how does it work. I just asked what author of this topic meant. Link to comment
montel Posted April 6, 2013 Author Share Posted April 6, 2013 Thank You {RoG}xXMADEXx.Worked 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