View Single Post
quilhos
Veteran Member
Join Date: Jun 2010
Old 09-28-2016 , 13:21   Re: Furien Mod - Need help converting it to CS GO
Reply With Quote #4

I completely forgot to post the wallhang script:

PHP Code:
public OnGameFrame()
{
    
//Declare:
    
decl MaxPlayers;

    
//Initialize:
    
MaxPlayers GetMaxClients();

    
//Loop:
    
for(new 1MaxPlayersX++)
    {
        
//Connected:
        
if(IsClientInGame(X) && GetClientTeam(X) == 2)
        {
            
//Alive:
            
if(IsPlayerAlive(X))
            {
                if(
g_Trepar[X])
                {
                    
//Wall?
                    
new bool:NearWall false;

                    
//Circle:
                    
for(new AngleRotate 0AngleRotate 360AngleRotate += 30)
                    {

                        
//Declare:
                        
decl Handle:TraceRay;
                        
decl Float:StartOrigin[3], Float:Angles[3];

                        
//Initialize:
                        
Angles[0] = 0.0;
                        
Angles[2] = 0.0;
                        
Angles[1] = float(AngleRotate);
                        
GetClientEyePosition(XStartOrigin);

                        
//Ray:
                        
TraceRay TR_TraceRayEx(StartOriginAnglesMASK_SOLIDRayType_Infinite);

                        
//Collision:
                        
if(TR_DidHit(TraceRay))
                        {

                            
//Declare:
                            
decl Float:Distance;
                            
decl Float:EndOrigin[3];

                            
//Retrieve:
                            
TR_GetEndPosition(EndOriginTraceRay);

                            
//Distance:
                            
Distance = (GetVectorDistance(StartOriginEndOrigin));

                            
//Allowed:
                            
if(Distance 50NearWall true;

                        }

                        
//Close:
                        
CloseHandle(TraceRay);
                    }

                    
//Ceiling:
                    
decl Handle:TraceRay;
                    
decl Float:StartOrigin[3];
                    new 
Float:Angles[3] =  {270.00.00.0};

                    
//Initialize:
                    
GetClientEyePosition(XStartOrigin);

                    
//Ray:
                    
TraceRay TR_TraceRayEx(StartOriginAnglesMASK_SOLIDRayType_Infinite);

                    
//Collision:
                    
if(TR_DidHit(TraceRay))
                    {
                        
//Declare:
                        
decl Float:Distance;
                        
decl Float:EndOrigin[3];

                        
//Retrieve:
                        
TR_GetEndPosition(EndOriginTraceRay);

                        
//Distance:
                        
Distance = (GetVectorDistance(StartOriginEndOrigin));

                        
//Allowed:
                        
if(Distance 50NearWall true;
                    }

                    
//Close:
                    
CloseHandle(TraceRay);

                    
//Near:
                    
if(NearWall)
                    { 
                        
                        
//Almost Zero:
                        
SetEntityGravity(XPow(Pow(100.03.0), -1.0));

                        
//Buttons:
                        
decl ButtonBitsum;
                        
ButtonBitsum GetClientButtons(X);

                        
//Origin:
                        
decl Float:ClientOrigin[3];
                        
GetClientAbsOrigin(XClientOrigin);

                        
//Angles:
                        
decl Float:ClientEyeAngles[3];
                        
GetClientEyeAngles(XClientEyeAngles);

                        
//Declare:
                        
decl Float:VeloXFloat:VeloYFloat:VeloZ;

                        
//Initialize:
                        
VeloX = (Speed Cosine(DegToRad(ClientEyeAngles[1])));
                        
VeloY = (Speed Sine(DegToRad(ClientEyeAngles[1])));
                        
VeloZ = (Speed Sine(DegToRad(ClientEyeAngles[0])));


                        
//Jumping:
                        
if(ButtonBitsum IN_JUMP)
                        {

                            
//Stop:
                            
new Float:Velocity[3] = {0.00.00.0};
                            
TeleportEntity(XClientOriginNULL_VECTORVelocity);
                        }

                        
//Forward:
                        
if(ButtonBitsum IN_FORWARD)
                        {

                            
//Forward:
                            
new Float:Velocity[3];
                            
Velocity[0] = VeloX;
                            
Velocity[1] = VeloY;
                            
Velocity[2] = (VeloZ - (VeloZ 2));
                            
TeleportEntity(XClientOriginNULL_VECTORVelocity);
                        }

                        
//Backward:
                        
else if(ButtonBitsum IN_BACK)
                        {

                            
//Backward:
                            
new Float:Velocity[3];
                            
Velocity[0] = (VeloX - (VeloX 2));
                            
Velocity[1] = (VeloY - (VeloY 2));
                            
Velocity[2] = VeloZ;
                            
TeleportEntity(XClientOriginNULL_VECTORVelocity);
                        }

                        
//Null:
                        
else 
                        {

                            
//Stop:
                            
new Float:Velocity[3] = {0.00.00.0};
                            
TeleportEntity(XClientOriginNULL_VECTORVelocity);
                        }

                    }

                    
//Default:
                    
else SetEntityGravity(X0.3);    
                }    
            }
        }
    }

The problem is that when a Furien is using WallHang they have a "slower no clip", basicly they can float arround the map, instead of being stuck to the wall.
__________________
ELO RATING SYSTEM - SQL [COMPLETE]
Quote:
Originally Posted by Liverwiz View Post
DDDRRRRAAAAMMMMAAAAA!!!???

Put this shit on pause while i go get some popcorn!!

Last edited by quilhos; 09-28-2016 at 13:23.
quilhos is offline