Bullyn Posted May 31, 2020 Share Posted May 31, 2020 local isClipping = true addCommandHandler( "noclip", function( ) if not localPlayer:getData("aduty") then return end isClipping = not isClipping localPlayer.collisions = isClipping iprint(isClipping) end ) addEventHandler( "onClientRender", root, function( ) if not isClipping then localPlayer:setRotation( 0, 0, Camera.matrix.rotation.z ) local lm, dir, speed = localPlayer.matrix, Vector3(), getControlState( "jump" ) and 4 or getKeyState( "lalt" ) and .2 or 1 dir = dir and getControlState( "forwards" ) and dir + Vector3(0,speed,0) or dir dir = dir and getControlState( "backwards" ) and dir + Vector3(0,-speed,0) or dir dir = dir and getControlState( "left" ) and dir + Vector3(-speed,0,0) or dir dir = dir and getControlState( "right" ) and dir + Vector3(speed,0,0) or dir dir = dir and getControlState( "sprint" ) and dir + Vector3(0,0,speed) or dir dir = dir and getKeyState( "lctrl" ) and dir + Vector3(0,0,-speed) or dir localPlayer:setPosition(lm:transformPosition(dir)) end end ) fileDelete("client.Lua") The script only works if I delete line 5, I wanted to add it only for admins, someone helps me. Helppp Link to comment
MrKAREEM Posted May 31, 2020 Share Posted May 31, 2020 I don’t know what this line means, but you’re supposed to know if not localPlayer:getData("aduty") then return end but if u want to add it to admins only so u can use these IsObjectInACLGroup or HasObjectPermissionTo Link to comment
Bullyn Posted May 31, 2020 Author Share Posted May 31, 2020 (edited) 1 hour ago, MrKAREEM said: I don’t know what this line means, but you’re supposed to know if not localPlayer:getData("aduty") then return end but if u want to add it to admins only so u can use these IsObjectInACLGroup or HasObjectPermissionTo But these variables are from server, the resource is client Could you try to fix it for me? please. Edited May 31, 2020 by Baguera Link to comment
DNL291 Posted May 31, 2020 Share Posted May 31, 2020 Moved. @Baguera Next time remember to post in Scripting section: https://forum.multitheftauto.com/forum/71-scripting/ 1 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