Raised This Month: $ Target: $400
 0% 

Ham_TakeDamage crash


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
hackingsoft7
Junior Member
Join Date: Jan 2009
Old 10-12-2010 , 11:18   Ham_TakeDamage crash
Reply With Quote #1

PHP Code:
stock UTIL_KillAlivePlayersid )
{
    
ExecuteHamHam_TakeDamageidbMyOwnWeaponEntid ], id9999.0DMG_GENERIC );

    new 
i;

    for( 
1<= gMaxPlayersi++ )
    {
        if( 
is_user_alive) && get_teamid ) != get_team) )
        {
            
ExecuteHamHam_TakeDamageibMyOwnWeaponEntid ], id9999.0DMG_GENERIC );
        }
    }

okay, i have this lil' stock. the problem is, server is crashing when used this for all players and me. why?

my custom weapon name is

bMyOwnWeaponEnt[ id ] = create_entity( "info_target );
set_pev( bMyOwnWeaponEnt[ id ], pev_classname, "My Weapon Name" );

tell me what is the problem.
hackingsoft7 is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 10-12-2010 , 22:13   Re: Ham_TakeDamage crash
Reply With Quote #2

Works for me with no errors\crashes
Code:
bugsy killed self with My Weapon Name
bugsy killed [P0D]Chris_Tucker (99) with My Weapon Name
bugsy killed [P*D]Clint_Eastwood (99) with My Weapon Name
PHP Code:
#include <amxmodx>
#include <engine>
#include <hamsandwich>

new bMyOwnWeaponEnt;

new 
gMaxPlayers;

public 
plugin_init() 
{
    
register_clcmd"say hi" "UTIL_KillAlivePlayers" );

    
bMyOwnWeaponEnt create_entity"info_target" );
    
entity_set_stringbMyOwnWeaponEnt EV_SZ_classname "My Weapon Name" );
    
    
gMaxPlayers get_maxplayers();
}

public 
UTIL_KillAlivePlayersid )
{
    
ExecuteHamHam_TakeDamage id bMyOwnWeaponEnt id 9999.0 DMG_GENERIC );
    
    for( new 
iPlayer iPlayer <= gMaxPlayers iPlayer++ )
    {
        if( 
is_user_aliveiPlayer ) && ( get_user_teamid ) != get_user_teamiPlayer ) ) )
        {
            
ExecuteHamHam_TakeDamage iPlayer bMyOwnWeaponEnt id 9999.0 DMG_GENERIC );
        }
    }

__________________

Last edited by Bugsy; 10-12-2010 at 22:15.
Bugsy 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 10:28.


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