View Single Post
ESK0
BANNED
Join Date: May 2014
Location: Czech Republic
Old 09-29-2016 , 17:39   Re: Furien Mod - Need help converting it to CS GO
Reply With Quote #7

Well I just wanted to show you what i have but im kind today.


Code:
public Action OnPlayerRunCmd(int client, int &buttons, int &impulse, float vel[3], float angles[3], int &weapon, int &subtype, int &cmdnum, int &tickcount, int &seed, int mouse[2])


if(cVb_WallHang == true)
        {
          if(IsClientVIP(client, g_AccType[ACC_EVIP]) || i_bShop[client][Shop_Wallhang] == 1)
          {
            if(buttons & IN_USE && b_ClientWallHang[client] == false)
            {
              float f_FinallVector[3];
              float f_EyePosition[3];
              float f_EyeViewPoint[3];
              GetClientEyePosition(client, f_EyePosition);
              GetPlayerEyeViewPoint(client, f_EyeViewPoint);
              MakeVectorFromPoints(f_EyeViewPoint, f_EyePosition, f_FinallVector);
              if(GetVectorLength(f_FinallVector) < 30)
              {
                b_ClientWallHang[client] = true;
              }
            }
            else if(buttons & IN_JUMP && b_ClientWallHang[client] == true)
            {
              SetEntityMoveType(client, MOVETYPE_WALK);

              float f_cLoc[3];
              float f_cAng[3];
              float f_cEndPos[3];
              float f_vector[3];
              GetClientEyePosition(client, f_cLoc);
              GetClientEyeAngles(client, f_cAng);
              TR_TraceRayFilter(f_cLoc, f_cAng, MASK_ALL, RayType_Infinite, TraceRayTryToHit);
              TR_GetEndPosition(f_cEndPos);
              MakeVectorFromPoints(f_cLoc, f_cEndPos, f_vector);
              NormalizeVector(f_vector, f_vector);
              ScaleVector(f_vector, 320.0);
              TeleportEntity(client, NULL_VECTOR, NULL_VECTOR, f_vector);
              b_ClientWallHang[client] = false;
            }
            if(b_ClientWallHang[client] == true)
            {
              SetEntityMoveType(client, MOVETYPE_NONE);
              float f_Velocity[3] = {0.0, 0.0, 0.0};
              TeleportEntity(client, NULL_VECTOR, NULL_VECTOR, f_Velocity);
            }
          }
        }
      }
public bool TraceRayTryToHit(int entity,int mask)
{
	if(entity > 0 && entity <= MaxClients)
  {
    return false;
  }
	return true;
}
stock bool GetPlayerEyeViewPoint(int client, float pos[3])
{
  float f_Angles[3];
  float f_Origin[3];
  GetClientEyeAngles(client, f_Angles);
  GetClientEyePosition(client, f_Origin);
  Handle h_TraceFilter = TR_TraceRayFilterEx(f_Origin, f_Angles, MASK_SOLID, RayType_Infinite, TraceEntityFilterPlayer);
  if(TR_DidHit(h_TraceFilter))
  {
    TR_GetEndPosition(pos, h_TraceFilter);
    CloseHandle(h_TraceFilter);
    return true;
  }
  CloseHandle(h_TraceFilter);
  return false;
}
public bool TraceEntityFilterPlayer(int iEntity,int iContentsMask)
{
	return iEntity > MaxClients;
}
It should be all "i hope"
ESK0 is offline