Here my code so far, I am not sure for the angle and I do not know what sort of filter I should put to detect a wall. Thank you for your help, it keep going foward!
PHP Code:
#include <sourcemod>
#include <sdktools>
#include <sdkhooks>
public OnClientPutInServer(client)
{
SDKHook(client, SDKHook_WeaponEquipPost, OnWeaponEquip);
}
public Action:OnWeaponEquip(client, weapon)
{
decl Float:clientOrigin[3], Float:clientOrigin[3], Float:tracePos[3],;
GetEntPropVector(client, Prop_Send, "m_vecOrigin", clientOrigin);
GetEntPropVector(weapon, Prop_Send, "m_vecOrigin", weaponOrigin);
tracePos = origin-weaponOrigin;
new Handle:trace = TR_TraceRayFilterEx(tracePos, angles, MASK_SOLID, RayType_Infinite, ????);
if(TR_DidHit(trace))
}