montel Posted April 6, 2013 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 )
xXMADEXx Posted April 6, 2013 Posted April 6, 2013 when a player joins, you can use: setElementData and, for the get you can use: getElementData The Ultimate Lua Tutorial! | MTA PHP SDK
tosfera Posted April 6, 2013 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 If you want to contact me directly concerning Advanced-Gaming, please contact me at [email protected]
xXMADEXx Posted April 6, 2013 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... The Ultimate Lua Tutorial! | MTA PHP SDK
manawydan Posted April 6, 2013 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 ) "Querer não é poder, mas tentar é avançar"!
tosfera Posted April 6, 2013 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. If you want to contact me directly concerning Advanced-Gaming, please contact me at [email protected]
xXMADEXx Posted April 6, 2013 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. The Ultimate Lua Tutorial! | MTA PHP SDK
Mega9 Posted April 6, 2013 Posted April 6, 2013 I know how does it work. I just asked what author of this topic meant.
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