Jump to content

pls fix bug


Scripting

Recommended Posts

Posted

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 

Posted

another solution for what!!!

We don't understand what you're trying to do.

Explain what you want so we can help you.

Posted
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

Posted

dude it's client side while this means localPlayer !

if you want can fire then change false to true

like this

  
toggleControl("fire", true) 

Posted

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

Posted

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 
) 
  

Posted

Server

  
addCommandHandler( 'fire', 
    function( thePlayer,cmd ) 
        toggleControl( thePlayer,'fire',not isControlEnabled( thePlayer,'fire' ) ) 
    end 
) 
  

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...