Parazitas Posted August 5, 2018 Share Posted August 5, 2018 (edited) Hello guys, im stuck again in scripting.. I need to make script: then player in dimension 1 he can't take any damage but idk how to check player dimension in script.. maybe some help?addEventHandler ( "onClientPlayerDamage", getRootElement(), function() cancelEvent() end ) Edited August 5, 2018 by Parazitas Link to comment
SycroX Posted August 5, 2018 Share Posted August 5, 2018 addEventHandler("onClientPlayerDamage", root, function() if source == localPlayer and getElementDimension(source) == 1 then cancelEvent() end end ) Link to comment
Parazitas Posted August 5, 2018 Author Share Posted August 5, 2018 Lol.. so easy.. I tried write this script about 3 hours.. Link to comment
SycroX Posted August 5, 2018 Share Posted August 5, 2018 (edited) 45 minutes ago, Parazitas said: Lol.. so easy.. I tried write this script about 3 hours.. LUA is an easy language to learn it wont take a lot of time to learn it + there's a multitheftauto.wiki it will be very helpful for you and i suggest to look there first before asking here Edited August 5, 2018 by #َxLysandeR Link to comment
Parazitas Posted August 5, 2018 Author Share Posted August 5, 2018 I know that.. but I started write script (not edit ) about few weeks ago.. I have tons of ideas but it's preaty hard even with multitheftauto.wiki like one script.. I saw can replate ipf files I wanna make script load ipf with command.. like: write /parkour and load parkour.ipf on player. and with command /back remove ipf tried but.. nothing.. function parkour ( commandName ) local customBlockName = "myNewBlock" local IFP = engineLoadIFP( localPlayer, "parkour.ifp", parkour ) setPedAnimation( localPlayer, parkour ) end addCommandHandler ( "parkour", parkour ) 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