Disable certain button?

Bloodbane

Well-known member
I'm trying to disable a button with this script but it doesn't work :(

void main(){

// get variables ready
int player = getlocalvar("player");
void self = getplayerproperty(player, "ent");
int animation = getentityproperty(self, "animationid");
float a = getentityproperty(self, "a");
float base = getentityproperty(self, "base");
int playkeys = getplayerproperty(player, "playkeys");
int jumpflag = 0;

if(playerkeys(player, 1, "jump")){
jumpflag = openborconstant("FLAG_JUMP");
if(animation == openborconstant("ANI_IDLE") || animation == openborconstant("ANI_RUN")){
setidle(self);
}
else if(animation != openborconstant("ANI_JUMP"))
jumpflag = 0;
}
changeplayerproperty(player, "playkeys", playkeys - jumpflag);
}

It didn't crash but nothing happened, jump key still works.
What is wrong with this script?
 
Orochi_X posted this long time ago in Lavalit forum. This seems like keyscript.

Anyways, I forgot to explain, actually I copied some functions from this script to disable certain button like this:

@script
  int playkeys = getplayerproperty(0, "playkeys");
  int jumpflag = openborconstant("FLAG_JUMP");

changeplayerproperty(0, "playkeys", playkeys - jumpflag);
@end_script

  This modified script doesn't work also :(.

Anyways, regardless of this, is there other way to disable button with script? I need to disable start button temporary with script to prevent other player from joining.
 
Actually ai update is before animation update, so it won't work if you use that in animation script.

If you can, maybe you can check nojoin/canjoin command, e.g., if it is a cut scene.

=======

Edit*

It seems canjoin command is broken, I'll try bring it back lately.

 
Back
Top Bottom