Forrest Posted November 24, 2015 Posted November 24, 2015 (edited) Is there any way at all to check the material/ground of which a player is standing on? Ie; check if the player is standing on grass, or dirt? Thanks. Edited November 24, 2015 by Guest
DRW Posted November 24, 2015 Posted November 24, 2015 Is there any way at all to check the material/ground of which a player is standing on? Ie; check if the player is standing on grass, or dirt?Thanks. Well, I think so. Using processLineOfSight and setting it properly will return the name of the material you're standing on. It's pretty easy. Just set the returns like this: addEventHandler ("onClientRender",getRootElement(),function() local x,y,z = getElementPosition (localPlayer) hitX, hitY, hitZ, hitElement, normalX, normalY, normalZ, material = processLineOfSight (x,y,z,x,y,z-4,true,false,false,false,false,false,false,false,nil,true) outputChatBox (material) end) This will output to chatbox the material. Proud owner and developer of ZNEXT: Aftermath. Enter a post-apocalyptic San Andreas and fight over 30 types of enemies and bosses with varying difficulties and skills, improve and customize your character by leveling up, completing challenges and a solid lootbox system with no Pay-to-Win mechanics that will break your experience. Meet new characters, creatures and weapon metas, experience an innovative combo-based melee system, or join our solid PvP modes to show other survivors who’s boss. Español, Pусский, Türk, عربى, Polski, Português IP: mtasa://104.36.110.227:22003 - Discord: https://discord.gg/CxMxjvC5pB
DRW Posted November 24, 2015 Posted November 24, 2015 Beautiful, thanks buddy. No problem man , ah, also, please add a [sOLVED] tag on the post's title, so it could help other people. Proud owner and developer of ZNEXT: Aftermath. Enter a post-apocalyptic San Andreas and fight over 30 types of enemies and bosses with varying difficulties and skills, improve and customize your character by leveling up, completing challenges and a solid lootbox system with no Pay-to-Win mechanics that will break your experience. Meet new characters, creatures and weapon metas, experience an innovative combo-based melee system, or join our solid PvP modes to show other survivors who’s boss. Español, Pусский, Türk, عربى, Polski, Português IP: mtasa://104.36.110.227:22003 - Discord: https://discord.gg/CxMxjvC5pB
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