-->KENT<--
На квартале
- Сообщения
- 246
- Реакции
- 50
Нужен плагин который выдает ssg08 без патрон. Имеется плагин но там выдает с запасом 99.
Может кто поможет пофиксить.
Оффтоп
#include <sourcemod>
#include <sdktools>
#include <cstrike>
#include <csgo_colors>
new bool:DraxtenVichSsg[MAXPLAYERS+1];
public OnPluginStart()
{
RegConsoleCmd("scout", Command_Scout);
RegConsoleCmd("sm_scout", Command_Scout);
HookEvent("round_start", OnRoundStart);
}
public Action:OnRoundStart(Handle:event, String:name[], bool:dontBroadcast)
{
for (new i = 1; i<MaxClients; i++)
{
if(IsClientInGame(i))
{
DraxtenVichSsg=true;
}
}
}
public Action:Command_Scout(client, args)
{
if (IsPlayerAlive(client))
{
if (GetPlayerWeaponSlot(client, 0) == -1)
{
if(DraxtenVichSsg[client])
{
GivePlayerItem(client, "weapon_ssg08", 0);
CGOPrintToChatAll("{GREEN}Игрок %N {BLUE}использовал скаут! 1/1", client);
new ent = GetPlayerWeaponSlot(client, 0);
DraxtenVichSsg[client]=false;
SetEntProp(ent, Prop_Send, "m_iClip1", 0);
new AmmoType = -1;
if ((AmmoType = GetEntProp(ent, Prop_Send, "m_iPrimaryAmmoType")) != -1) SetEntProp(client, Prop_Send, "m_iAmmo", 0, 0, AmmoType);
}
}
}
}
public Action:CS_OnCSWeaponDrop(client, weaponIndex)
{
if (MaxClients < weaponIndex <= GetMaxEntities())
{
decl String:class[40];
GetEntityClassname(weaponIndex, class, sizeof(class));
if (StrEqual(class, "weapon_ssg08")) AcceptEntityInput(weaponIndex, "Kill");
}
}
Может кто поможет пофиксить.
Оффтоп
#include <sourcemod>
#include <sdktools>
#include <cstrike>
#include <csgo_colors>
new bool:DraxtenVichSsg[MAXPLAYERS+1];
public OnPluginStart()
{
RegConsoleCmd("scout", Command_Scout);
RegConsoleCmd("sm_scout", Command_Scout);
HookEvent("round_start", OnRoundStart);
}
public Action:OnRoundStart(Handle:event, String:name[], bool:dontBroadcast)
{
for (new i = 1; i<MaxClients; i++)
{
if(IsClientInGame(i))
{
DraxtenVichSsg=true;
}
}
}
public Action:Command_Scout(client, args)
{
if (IsPlayerAlive(client))
{
if (GetPlayerWeaponSlot(client, 0) == -1)
{
if(DraxtenVichSsg[client])
{
GivePlayerItem(client, "weapon_ssg08", 0);
CGOPrintToChatAll("{GREEN}Игрок %N {BLUE}использовал скаут! 1/1", client);
new ent = GetPlayerWeaponSlot(client, 0);
DraxtenVichSsg[client]=false;
SetEntProp(ent, Prop_Send, "m_iClip1", 0);
new AmmoType = -1;
if ((AmmoType = GetEntProp(ent, Prop_Send, "m_iPrimaryAmmoType")) != -1) SetEntProp(client, Prop_Send, "m_iAmmo", 0, 0, AmmoType);
}
}
}
}
public Action:CS_OnCSWeaponDrop(client, weaponIndex)
{
if (MaxClients < weaponIndex <= GetMaxEntities())
{
decl String:class[40];
GetEntityClassname(weaponIndex, class, sizeof(class));
if (StrEqual(class, "weapon_ssg08")) AcceptEntityInput(weaponIndex, "Kill");
}
}