Raised This Month: $ Target: $400
 0% 

[Help] Log errors


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
hornet
AMX Mod X Plugin Approver
Join Date: Mar 2010
Location: Australia
Old 05-07-2012 , 07:26   Re: [Help] Log errors
Reply With Quote #2

I know how to fix this, however I'd also like to know exactly why it happens? I can only assume it's some other kind of entity being spawned which is weird because the hook is for players only and post hook too. Explanation anyone?

This'll remove that error:

PHP Code:
#include <amxmodx>
#include <fun>
#include <cstrike>
#include <hamsandwich>

public plugin_init()
{
    
register_plugin("VIPAdd""1.0""Plc0tad0")
    
    
RegisterHam(Ham_Spawn"player""HamPlayerSpawn"1)
}

public 
HamPlayerSpawn(id)
{
    if( !
is_user_aliveid ) )
        return 
HAM_IGNORED;
    
    if(
get_user_flags(id) & ADMIN_RESERVATION)
    {
        
strip_user_weapons(id)
        
give_item(id"weapon_knife")
        
give_item(id"weapon_m3")
        
give_item(id"weapon_deagle")
        
give_item(id"weapon_hegrenade")
        
give_item(id"weapon_flashbang")
        
give_item(id"weapon_flashbang")
        
give_item(id"weapon_smokegrenade")
        
cs_set_user_bpammo(idCSW_DEAGLE35)
        
cs_set_user_bpammo(idCSW_M332)
        
set_user_health(id200)
        
set_user_armor(id200)
    }
    
    return 
HAM_IGNORED;

__________________
Quote:
vBulletin Tip #42: Not much would be accomplished by merging this item with itself.

Last edited by hornet; 05-07-2012 at 07:32. Reason: Just fixed it ... it wasn't going to work that way
hornet is offline
 



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:28.


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