How to make a CVAR, on / off zone purchasing
PHP Code:
new iEntity
while( ( iEntity = find_ent_by_class( iEntity, "func_buyzone" ) ) > 0 )
if( entity_get_int( iEntity, EV_INT_iuser1 ) != 1337 )
remove_entity( iEntity );
PHP Code:
public plugin_precache()
{
new iEntity = create_entity( "func_buyzone" );
if( iEntity ) {
entity_set_size( iEntity, Float:{ -4096.0, -4096.0, -4096.0 }, Float:{ -4095.0, -4095.0, -4095.0 } );
entity_set_int( iEntity, EV_INT_iuser1, 1337 );
}
}