Raised This Month: $ Target: $400
 0% 

Problem with lasermine, crash the server


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Netsys
Senior Member
Join Date: Feb 2010
Old 08-19-2012 , 10:58   Re: Problem with lasermine, crash the server
Reply With Quote #3

Quote:
Originally Posted by claudiuhks View Post
Instead of using that while statement, you may loop using for through all players then check the range with entity_range instead of getting each entity classname.

What kind of error are you talking about? Infinite loop? Then try using for statement.
Segmentation fault? Make sure you are using remove_entity properly.
Is this okay?
PHP Code:
/* Check if player stuck in the lasermine */
static Float:originF[3], owneriuser4recovery;
entity_get_vectorentity EV_VEC_origin originF );
owner entity_get_intentity EV_INT_iuser3 );
iuser4 1;
recovery false;
                
for( new 
player 1player <= g_maxplayersplayer++ )
{
    if( !
is_user_valid_connectedplayer ) || !is_user_valid_aliveplayer ) )
        continue;
                    
    if( 
entity_rangeplayer entity ) > 7.5 )
        continue;
                    
    if( 
owner != player && !recovery )
    {
        
g_lm[owner]++;
        
colored_printowner "^x04[%s]^x01 Has recuperado^x03 1^x01 lasermine"TAG_PRINT );
        
recovery true;
    }
                    
    
iuser4 2;
}
                
entity_set_intentity EV_INT_solid SOLID_BBOX );
entity_set_intentity EV_INT_iuser4 iuser4 ); 
Logs of error: Sys_error: HamFilter

What's the HamFilter problem?

Last edited by Netsys; 08-19-2012 at 12:46.
Netsys 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 05:41.


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