Well, I'm not that good at sourcepawn but the plugin would be something like this:
Code:
#pragma semicolon 1
#define PLUGIN_VERSION "1.0"
#include <sourcemod>
#include <sdktools>
#include <cstrike>
#pragma newdecls required
public Plugin myinfo = {
name = "No recoil on Scout",
author = "GelaPT",
description = "Makes Scouts have no recoil",
version = PLUGIN_VERSION,
url = ""
};
public void OnPluginStart() {
HookEvent("weapon_fire", OnWeaponFire, EventHookMode_Pre);
}
public Action OnWeaponFire(Event hEvent, const char[] name, bool dontBroadcast) {
int iClient = GetClientOfUserId(hEvent.GetInt("userid"));
int iWeapon = GetClientOfUserId(hEvent.GetInt("m_hActiveWeapon"));
char cWeapon[32];
GetEdictClassname(iWeapon, cWeapon, sizeof(cWeapon));
if(StrEqual(cWeapon, "weapon_ssg08", false)) {
//Check if user is pointing towards someone and simulate hit
}
}
__________________