Raised This Month: $32 Target: $400
 8% 

GivePlayerItem Crashing Server


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
CliptonHeist
Senior Member
Join Date: Feb 2016
Old 01-13-2019 , 18:14   GivePlayerItem Crashing Server
Reply With Quote #1

I'm having an issue with my server crashing whenever I use GivePlayerItem in a plugin.

This is what crashes it:
PHP Code:
public void GiveStartingWeapons()
{
    for(
int i 1<= MaxClientsi++)
    {
        if(!
IsValidClient(i)) continue;

        if(
g_hCV_GiveArmor.BoolValue)
            
SetEntProp(iProp_Send"m_ArmorValue"1001);
        
/*if(g_hCV_GiveHelmet.BoolValue)
            GivePlayerItem(i, "item_assaultsuit");
        if(g_hCV_GiveSmoke.BoolValue)
            GivePlayerItem(i, "weapon_smokegrenade");
        if(g_hCV_GiveHE.BoolValue)
            GivePlayerItem(i, "weapon_hegrenade");
        if(g_hCV_GiveFlash.BoolValue)
            GivePlayerItem(i, "weapon_flashbang");*/
        
if(g_hCV_GiveDecoy.BoolValue)
            
GivePlayerItem(i"weapon_decoy");
    }

If I comment out the last two lines of that function it sets armor value as expected and works just fine. I've tried using a different plugin that uses GivePlayerItem and that also crashes so I'm wondering if the offset for GiveNamedItem has changed? I have the latest SM and I haven't seen anyone else having issues with this so I'm really confused.

Here's an Accelerator crash dump if it helps: https://crash.limetech.org/zxz4autwj7wq
CliptonHeist is offline
8guawong
AlliedModders Donor
Join Date: Dec 2013
Location: BlackMarke7
Old 01-13-2019 , 19:59   Re: GivePlayerItem Crashing Server
Reply With Quote #2

are you using alaways weapon skin plugin?
if you are try updating to the latest version
__________________

Last edited by 8guawong; 01-13-2019 at 19:59.
8guawong is offline
CliptonHeist
Senior Member
Join Date: Feb 2016
Old 01-13-2019 , 20:57   Re: GivePlayerItem Crashing Server
Reply With Quote #3

Quote:
Originally Posted by 8guawong View Post
are you using alaways weapon skin plugin?
if you are try updating to the latest version
Fixed thx, I thought I updated properly but no I'm a dumb dumb.

Last edited by CliptonHeist; 01-13-2019 at 20:57.
CliptonHeist is offline
JiSH
Junior Member
Join Date: Oct 2018
Location: India-West Bengal
Old 06-06-2019 , 18:56   Re: GivePlayerItem Crashing Server
Reply With Quote #4

Additional Info: This bug can also happen due to hooker extension. Happened to me.
__________________
Newbie sourcemod coder with many ideas.
Taking Paid Requests at a very low cost(As low as 2$)
Contact me at discord : Jish#1192
JiSH is offline
Reply


Thread Tools
Display Modes

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 14:53.


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