I am making a custom attack system and I swear I tested this before and it worked.
On my Movement 'weapon' I set a variable --- canmove = 1;
Pretty much this checks to see if the player is allowed to move
On my Attack 'weapon' the "canmove" is set to 0. Works
THEN I have a ScheduleEvent function that sets the 'canmove' to 1 again...but it doesn't set.
PHP Code:
//MOVEMENT SNIPPET
//#CLIENTSIDE
function onCreated()
{
canatk = 1;
canmove = 1;
canjump = 1;
disabledefmovement();
onTimeOut();
}
PHP Code:
//TEST WEAPON TO SET VARIABLES
//#CLIENTSIDE
function onKeyPressed(code, key)
{
if (key == "v")
{
setAni("sword", NULL);
canmove = 0;
scheduleEvent(1, "onUnfreeze");
}
}
function onUnfreeze(){
player.chat = "unfreeze";
client.canmove = 1;
}
Like I said, it will set it to 0, but wont return it to 1