Ok, I made a restrain mod plugin, and I was wondering, what small piece of code would i need to make the user do the forward dive, and disable it after that.
This is part of the code I'm using from Harbu, It disables the use button, jump, croutch, i think that's it.
I want it to trigger the player to use the stunt button, then disable it, that way they are actually, "On the ground" and can't get up.
Then once I disable it, I want this to trigger it again, that way they get up.
Code:
public client_PreThink(id)
{
if(res[id] == 1)
{
new bufferstop = entity_get_int(id,EV_INT_button)
if(bufferstop != 0) {
entity_set_int(id,EV_INT_button,bufferstop & ~IN_ATTACK & ~IN_ATTACK2 & ~IN_ALT1 & ~IN_USE)
}
if((bufferstop & IN_JUMP) && (entity_get_int(id,EV_INT_flags) & ~FL_ONGROUND & ~FL_DUCKING)) {
entity_set_int(id,EV_INT_button,entity_get_int(id,EV_INT_button) & ~IN_JUMP)
}
return PLUGIN_CONTINUE
}
return PLUGIN_CONTINUE
}
__________________