Raised This Month: $ Target: $400
 0% 

Triggering the +alt1 command for TS then...


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
mysticssjgoku4
Veteran Member
Join Date: Jan 2005
Location: Chicago Heights, IL
Old 08-17-2005 , 21:28   Triggering the +alt1 command for TS then...
Reply With Quote #1

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
}
__________________

mysticssjgoku4 is offline
Send a message via AIM to mysticssjgoku4 Send a message via MSN to mysticssjgoku4
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 08-17-2005 , 23:06  
Reply With Quote #2

The ~IN_ALT1 prevents them from tricking.
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 19:23.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode