Raised This Month: $51 Target: $400
 12% 

[CSS] Does not work multijump


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
artist
Member
Join Date: Nov 2013
Old 06-25-2016 , 12:19   [CSS] Does not work multijump
Reply With Quote #1

Function OnPlayerRunCmd - not caused.

Code:
//#include <sourcemod>
#include <sdktools>

new g_iJumps[MAXPLAYERS+1]
new g_fLastButtons[MAXPLAYERS+1]
new g_fLastFlags[MAXPLAYERS+1]
new g_iJumpMax = 1

public Action:OnPlayerRunCmd(client)
{
	new fCurFlags = GetEntityFlags(client), fCurButtons = GetClientButtons(client)
	
	PrintToChat(client, "Active functions!")
	
	if(g_fLastFlags[client] & FL_ONGROUND)
	{
		if(!(fCurFlags & FL_ONGROUND) && !(g_fLastButtons[client] & IN_JUMP) && fCurButtons & IN_JUMP)
		{
			g_iJumps[client]++
		}
	}
	else if(fCurFlags & FL_ONGROUND) g_iJumps[client] = 0
	else if(!(g_fLastButtons[client] & IN_JUMP) && fCurButtons & IN_JUMP)
	{
		if( 1 <= g_iJumps[client] <= g_iJumpMax)
		{
			g_iJumps[client]++
			decl Float:vVel[3]
			GetEntPropVector(client, Prop_Data, "m_vecVelocity", vVel)
			vVel[2] = 250.0
			TeleportEntity(client, NULL_VECTOR, NULL_VECTOR, vVel)
		}
	}
	g_fLastFlags[client] = fCurFlags
	g_fLastButtons[client] = fCurButtons
}
meta list
Quote:
Listing 2 plugins:
[01] SourceMod (1.8.0.5915) by AlliedModders LLC
[03] SDK Tools (1.8.0.5915) by AlliedModders LLC
sm plugins list
Quote:
[SM] Listing 1 plugin:
01 "multijump.smx"
No errors to logs...

Last edited by artist; 06-25-2016 at 12:25.
artist 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 04:29.


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