Skip to content

Instantly share code, notes, and snippets.

View raspbianlike's full-sized avatar
📚
Studying

Benjamin raspbianlike

📚
Studying
View GitHub Profile
{
"de_mirage":[
{
"name":[
"A Alley",
"CT"
],
"weapon":"weapon_smokegrenade",
"position":[
936.04,
@raspbianlike
raspbianlike / gist:7c221059d7eb5caf44ed61285270d591
Created August 11, 2019 14:08
spookware silent autoknife
#include "autoknife.h"
bool AutoKnife::IsPlayerBehind(C_BasePlayer *localplayer, C_BasePlayer *player) {
Vector toTarget = (localplayer->GetLocalOrigin() - player->GetLocalOrigin()).Normalize();
Vector playerViewAngles;
Math::AngleVectors(*player->GetEyeAngles(), playerViewAngles);
if (toTarget.Dot(playerViewAngles) > -0.475f)
return false;
else
return true;