Raised This Month: $ Target: $400
 0% 

Check if(variable)... Doesn't work


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
proffs
Senior Member
Join Date: Jul 2013
Old 03-28-2014 , 13:35   Check if(variable)... Doesn't work
Reply With Quote #1

I need to check if( GAME_DGBALL <= g_iCurrentGame <= GAME_ZMBOMBS )

This is my way to do it, but this part:
PHP Code:
if(iEnt == && GAME_DGBALL <= g_iCurrentGame <= GAME_ZMBOMBS
    { 
Makes it crash the server.

If I only have:

PHP Code:
if( GAME_DGBALL <= g_iCurrentGame <= GAME_ZMBOMBS )
    {
        return 
PLUGIN_CONTINUE;
    } 

It wont work because fuck logic?

PHP Code:
public ball_interact(iBalliEnt
{    
    if( 
GAME_DGBALL <= g_iCurrentGame <= GAME_ZMBOMBS )
    {
        return 
PLUGIN_CONTINUE;
    }    
    
    if(
iEnt == && GAME_DGBALL <= g_iCurrentGame <= GAME_ZMBOMBS
    {
        
entity_set_int(iBallEV_INT_iuser11)
        
set_rendering(iBall);
    }
    else 
    {
        new 
iClassname[32]
        
entity_get_string(iEnt,EV_SZ_classnameiClassnamecharsmax(iClassname))
        
        if(
equali(iClassname,"func_"5)) 
        {
            
entity_set_int(iBallEV_INT_iuser11)
            
set_rendering(iBall)

            new 
Float:start[3], Float:end[3], Float:ground[3]
            
entity_get_vector(iBallEV_VEC_originstart)
            
end start
            end
[2] -= 1024.0
            trace_line
(iEnt,start,end,ground)
            
ground[2] += 7.0
            entity_set_vector
(iBallEV_VEC_originground)
        }
    }
    return 
PLUGIN_CONTINUE


Last edited by proffs; 03-28-2014 at 14:06.
proffs 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 06:03.


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