Raised This Month: $ Target: $400
 0% 

[SNIPPET][CSS] Remove Player Stacking Limit


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
blodia
Veteran Member
Join Date: Sep 2009
Location: UK
Old 05-26-2010 , 14:00   [SNIPPET][CSS] Remove Player Stacking Limit
Reply With Quote #1

When css was first released you could stack on top of other players as high as you wanted. i remember having fun on zombie horde servers where the whole human team would find a spot and make a wall of players stacking up 4-5 players high side by side.

Then valve decided to limit how high you could stack, currently only 1 player can stand on top of another, if a 3rd player tries to stand on top of both players they will not be able to move and will slide off. this might be ok for regular css and some mods but for others it kind of ruins teamwork like most zombie mods.

you need sdkhooks

PHP Code:
#include <sourcemod>
#include <sdkhooks>

#pragma semicolon 1

public OnPluginStart()
{
    for (new 
client 1client <= MaxClientsclient++) 
    { 
        if (
IsClientInGame(client)) 
        { 
            
SDKHook(clientSDKHook_PostThinkOnPostThink);
        } 
    }
}

public 
OnClientPutInServer(client)
{
    
SDKHook(clientSDKHook_PostThinkOnPostThink);
}

public 
OnPostThink(client)
{
    new 
GroundEnt GetEntPropEnt(clientProp_Send"m_hGroundEntity");
    
    if ((
GroundEnt 0) && (GroundEnt <= MaxClients))
    {
        
SetEntPropEnt(clientProp_Send"m_hGroundEntity"0);
    }

m_hGroundEntity stores the entity the player is standing on, the game will check if its a player, if it is then it will check if that player is standing on a player. by setting m_hGroundEntity to 0 you're telling the game the player is standing on the ground(world entity) so you can stack as high as you want.

Last edited by blodia; 07-29-2010 at 15:10.
blodia is offline
 


Thread Tools
Display Modes

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 18:25.


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