• Help for ConCommand
    9 replies, posted
Hello I have a french Star Wars server and i would like the add a new saber force power for destabilized the target (sorry for my english) I want to invert/reverse move key for 10 secondes you jnow for 10 secondes forward key = back key etc... and i maked this code local devant   = self.Owner:KeyPressed( IN_FORWARD ) local derriere = self.Owner:KeyPressed( IN_BACK ) local gauche   = self.Owner:KeyPressed( IN_MOVELEFT ) local droite   = self.Owner:KeyPressed( IN_MOVERIGHT ) self.Owner:print(devant) self.Owner:ConCommand("bind" .. devant .. "+back") self.Owner:ConCommand("bind" .. derriere .. "+forward") self.Owner:ConCommand("bind" .. gauche .. "+moveright") self.Owner:ConCommand("bind" .. droite .. "+moveleft") local time = 10 timer.Create( "star_destabilisation", time , 1, function()  self.Owner:ConCommand("bind" .. devant .. "+forward") self.Owner:ConCommand("bind" .. derriere .. "+back") self.Owner:ConCommand("bind" .. gauche .. "+moveleft") self.Owner:ConCommand("bind" .. droite .. "+moveright") end ) But the problem is ConCommand for bind is blocked :/ so my code doesn't work, do you have any solution for do this force power ? Thx Jedi !
GM/SetupMove use this instead
Can you pls make an exemple to invert the forward to back ? i'm not very good in lua x) sorry
i will try this guys , thx for the help
I did not succeed despite the help guys :/
What do you have so far?
Nothing , i just success to player jump if key press is move key
So you asked for help, got some help, did nothing, then bumped and asked for more help despite not doing anything yourself?
i tried with a friend to use the setupmove, invert forward to back but player steal running forward like the exemple in the wiki i try to do that local CMoveData = FindMetaTable( "CMoveData" ) function CMoveData:RemoveKeys( keys ) local newbuttons = bit.band( self:GetButtons(), bit.bnot( keys ) ) self:SetButtons( newbuttons ) end hook.Add( "SetupMove", "TEST", function( ply, mvd, cmd ) if mvd:KeyDown( IN_FORWARD ) then mvd:AddKeys( IN_BACK ) end end ) i tried some issu like remove forward but not success , so yes i try to do something.
Sorry, you need to Log In to post a reply to this thread.