View Single Post
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 06-14-2011 , 12:59   Re: I'll plant the bomb on...
Reply With Quote #10

PHP Code:
    while( ( target find_ent_by_classtargetclassnames[0] ) ) || ( target find_ent_by_classtargetclassnames[1] ) ) )
        
i++; 
This will enter in an infinite loop.

->

PHP Code:
    if( !find_ent_by_class( -1"func_bomb_target" ) && !find_ent_by_class( -1"info_bomb_target" ) )
        
pause("a"); 

Don't return any value in plugin_init.


PHP Code:
    if( ( !is_user_aliveid ) ) || ( !user_has_weaponidCSW_C4 ) ) ) return PLUGIN_HANDLED;
    else { 
Not really important, but you don't need else statement if you return at previous checks.
Would be same to reverse checks (if is_user_alive and user_has_weapon) and put following code into block.
__________________
- tired and retired -

- my plugins -

Last edited by ConnorMcLeod; 06-14-2011 at 13:03.
ConnorMcLeod is offline