View Single Post
Firewall_
Senior Member
Join Date: Aug 2012
Old 01-08-2017 , 14:29   Re: Module: Fake Server Queries
Reply With Quote #132

Quote:
Originally Posted by Shooting King View Post
@Firewall_

Did you try it on a fresh installation ? Its hard for me to try all combinations.
i found problem. Problem is in codes.

Example;

when i used this plugin, no problem all function works correct.

Code:
#include <amxmodx> 
#include <fake_queries> 

new const szHostName[] = "Shooting Kings Test Server"; 
new const szMapName[] = "sk_dust2"; 
new const szGameName[] = "AM Game"; 

new const iPlayers = 12; 
new const iMaxPlayers = 64; 
new const iBotsNum = 0; 

public plugin_init() 
{ 
    register_plugin( "FakeQueries", "1.0", "Shooting King" ); 
     
    fq_set_hostname( szHostName ); 
    fq_set_mapname( szMapName ); 
    fq_set_gamename( szGameName ); 

    if( !fq_set_players(iPlayers) ) 
        log_amx( "Players Successfully Set." ); 
    else 
        log_amx( "Players Failed to Set." ); 

    if( !fq_set_maxplayers(iMaxPlayers) ) 
        log_amx( "MaxPlayers Successfully Set." ); 
    else 
        log_amx( "MaxPlayers Failed to Set." ); 

    if( !fq_set_botsnum(iBotsNum) ) 
        log_amx( "Bots Successfully Set." ); 
    else 
        log_amx( "Bots Failed to Set." ); 
}

but when i use only bot function, problem starts...


you can test this code and you will see problem;


Code:
#include <amxmodx> 
#include <fake_queries> 


new const iBotsNum = 0; 

public plugin_init() 
{ 
    register_plugin( "FakeQueries", "1.0", "Shooting King" ); 

    if( !fq_set_botsnum(iBotsNum) ) 
        log_amx( "Bots Successfully Set." ); 
    else 
        log_amx( "Bots Failed to Set." ); 
}
Firewall_ is offline