Raised This Month: $37 Target: $400
 9% 

GivePlayerItem Crashing Server


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
CliptonHeist
Member
Join Date: Feb 2016
Old 01-13-2019 , 19: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 , 20: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 20:59.
8guawong is offline
CliptonHeist
Member
Join Date: Feb 2016
Old 01-13-2019 , 21: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 21:57.
CliptonHeist 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 19:12.


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