#pragma semicolon 1
#include <sourcemod>
#include <sdktools>
public OnPluginStart()
{
HookEvent("weapon_fire", Event_WeaponFire);
}
/*
weapon_fire
Note: Every time a client fires their weapon
Name: weapon_fire
Structure:
short userid
string weapon weapon name used
*/
public Event_WeaponFire(Handle:event, const String:name[], bool:dontBroadcast)
{
new client = GetClientOfUserId(GetEventInt(event, "userid"));
if(client && IsClientInGame(client) && IsPlayerAlive(client))
{
decl Float:fAng[3];
GetClientAbsAngles(client, fAng);
fAng[2] += 10.0;
TeleportEntity(client, NULL_VECTOR, fAng, NULL_VECTOR);
}
}