Raised This Month: $51 Target: $400
 12% 

EngFunc_CreateFakeClient makes server crashes


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
mashinata619
Member
Join Date: Aug 2010
Old 12-21-2018 , 17:42   EngFunc_CreateFakeClient makes server crashes
Reply With Quote #1

In the last version of amxx 1.9 - build 5235 makes the server crashes only in Windows
mashinata619 is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 12-22-2018 , 04:13   Re: EngFunc_CreateFakeClient makes server crashes
Reply With Quote #2

Show some code that can reproduce the issue. You are probably using it wrongly and that's why it crashed.
__________________

Last edited by HamletEagle; 12-22-2018 at 05:04.
HamletEagle is offline
mashinata619
Member
Join Date: Aug 2010
Old 12-22-2018 , 10:34   Re: EngFunc_CreateFakeClient makes server crashes
Reply With Quote #3

In plugins.ini I only have this: PMN_BOT_SPEC.amxx. In Linux with the same version of each one I do not have any problem but in Windows crash and the last line in console is VAC secure mode is activated.

PMN_BOT_SPEC
PHP Code:
#include <amxmodx>
#include <cstrike>
#include <fakemeta>
 
#define PLUGIN  "botespectador"
#define AUTHOR  "_|Polimpo4|_"
#define VERSION "1.0"
 
new szname_bot[] = "xxx";                    ////////// NOME BOT 1

new bool:bot_onbot_id;
 
//Cvars
new cv_KickBotscv_ConnectBots
 
public plugin_init()
{
    
register_plugin("botespectador""1.0""_|Polimpo4|_");
    
    
cv_KickBots register_cvar("cv_KickBots","20");                 
    
cv_ConnectBots register_cvar("cv_ConnectBots","20");
    
    
bot_on=false;
    
bot_id=0;
    
set_task(1.4,"fake_make");
    
    return 
PLUGIN_CONTINUE
}
 
public 
fake_make()
{    
    new 
rj[128];
    if((!
bot_on)&&(!bot_id))
    {
        
bot_id=engfunc(EngFunc_CreateFakeClient,szname_bot);
        if(
bot_id 0)
        {
            
engfunc(EngFunc_FreeEntPrivateData,bot_id);
            
dllfunc(DLLFunc_ClientConnect,bot_id,szname_bot,"20.05.45.45.2",rj);
            if(
is_user_connected(bot_id))
            {
                
dllfunc(DLLFunc_ClientPutInServerbot_id);
                
set_pev(bot_id,pev_spawnflags,pev(bot_id,pev_spawnflags)|FL_FAKECLIENT);
                
set_pev(bot_id,pev_flags,pev(bot_id,pev_flags)|FL_FAKECLIENT);
                
cs_set_user_team(bot_idCS_TEAM_SPECTATOR);
                
bot_on true;
            }        
        }        
    }
   
    return 
PLUGIN_CONTINUE;    
}  

public 
client_disconnect(id)
{
    new 
players[32], num
    get_players
(playersnum"c" )

    new 
szConnectBots get_pcvar_num(cv_ConnectBots)
    
    if(
num szConnectBots && !bot_on)
    {
        
fake_make()
    }   
}
 
public 
client_connect(id)
{
    new 
players[32], num
    get_players
(playersnum"c" )
 
    new 
szKickBots get_pcvar_num(cv_KickBots)
 
    if(
num >= szKickBots && bot_on)
    {
        
bot_on=false;
        
bot_id=0;
        
server_cmd("kick ^"%s^""szname_bot); 
    }

Version
PHP Code:
Protocol version 48
Exe version 1.1.2.7
/Stdio (cstrike)
ReHLDS version3.4.0.662-dev
Build date
10:00:34 Sep 15 2018 (1617)
Build fromhttps://github.com/dreamstalker/rehlds/commit/4abeb0c 
ReGameDLL
PHP Code:
ReGameDLL version5.7.0.318-dev
Build date
21:07:26 Oct 30 2018
Build from
https://github.com/s1lentq/ReGameDLL_CS/commit/932001b 
AMXX Version
PHP Code:
AMX Mod X 1.9.0.5235 (http://www.amxmodx.org)
Authors:
        
David "BAILOPAN" AndersonPavol "PM OnoTo" Marko
        Felix 
"SniperBeamer" GeyerJonny "Got His Gun" Bergstrom
        Lukasz 
"SidLuke" WlasinskiChristian "Basic-Master" Hammacher
        Borja 
"faluco" FerrerScott "DS" Ehlert
Compiled
Dec 18 2018 01:20:16
Built from
https://github.com/alliedmodders/amxmodx/commit/6c53524d
Build ID5235:6c53524d
Core mode
JIT+ASM32 
Metamod Version
PHP Code:
Metamod-r v1.3.0.128API (5:13)
Metamod-r build15:47:38 Aug 24 2018
Metamod
-r fromhttps://github.com/theAsmodai/metamod-r/commit/0cf2f70 
Metamod List:
PHP Code:
      description    stat pend  file                  vers         src  load  unload
 
1AMX Mod X      RUN   -    amxmodx_mm.dll        v1.9.0.5235  ini  Start ANY
 
2MySQL          RUN   -    mysql_amxx.dll        v1.9.0.5235  pl1  ANY   ANY
 
3MySQL Threads  RUN   -    mysqlt_amxx.dll       v1.2         pl1  ANY   ANY
 
4SQLite         RUN   -    sqlite_amxx.dll       v1.9.0.5235  pl1  ANY   ANY
 
5Fun            RUN   -    fun_amxx.dll          v1.9.0.5235  pl1  ANY   ANY
 
6Engine         RUN   -    engine_amxx.dll       v1.9.0.5235  pl1  ANY   ANY
 
7FakeMeta       RUN   -    fakemeta_amxx.dll     v1.9.0.5235  pl1  ANY   ANY
 
8GeoIP          RUN   -    geoip_amxx.dll        v1.9.0.5235  pl1  ANY   ANY
 
9CStrike        RUN   -    cstrike_amxx.dll      v1.9.0.5235  pl1  ANY   ANY
 
[10CSX            RUN   -    csx_amxx.dll          v1.9.0.5235  pl1  ANY   ANY
 
[11Ham Sandwich   RUN   -    hamsandwich_amxx.dll  v1.9.0.5235  pl1  ANY   ANY 

Last edited by mashinata619; 12-22-2018 at 10:38.
mashinata619 is offline
Reply



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 01:23.


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