Night Fighter
Участник
- Сообщения
- 235
- Реакции
- 135
плагин 2 he гранаты для админа, надо переделать под дымовую
C-подобный:
#pragma semicolon 1
#include <sourcemod>
#include <sdktools_functions>
public Plugin:myinfo =
{
name = "he2",
author = "wS (♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥)",
version = "1.1"
};
new g_MyHe[MAXPLAYERS + 1];
public OnPluginStart()
{
HookEvent("player_spawn", player_spawn);
HookEvent("hegrenade_detonate", hegrenade_detonate);
}
public player_spawn(Handle:event, const String:name[], bool:dontBroadcast)
{
g_MyHe[GetClientOfUserId(GetEventInt(event, "userid"))] = 0;
}
public hegrenade_detonate(Handle:event, const String:name[], bool:dontBroadcast)
{
new client = GetClientOfUserId(GetEventInt(event, "userid"));
if (client > 0
&& g_MyHe[client] < 1
&& GetUserFlagBits(client) & ADMFLAG_RESERVATION
&& IsPlayerAlive(client)
&& GetEntProp(client, Prop_Send, "m_iAmmo", _, 11) < 1)
{
g_MyHe[client]++;
GivePlayerItem(client, "weapon_hegrenade");
}
}