![]() |
![]() |
#1 |
|
Been trying to get this to work, what am i doing wrong
Code:
local kicharge addHook("ThinkFrame", function(player) for player in players.iterate do if player.mo.skin ~= "songoku" then continue end if not (player.cmd.buttons & BT_CUSTOM1) and kimeter == 118 kicharge = false kitimer = 0 elseif kimeter < 118 kicharge = true kitimer = TICRATE*2 end end end) |
![]() |
![]() |
![]() |
#2 |
Call me Neon
|
A lot of this syntax is hard for me to understand, but many errors are present, first of all flag tables like cmd.buttons, are a series of bits, if you want to check for the buttons being pressed you should use this;
Code:
if player.cmd.buttons == player.cmd.buttons | BT_JUMP then ---------- Post added at 10:14 PM ---------- Previous post was at 10:12 PM ---------- Oh yea kicharge is outside the playerthink hook and is a local, so it's effective accross all players, and the first instruction with ktimer is to check it for something that isn't nil |
![]() |
![]() |
![]() |
#3 |
|
Thanks I'll get back to you if it works
|
![]() |
![]() |
![]() |
#4 |
|
Never mind it works now
Last edited by Pizza; 3 Days Ago at 01:50 AM. |
![]() |
![]() |
![]() |
Thread Tools | Search this Thread |
|
|