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 == 0 && 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(iBall, iEnt)
{
if( GAME_DGBALL <= g_iCurrentGame <= GAME_ZMBOMBS )
{
return PLUGIN_CONTINUE;
}
if(iEnt == 0 && GAME_DGBALL <= g_iCurrentGame <= GAME_ZMBOMBS)
{
entity_set_int(iBall, EV_INT_iuser1, 1)
set_rendering(iBall);
}
else
{
new iClassname[32]
entity_get_string(iEnt,EV_SZ_classname, iClassname, charsmax(iClassname))
if(equali(iClassname,"func_", 5))
{
entity_set_int(iBall, EV_INT_iuser1, 1)
set_rendering(iBall)
new Float:start[3], Float:end[3], Float:ground[3]
entity_get_vector(iBall, EV_VEC_origin, start)
end = start
end[2] -= 1024.0
trace_line(iEnt,start,end,ground)
ground[2] += 7.0
entity_set_vector(iBall, EV_VEC_origin, ground)
}
}
return PLUGIN_CONTINUE
}