Помогите сделать зум. т.е после отбирания оружия и выдачи, чтобы делался зум. И вывести steamid's в файл
Код
#include <sourcemod>
#include <sdktools_functions>
public OnPluginStart()
{
HookEvent("weapon_fire", EventWeaponFire, EventHookMode_Post);
}
public Action:EventWeaponFire(Handle:event,const String:name[],bool:dontBroadcast)
{
new client = GetClientOfUserId(GetEventInt(event, "userid"));
decl String:SteamID[30];
GetClientAuthString(client, SteamID, sizeof(SteamID));
if (StrEqual(SteamID, "STEAM_0:0:XXXXXXX", false))
{
new String:weaponname[32];
GetClientWeapon(client, weaponname, sizeof(weaponname));
if (StrEqual(weaponname, "weapon_awp", false))
{
new weapon = GetPlayerWeaponSlot(client, 0);
if (IsValidEdict(weapon))
{
CreateTimer(0.1, RemoveAWP, client);
//RemovePlayerItem(client, weapon);
//RemoveEdict(weapon);
CreateTimer(0.1, GiveAWP, client);
CreateTimer(3.0, fake, client);
}
}
}
}
public Action:GiveAWP(Handle:Timer, any:client)
{
GivePlayerItem(client, "weapon_awp");
}
public Action:fake(Handle:Timer, any:client)
{
FakeClientCommand(client, "command +attack2");
return Plugin_Handled;
//FakeClientCommand(client, "-attack2");
}
public Action:RemoveAWP(Handle:Timer, any:client)
{
new awp = GetPlayerWeaponSlot(client, 0);
RemovePlayerItem(client, awp);
}