Raised This Month: $51 Target: $400
 12% 

[CS:GO] No weapon fix 3.1 (Player models lay on ground fix)


Post New Thread Reply   
 
Thread Tools Display Modes
sneaK
SourceMod Moderator
Join Date: Feb 2015
Location: USA
Old 08-14-2016 , 19:31   Re: [CS:GO] No weapon fix (Player models lay on ground fix)
Reply With Quote #31

Quote:
Originally Posted by iGANGNAM View Post
After using cannon on mg_piratewars_csgo_v7_hp I don't have knife anymore...Or maybe I should say it is here but I can't use it.
Unload the plugin for that specific map.

Here's what I have downloaded (believe its the latest version)
Attached Files
File Type: sp Get Plugin or Get Source (no_weapon_fix.sp - 259 views - 3.4 KB)

Last edited by sneaK; 08-14-2016 at 19:32.
sneaK is offline
Koga73
Senior Member
Join Date: Mar 2011
Location: 🍩
Old 08-18-2016 , 22:24   Re: [CS:GO] No weapon fix (Player models lay on ground fix)
Reply With Quote #32

Quote:
Originally Posted by blackhawk74 View Post
Unload the plugin for that specific map.

Here's what I have downloaded (believe its the latest version)

Works like a charm. Thanks for sharing.
__________________
Koga73 is offline
zipcore
Veteran Member
Join Date: Mar 2010
Location: m_flZipcore
Old 09-11-2016 , 18:51   Re: [CS:GO] No weapon fix (Player models lay on ground fix)
Reply With Quote #33

I've updated the download link in the first post.
__________________
zipcore is offline
SHAREN
Senior Member
Join Date: Dec 2011
Old 10-17-2016 , 17:16   Re: [CS:GO] No weapon fix (Player models lay on ground fix)
Reply With Quote #34

https://gitlab.com/Zipcore/NoWeaponFix/issues/1
Quote:
The plugin does not always correctly detects the presence of weapons at the player.
Sometimes, there is such a situation that the plugin thinks that there is no weapons, although it has (eg DriveDown Jail on maps) or intervene when other plugins. Do, please, every 2-4 seconds to check whether there is a plug-in player for some more weapons other than a decoy of, and that is that the player has a knife, but he can not use it until you pick up other weapons. Sorry for bad English.
thumbsup 0
SHAREN is offline
Send a message via Skype™ to SHAREN
zipcore
Veteran Member
Join Date: Mar 2010
Location: m_flZipcore
Old 10-25-2016 , 19:07   Re: [CS:GO] No weapon fix (Player models lay on ground fix)
Reply With Quote #35

Try the new version 2.0 I hope this issue is fixed now and an exploit where players were able to spam decoys until the server crashes Still don't know how they did this or if this was maybe caused by other plugins. Someone just reported this to me without any details. Would be cool if someone could enlight me how they could spam the decoys and if this still possible with the new version. Furthermore the invisible weapon bug should be gone now too.
__________________
zipcore is offline
SHAREN
Senior Member
Join Date: Dec 2011
Old 10-27-2016 , 13:10   Re: [CS:GO] No weapon fix 2.0 (Player models lay on ground fix)
Reply With Quote #36

Drive Down on Jail maps fixed, but but there is another bug in the plugin - TeamGames .
When a player is given a grenade without a knife, the player can not use a grenade (Screenshot 1). And when the mini game ends minigames plugin returns knives players, the knife model is not visible (although players can use a knife) (Screenshot 2).

Spoiler
SHAREN is offline
Send a message via Skype™ to SHAREN
SHAREN
Senior Member
Join Date: Dec 2011
Old 10-28-2016 , 09:33   Re: [CS:GO] No weapon fix 2.1 (Player models lay on ground fix)
Reply With Quote #37

Quote:
#define CS_SLOT_GRENADE 3 /**< Grenade slot (will only return one grenade). */
Quote:
iWeapon = GetPlayerWeaponSlot(client, CS_SLOT_GRENADE);
I think the plugin see that the player has a weapon_decoy and other grenades, he ignores.
SHAREN is offline
Send a message via Skype™ to SHAREN
zipcore
Veteran Member
Join Date: Mar 2010
Location: m_flZipcore
Old 10-28-2016 , 10:45   Re: [CS:GO] No weapon fix 2.1 (Player models lay on ground fix)
Reply With Quote #38

Quote:
Originally Posted by SHAREN View Post
I think the plugin see that the player has a weapon_decoy and other grenades, he ignores.
PHP Code:
    // Picking up a grenade, lets remove the fake deocy
    
else if(StrEqual(classname"weapon_hegrenade") || StrEqual(classname"weapon_flashbang") || StrEqual(classname"weapon_molotov") || StrEqual(classname"weapon_incgrenade"))
    {
        
g_iFakeWeaponRef[client] = 0;
        
        
SetEntProp(clientProp_Data"m_bDrawViewmodel"1);
        
        
AcceptEntityInput(iEntity"Kill");
        
        
ClientCommand(client"slot%d"CS_SLOT_GRENADE+1);
        
        return 
Plugin_Continue;
    } 
Thats fixed by this part of the code, maybe another plugin is conflicting
__________________
zipcore is offline
SHAREN
Senior Member
Join Date: Dec 2011
Old 10-28-2016 , 14:57   Re: [CS:GO] No weapon fix 2.3 (Player models lay on ground fix)
Reply With Quote #39

I think I did, working fine, even without SDKHooks
But by optimizing not know

PHP Code:
#pragma semicolon 1

#define PLUGIN_VERSION "2.3"

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

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

#define LoopIngameClients(%1) for(int %1=1;%1<=MaxClients;++%1)\
if(IsClientInGame(%1))

#define EF_NODRAW 32

int g_iFakeWeaponRef[MAXPLAYERS 1];
int m_hMyWeapons;


ConVar cvEnable;
bool g_bEnable;
public 
void OnPluginStart()
{
    
CreateConVar("no_weapon_fix_version"PLUGIN_VERSION"No Weapon Fix Version"FCVAR_DONTRECORD|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(cvEnableOnSettingChanged);

    
m_hMyWeapons FindSendPropInfo("CBasePlayer""m_hMyWeapons");

    if(
m_hMyWeapons == -1)
    {
        
char Error[128];
        
FormatEx(Errorsizeof(Error), "FATAL ERROR m_hMyWeapons [%d]. Please contact the author."m_hMyWeapons);
        
SetFailState(Error);
    }
}

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

public 
Action OnPlayerRunCmd(int clientint &buttonsint &impulsefloat vel[3], float angles[3], int &weaponint &subtypeint &cmdnumint &tickcountint &seedint mouse[2])
{
    if(!
g_bEnable || !IsPlayerAlive(client))
        return 
Plugin_Continue;
    
    
// Get the fake decoy
    
int iEntity EntRefToEntIndex(g_iFakeWeaponRef[client]);
    
    
int iWeapon = -1;
    for (
int i=CS_SLOT_PRIMARYi<CS_SLOT_C4i++) {
        
iWeapon GetPlayerWeaponSlot(clienti);
        if (
== CS_SLOT_GRENADE) {            // fix bug with molotov in TeamGames plugin
            
char Class[64];
            for(
int j=0,ent=0j<128j+=4) {
                
ent GetEntDataEnt2(clientm_hMyWeapons j);
                if(
ent>0) {
                    
GetEdictClassname(ent, Class, sizeof(Class));
                    if(!
StrEqual(Class, "weapon_decoy")) {
                        
iWeapon ent;
                        break;
                    }
                }
            }
        }
        if(
iWeapon 0)
            break;
    }
    
    
// No fake decoy needed anymore
    
if(iWeapon != iEntity && iEntity MaxClients && iEntity != INVALID_ENT_REFERENCE)
    {
        
PrintToConsole(client"No fake decoy needed anymore iWeapon = %i iEntity = %i"iWeaponiEntity);
        
SetEntProp(clientProp_Data"m_bDrawViewmodel"1);
        
        
AcceptEntityInput(iEntity"Kill");
        
        
g_iFakeWeaponRef[client] = 0;
    }
    
// Create a new fake decoy
    
else if(iWeapon <= 0)
    {
        
PrintToConsole(client"Create a new fake decoy iWeapon = %i iEntity = %i"iWeaponiEntity);
        
SetEntProp(clientProp_Data"m_bDrawViewmodel"0);
        
        
iWeapon GivePlayerItem(client"weapon_decoy");
        
        
PreventThrowable(clientiWeapon);
    
        
g_iFakeWeaponRef[client] = EntIndexToEntRef(iWeapon);
        
iEntity EntRefToEntIndex(g_iFakeWeaponRef[client]);
        
PrintToConsole(client"Create a new fake decoy iWeapon = %i iEntity = %i"iWeaponiEntity);
    }
    
// Prevent decoy from being throwable
    
else if(iWeapon == iEntity && iEntity MaxClients && iEntity != INVALID_ENT_REFERENCE)
        
PreventThrowable(clientiWeapon);
    
    return 
Plugin_Continue;
}

void PreventThrowable(int clientint iWeapon)
{
    
float fUnlockTime GetGameTime() + 0.5;
        
    
SetEntPropFloat(clientProp_Send"m_flNextAttack"fUnlockTime);
    
SetEntPropFloat(iWeaponProp_Send"m_flNextPrimaryAttack"fUnlockTime);

Now plugin always detect non weapon_decoy grenades

General changes in " // Get the fake decoy " part

Last edited by SHAREN; 10-28-2016 at 15:02.
SHAREN is offline
Send a message via Skype™ to SHAREN
zipcore
Veteran Member
Join Date: Mar 2010
Location: m_flZipcore
Old 10-29-2016 , 05:14   Re: [CS:GO] No weapon fix 3.0 (Player models lay on ground fix)
Reply With Quote #40

There are still problems with your version, I've rewritten it to use m_hMyWeapons
Additionally I've added a cvar to make grenades non-throwable at all for special servers like "trade servers", since this plugin will conflict with weapon restriction.

EDIT: Conflict with ingame menus has been fixed aswell.
__________________

Last edited by zipcore; 10-29-2016 at 05:20.
zipcore is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 00:32.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode