Scripting Posted February 26, 2012 Share Posted February 26, 2012 This a code to set can t fire another player but my problem he set another player and localPlayer can fire and don t set just localPlayer can fire ,fix problem and thx client-side: if getLocalPlayer () then toggleControl ( "fire", true ) else toggleControl ( "fire", false ) end Link to comment
MIKI785 Posted February 26, 2012 Share Posted February 26, 2012 Don't understand what you need... if getLocalPlayer () That will always pass, because getLocalPlayer has always value, so player can always fire. Link to comment
Scripting Posted February 26, 2012 Author Share Posted February 26, 2012 Ok,give me a another solution to fix that??! Link to comment
TAPL Posted February 26, 2012 Share Posted February 26, 2012 another solution for what!!! We don't understand what you're trying to do. Explain what you want so we can help you. Link to comment
Scripting Posted February 26, 2012 Author Share Posted February 26, 2012 addCommandHandler("unfire",root, function () toggleControl ( "fire", false ) end ) this a Command to set player can t fire, but if i use command me too i can t fire i want fix it and thanks Link to comment
TAPL Posted February 26, 2012 Share Posted February 26, 2012 addCommandHandler("unfire", function () toggleControl("fire", false) end) Link to comment
Kenix Posted February 26, 2012 Share Posted February 26, 2012 scripter_new,2 argument addCommandHandler is function ( not element ). Link to comment
Scripting Posted February 26, 2012 Author Share Posted February 26, 2012 How i can set just localPlayer used Command can fire!! addCommandHandler("unfire", function () toggleControl("fire", false) end) Link to comment
MIKI785 Posted February 26, 2012 Share Posted February 26, 2012 You're doing it client side.. it's LocalPlayer.. see wiki. Link to comment
Kenix Posted February 26, 2012 Share Posted February 26, 2012 scripter_new,What you need create? All players can't fire if you use /unfire ? or what Link to comment
TAPL Posted February 26, 2012 Share Posted February 26, 2012 dude it's client side while this means localPlayer ! if you want can fire then change false to true like this toggleControl("fire", true) Link to comment
Scripting Posted February 26, 2012 Author Share Posted February 26, 2012 All players can't fire if you use /unfire is true,you don't understand me if for exemple me i used /unfire me too can t fire; i want me a help set all player can t fire just me Link to comment
drk Posted February 26, 2012 Share Posted February 26, 2012 Server-side: addCommandHandler('unfire', function(thePlayer,cmd) toggleControl(thePlayer,"fire",true) end ) Or this ( type /fire to enable / disable fire ) local control = true addCommandHandler('fire', function(thePlayer,cmd) if control then toggleControl(thePlayer,'fire',false) control = false else toggleControl(thePlayer,'fire',true) control = true end end ) Link to comment
Kenix Posted February 26, 2012 Share Posted February 26, 2012 Server addCommandHandler( 'fire', function( thePlayer,cmd ) toggleControl( thePlayer,'fire',not isControlEnabled( thePlayer,'fire' ) ) end ) Link to comment
Scripting Posted February 26, 2012 Author Share Posted February 26, 2012 ok thx you for full heeeeeeeeeeeeeeelp verrrrrrrrrrrrrrrry thankssssssssss 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