Лежат модельки на полу когда нету оружия

Carambarass

Участник
Сообщения
187
Реакции
3
Всем привет, у меня проблема, что модельки игроков лежат на полу когда у них нету никакого оружия в руках. Знаю есть плагин "No Weapon Fix", но источник от куда можно скачать не работает, кто может дать или чем помочь? Заранее спасибо.
 

8Ahnenerbe8

Участник
Сообщения
113
Реакции
30
@Extrimer, меняй скин всем игрокам через плагин skinchooser, например.
Или при выбросе всего оружия выдавай всем игрока decoy с помощью плагина
 

Dreizehnt

Доминик
Сообщения
1,160
Реакции
798
Всем привет, у меня проблема, что модельки игроков лежат на полу когда у них нету никакого оружия в руках. Знаю есть плагин "No Weapon Fix", но источник от куда можно скачать не работает, кто может дать или чем помочь? Заранее спасибо.
[CS:GO] game_player_equip temp fix (mg, dr, ttt, hg map fixer) - AlliedModders
 

kleuser

Участник
Сообщения
1,838
Реакции
732
@Dreizehnt, не об этом просили.
@Extrimer, вот завалялся плагин
PHP:
#pragma semicolon 1

#define PLUGIN_VERSION "1.3"

#include <sourcemod>
#include <sdktools>
#include <sdkhooks>
#include <cstrike>

public Plugin myinfo =
{
    name = "No Weapon Fix",
    author = ".#Zipcore",
    description = "",
    version = PLUGIN_VERSION,
    url = ""
};

#define LoopIngamePlayers(%1) for(int %1=1;%1<=MaxClients;++%1)\
if(IsClientInGame(%1) && !IsFakeClient(%1))

#define EF_NODRAW 32

int g_iFakeWeaponRef[MAXPLAYERS + 1];

ConVar cvEnable;
bool g_bEnable;

public void OnPluginStart()
{
    CreateConVar("no_weapon_fix_version", PLUGIN_VERSION, "No Weapon Fix Version", FCVAR_DONTRECORD|FCVAR_PLUGIN|FCVAR_SPONLY|FCVAR_REPLICATED|FCVAR_NOTIFY);
  
    cvEnable = CreateConVar("no_weapon_fix_enable", "1", "Set to 0 to disable this plugin.");
    g_bEnable = GetConVarBool(cvEnable);
    HookConVarChange(cvEnable, OnSettingChanged);
  
    LoopIngamePlayers(client)
        OnClientPutInServer(client);
}

public int OnSettingChanged(Handle convar, const char[] oldValue, const char[] newValue)
{
    if(convar == cvEnable)
        g_bEnable = view_as<bool>(StringToInt(newValue));
}

public void OnClientPutInServer(int client)
{
    g_iFakeWeaponRef[client] = 0;
  
    SDKHook(client, SDKHook_WeaponEquip, WeaponSwitch);
    SDKHook(client, SDKHook_WeaponDrop, WeaponDrop);
}

public Action WeaponSwitch(int client, int weapon)
{
    int iEntity = EntRefToEntIndex(g_iFakeWeaponRef[client]);
    if(IsValidEntity(weapon) && weapon != iEntity && iEntity > MaxClients && iEntity != INVALID_ENT_REFERENCE)
    {
        SetEntProp(client, Prop_Data, "m_bDrawViewmodel", 1);
        RemovePlayerItem(client, iEntity);
        AcceptEntityInput(iEntity, "Kill");
    }
    return Plugin_Continue;
}

public Action WeaponDrop(int client, int weapon)
{
    int iEntity = EntRefToEntIndex(g_iFakeWeaponRef[client]);
    if(IsValidEntity(weapon) && weapon == iEntity)
    {
        SetEntProp(client, Prop_Data, "m_bDrawViewmodel", 1);
        AcceptEntityInput(iEntity, "Kill");
    }
    return Plugin_Continue;
}

public Action OnPlayerRunCmd(int client, int &buttons, int &impulse, float vel[3], float angles[3], int &weapon, int &subtype, int &cmdnum, int &tickcount, int &seed, int mouse[2])
{
    if(!g_bEnable || !IsPlayerAlive(client))
        return Plugin_Continue;
  
    int iEntity = EntRefToEntIndex(g_iFakeWeaponRef[client]);
    if (iEntity > MaxClients)
    {
        float fUnlockTime = GetGameTime() + 0.5;
      
        SetEntProp(client, Prop_Data, "m_bDrawViewmodel", 0);
        SetEntPropFloat(client, Prop_Send, "m_flNextAttack", fUnlockTime);
        SetEntPropFloat(iEntity, Prop_Send, "m_flNextPrimaryAttack", fUnlockTime);
    }
  
    if(weapon <= 0)
        weapon = GetEntPropEnt(client, Prop_Send, "m_hActiveWeapon");
  
    if(weapon <= 0 && iEntity <= 0)
    {
        int iWeapon = GivePlayerItem(client, "weapon_decoy");
      
        float fUnlockTime = GetGameTime() + 0.5;
      
        SetEntPropFloat(client, Prop_Send, "m_flNextAttack", fUnlockTime);
        SetEntPropFloat(iWeapon, Prop_Send, "m_flNextPrimaryAttack", fUnlockTime);
  
        g_iFakeWeaponRef[client] = EntIndexToEntRef(iWeapon);
        return Plugin_Continue;
    }
    
      return Plugin_Continue;
}
 

Dreizehnt

Доминик
Сообщения
1,160
Реакции
798
@Dreizehnt, не об этом просили.
@Extrimer, вот завалялся плагин
PHP:
#pragma semicolon 1

#define PLUGIN_VERSION "1.3"

#include <sourcemod>
#include <sdktools>
#include <sdkhooks>
#include <cstrike>

public Plugin myinfo =
{
    name = "No Weapon Fix",
    author = ".#Zipcore",
    description = "",
    version = PLUGIN_VERSION,
    url = ""
};

#define LoopIngamePlayers(%1) for(int %1=1;%1<=MaxClients;++%1)\
if(IsClientInGame(%1) && !IsFakeClient(%1))

#define EF_NODRAW 32

int g_iFakeWeaponRef[MAXPLAYERS + 1];

ConVar cvEnable;
bool g_bEnable;

public void OnPluginStart()
{
    CreateConVar("no_weapon_fix_version", PLUGIN_VERSION, "No Weapon Fix Version", FCVAR_DONTRECORD|FCVAR_PLUGIN|FCVAR_SPONLY|FCVAR_REPLICATED|FCVAR_NOTIFY);
 
    cvEnable = CreateConVar("no_weapon_fix_enable", "1", "Set to 0 to disable this plugin.");
    g_bEnable = GetConVarBool(cvEnable);
    HookConVarChange(cvEnable, OnSettingChanged);
 
    LoopIngamePlayers(client)
        OnClientPutInServer(client);
}

public int OnSettingChanged(Handle convar, const char[] oldValue, const char[] newValue)
{
    if(convar == cvEnable)
        g_bEnable = view_as<bool>(StringToInt(newValue));
}

public void OnClientPutInServer(int client)
{
    g_iFakeWeaponRef[client] = 0;
 
    SDKHook(client, SDKHook_WeaponEquip, WeaponSwitch);
    SDKHook(client, SDKHook_WeaponDrop, WeaponDrop);
}

public Action WeaponSwitch(int client, int weapon)
{
    int iEntity = EntRefToEntIndex(g_iFakeWeaponRef[client]);
    if(IsValidEntity(weapon) && weapon != iEntity && iEntity > MaxClients && iEntity != INVALID_ENT_REFERENCE)
    {
        SetEntProp(client, Prop_Data, "m_bDrawViewmodel", 1);
        RemovePlayerItem(client, iEntity);
        AcceptEntityInput(iEntity, "Kill");
    }
    return Plugin_Continue;
}

public Action WeaponDrop(int client, int weapon)
{
    int iEntity = EntRefToEntIndex(g_iFakeWeaponRef[client]);
    if(IsValidEntity(weapon) && weapon == iEntity)
    {
        SetEntProp(client, Prop_Data, "m_bDrawViewmodel", 1);
        AcceptEntityInput(iEntity, "Kill");
    }
    return Plugin_Continue;
}

public Action OnPlayerRunCmd(int client, int &buttons, int &impulse, float vel[3], float angles[3], int &weapon, int &subtype, int &cmdnum, int &tickcount, int &seed, int mouse[2])
{
    if(!g_bEnable || !IsPlayerAlive(client))
        return Plugin_Continue;
 
    int iEntity = EntRefToEntIndex(g_iFakeWeaponRef[client]);
    if (iEntity > MaxClients)
    {
        float fUnlockTime = GetGameTime() + 0.5;
     
        SetEntProp(client, Prop_Data, "m_bDrawViewmodel", 0);
        SetEntPropFloat(client, Prop_Send, "m_flNextAttack", fUnlockTime);
        SetEntPropFloat(iEntity, Prop_Send, "m_flNextPrimaryAttack", fUnlockTime);
    }
 
    if(weapon <= 0)
        weapon = GetEntPropEnt(client, Prop_Send, "m_hActiveWeapon");
 
    if(weapon <= 0 && iEntity <= 0)
    {
        int iWeapon = GivePlayerItem(client, "weapon_decoy");
     
        float fUnlockTime = GetGameTime() + 0.5;
     
        SetEntPropFloat(client, Prop_Send, "m_flNextAttack", fUnlockTime);
        SetEntPropFloat(iWeapon, Prop_Send, "m_flNextPrimaryAttack", fUnlockTime);
 
        g_iFakeWeaponRef[client] = EntIndexToEntRef(iWeapon);
        return Plugin_Continue;
    }
   
      return Plugin_Continue;
}
Я отправил тоже самое, за исключением, что его "фиксил" Mitchell.
 

Carambarass

Участник
Сообщения
187
Реакции
3
@Dreizehnt, не об этом просили.
@Extrimer, вот завалялся плагин
PHP:
#pragma semicolon 1

#define PLUGIN_VERSION "1.3"

#include <sourcemod>
#include <sdktools>
#include <sdkhooks>
#include <cstrike>

public Plugin myinfo =
{
    name = "No Weapon Fix",
    author = ".#Zipcore",
    description = "",
    version = PLUGIN_VERSION,
    url = ""
};

#define LoopIngamePlayers(%1) for(int %1=1;%1<=MaxClients;++%1)\
if(IsClientInGame(%1) && !IsFakeClient(%1))

#define EF_NODRAW 32

int g_iFakeWeaponRef[MAXPLAYERS + 1];

ConVar cvEnable;
bool g_bEnable;

public void OnPluginStart()
{
    CreateConVar("no_weapon_fix_version", PLUGIN_VERSION, "No Weapon Fix Version", FCVAR_DONTRECORD|FCVAR_PLUGIN|FCVAR_SPONLY|FCVAR_REPLICATED|FCVAR_NOTIFY);
 
    cvEnable = CreateConVar("no_weapon_fix_enable", "1", "Set to 0 to disable this plugin.");
    g_bEnable = GetConVarBool(cvEnable);
    HookConVarChange(cvEnable, OnSettingChanged);
 
    LoopIngamePlayers(client)
        OnClientPutInServer(client);
}

public int OnSettingChanged(Handle convar, const char[] oldValue, const char[] newValue)
{
    if(convar == cvEnable)
        g_bEnable = view_as<bool>(StringToInt(newValue));
}

public void OnClientPutInServer(int client)
{
    g_iFakeWeaponRef[client] = 0;
 
    SDKHook(client, SDKHook_WeaponEquip, WeaponSwitch);
    SDKHook(client, SDKHook_WeaponDrop, WeaponDrop);
}

public Action WeaponSwitch(int client, int weapon)
{
    int iEntity = EntRefToEntIndex(g_iFakeWeaponRef[client]);
    if(IsValidEntity(weapon) && weapon != iEntity && iEntity > MaxClients && iEntity != INVALID_ENT_REFERENCE)
    {
        SetEntProp(client, Prop_Data, "m_bDrawViewmodel", 1);
        RemovePlayerItem(client, iEntity);
        AcceptEntityInput(iEntity, "Kill");
    }
    return Plugin_Continue;
}

public Action WeaponDrop(int client, int weapon)
{
    int iEntity = EntRefToEntIndex(g_iFakeWeaponRef[client]);
    if(IsValidEntity(weapon) && weapon == iEntity)
    {
        SetEntProp(client, Prop_Data, "m_bDrawViewmodel", 1);
        AcceptEntityInput(iEntity, "Kill");
    }
    return Plugin_Continue;
}

public Action OnPlayerRunCmd(int client, int &buttons, int &impulse, float vel[3], float angles[3], int &weapon, int &subtype, int &cmdnum, int &tickcount, int &seed, int mouse[2])
{
    if(!g_bEnable || !IsPlayerAlive(client))
        return Plugin_Continue;
 
    int iEntity = EntRefToEntIndex(g_iFakeWeaponRef[client]);
    if (iEntity > MaxClients)
    {
        float fUnlockTime = GetGameTime() + 0.5;
     
        SetEntProp(client, Prop_Data, "m_bDrawViewmodel", 0);
        SetEntPropFloat(client, Prop_Send, "m_flNextAttack", fUnlockTime);
        SetEntPropFloat(iEntity, Prop_Send, "m_flNextPrimaryAttack", fUnlockTime);
    }
 
    if(weapon <= 0)
        weapon = GetEntPropEnt(client, Prop_Send, "m_hActiveWeapon");
 
    if(weapon <= 0 && iEntity <= 0)
    {
        int iWeapon = GivePlayerItem(client, "weapon_decoy");
     
        float fUnlockTime = GetGameTime() + 0.5;
     
        SetEntPropFloat(client, Prop_Send, "m_flNextAttack", fUnlockTime);
        SetEntPropFloat(iWeapon, Prop_Send, "m_flNextPrimaryAttack", fUnlockTime);
 
        g_iFakeWeaponRef[client] = EntIndexToEntRef(iWeapon);
        return Plugin_Continue;
    }
   
      return Plugin_Continue;
}
Благодарю :)
 

selax

Добрая душа
Сообщения
1,172
Реакции
521
@Dreizehnt, в корне разные плагины, делающие абсолютно разные вещи.
 

ilya007good

Участник
Сообщения
34
Реакции
3
@Dreizehnt, не об этом просили.
@Extrimer, вот завалялся плагин
PHP:
#pragma semicolon 1

#define PLUGIN_VERSION "1.3"

#include <sourcemod>
#include <sdktools>
#include <sdkhooks>
#include <cstrike>

public Plugin myinfo =
{
    name = "No Weapon Fix",
    author = ".#Zipcore",
    description = "",
    version = PLUGIN_VERSION,
    url = ""
};

#define LoopIngamePlayers(%1) for(int %1=1;%1<=MaxClients;++%1)\
if(IsClientInGame(%1) && !IsFakeClient(%1))

#define EF_NODRAW 32

int g_iFakeWeaponRef[MAXPLAYERS + 1];

ConVar cvEnable;
bool g_bEnable;

public void OnPluginStart()
{
    CreateConVar("no_weapon_fix_version", PLUGIN_VERSION, "No Weapon Fix Version", FCVAR_DONTRECORD|FCVAR_PLUGIN|FCVAR_SPONLY|FCVAR_REPLICATED|FCVAR_NOTIFY);
 
    cvEnable = CreateConVar("no_weapon_fix_enable", "1", "Set to 0 to disable this plugin.");
    g_bEnable = GetConVarBool(cvEnable);
    HookConVarChange(cvEnable, OnSettingChanged);
 
    LoopIngamePlayers(client)
        OnClientPutInServer(client);
}

public int OnSettingChanged(Handle convar, const char[] oldValue, const char[] newValue)
{
    if(convar == cvEnable)
        g_bEnable = view_as<bool>(StringToInt(newValue));
}

public void OnClientPutInServer(int client)
{
    g_iFakeWeaponRef[client] = 0;
 
    SDKHook(client, SDKHook_WeaponEquip, WeaponSwitch);
    SDKHook(client, SDKHook_WeaponDrop, WeaponDrop);
}

public Action WeaponSwitch(int client, int weapon)
{
    int iEntity = EntRefToEntIndex(g_iFakeWeaponRef[client]);
    if(IsValidEntity(weapon) && weapon != iEntity && iEntity > MaxClients && iEntity != INVALID_ENT_REFERENCE)
    {
        SetEntProp(client, Prop_Data, "m_bDrawViewmodel", 1);
        RemovePlayerItem(client, iEntity);
        AcceptEntityInput(iEntity, "Kill");
    }
    return Plugin_Continue;
}

public Action WeaponDrop(int client, int weapon)
{
    int iEntity = EntRefToEntIndex(g_iFakeWeaponRef[client]);
    if(IsValidEntity(weapon) && weapon == iEntity)
    {
        SetEntProp(client, Prop_Data, "m_bDrawViewmodel", 1);
        AcceptEntityInput(iEntity, "Kill");
    }
    return Plugin_Continue;
}

public Action OnPlayerRunCmd(int client, int &buttons, int &impulse, float vel[3], float angles[3], int &weapon, int &subtype, int &cmdnum, int &tickcount, int &seed, int mouse[2])
{
    if(!g_bEnable || !IsPlayerAlive(client))
        return Plugin_Continue;
 
    int iEntity = EntRefToEntIndex(g_iFakeWeaponRef[client]);
    if (iEntity > MaxClients)
    {
        float fUnlockTime = GetGameTime() + 0.5;
     
        SetEntProp(client, Prop_Data, "m_bDrawViewmodel", 0);
        SetEntPropFloat(client, Prop_Send, "m_flNextAttack", fUnlockTime);
        SetEntPropFloat(iEntity, Prop_Send, "m_flNextPrimaryAttack", fUnlockTime);
    }
 
    if(weapon <= 0)
        weapon = GetEntPropEnt(client, Prop_Send, "m_hActiveWeapon");
 
    if(weapon <= 0 && iEntity <= 0)
    {
        int iWeapon = GivePlayerItem(client, "weapon_decoy");
     
        float fUnlockTime = GetGameTime() + 0.5;
     
        SetEntPropFloat(client, Prop_Send, "m_flNextAttack", fUnlockTime);
        SetEntPropFloat(iWeapon, Prop_Send, "m_flNextPrimaryAttack", fUnlockTime);
 
        g_iFakeWeaponRef[client] = EntIndexToEntRef(iWeapon);
        return Plugin_Continue;
    }
   
      return Plugin_Continue;
}
Можешь скомпилировать пожалуйста?) У меня ошибки выдаёт.
//// noweaponfix.sp
// C:\Users\ClipFail\Desktop\OLDSM\addons\sourcemod\scripting\include\sdktools_hooks.inc(59) : error 025: function heading differs from prototype
// C:\Users\ClipFail\Desktop\OLDSM\addons\sourcemod\scripting\noweaponfix.sp(10) : error 001: expected token: ";", but found "-identifier-"
// C:\Users\ClipFail\Desktop\OLDSM\addons\sourcemod\scripting\noweaponfix.sp(17) : error 010: invalid function or declaration
// C:\Users\ClipFail\Desktop\OLDSM\addons\sourcemod\scripting\noweaponfix.sp(24) : error 010: invalid function or declaration
// C:\Users\ClipFail\Desktop\OLDSM\addons\sourcemod\scripting\noweaponfix.sp(26) : error 010: invalid function or declaration
// C:\Users\ClipFail\Desktop\OLDSM\addons\sourcemod\scripting\noweaponfix.sp(29) : error 001: expected token: ";", but found "-identifier-"
// C:\Users\ClipFail\Desktop\OLDSM\addons\sourcemod\scripting\noweaponfix.sp(41) : error 001: expected token: ";", but found "-identifier-"
// C:\Users\ClipFail\Desktop\OLDSM\addons\sourcemod\scripting\noweaponfix.sp(41) : error 017: undefined symbol "convar"
// C:\Users\ClipFail\Desktop\OLDSM\addons\sourcemod\scripting\noweaponfix.sp(41) : error 029: invalid expression, assumed zero
// C:\Users\ClipFail\Desktop\OLDSM\addons\sourcemod\scripting\noweaponfix.sp(41) : fatal error 127: too many error messages on one line
//
// Compilation aborted.
// 10 Errors.
//
// Compilation Time: 0,17 sec
// ----------------------------------------
 

Carambarass

Участник
Сообщения
187
Реакции
3
Можешь скомпилировать пожалуйста?) У меня ошибки выдаёт.
//// noweaponfix.sp
// C:\Users\ClipFail\Desktop\OLDSM\addons\sourcemod\scripting\include\sdktools_hooks.inc(59) : error 025: function heading differs from prototype
// C:\Users\ClipFail\Desktop\OLDSM\addons\sourcemod\scripting\noweaponfix.sp(10) : error 001: expected token: ";", but found "-identifier-"
// C:\Users\ClipFail\Desktop\OLDSM\addons\sourcemod\scripting\noweaponfix.sp(17) : error 010: invalid function or declaration
// C:\Users\ClipFail\Desktop\OLDSM\addons\sourcemod\scripting\noweaponfix.sp(24) : error 010: invalid function or declaration
// C:\Users\ClipFail\Desktop\OLDSM\addons\sourcemod\scripting\noweaponfix.sp(26) : error 010: invalid function or declaration
// C:\Users\ClipFail\Desktop\OLDSM\addons\sourcemod\scripting\noweaponfix.sp(29) : error 001: expected token: ";", but found "-identifier-"
// C:\Users\ClipFail\Desktop\OLDSM\addons\sourcemod\scripting\noweaponfix.sp(41) : error 001: expected token: ";", but found "-identifier-"
// C:\Users\ClipFail\Desktop\OLDSM\addons\sourcemod\scripting\noweaponfix.sp(41) : error 017: undefined symbol "convar"
// C:\Users\ClipFail\Desktop\OLDSM\addons\sourcemod\scripting\noweaponfix.sp(41) : error 029: invalid expression, assumed zero
// C:\Users\ClipFail\Desktop\OLDSM\addons\sourcemod\scripting\noweaponfix.sp(41) : fatal error 127: too many error messages on one line
//
// Compilation aborted.
// 10 Errors.
//
// Compilation Time: 0,17 sec
// ----------------------------------------
Дрежи.
 

Вложения

  • noweaponfix.smx
    5.7 КБ · Просмотры: 18
Сверху Снизу