Bloodbane
Well-known member
I'm trying to disable a button with this script but it doesn't work 
It didn't crash but nothing happened, jump key still works.
What is wrong with this script?
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?