 |
|
AlliedModders Donor
|

06-08-2019
, 04:42
Re: Entity System v1.1
|
#6
|
Quote:
Originally Posted by Dragokas
Missing CloseHandle
PHP Code:
public void TeleportToCrosshair(int iClient)
{
float fAngles[3], fFinalAngles[3], fFinalOrigin[3], fOrigin[3];
GetClientEyePosition(iClient, fOrigin);
GetClientEyeAngles(iClient, fAngles);
GetClientAbsAngles(iClient, fFinalAngles);
Handle hTraceRay = TR_TraceRayFilterEx(fOrigin, fAngles, MASK_SOLID, RayType_Infinite, OFilterPlayer);
if (TR_DidHit(hTraceRay))
{
TR_GetEndPosition(fFinalOrigin, hTraceRay);
TeleportEntity(this.iEntity, fFinalOrigin, fFinalAngles, NULL_VECTOR);
}
}
|
Thank you, I've decided to re-build this from the ground up while developing a mod with it. The old version was rushed and not fully tested.
|
|
|
|