Raised This Month: $ Target: $400
 0% 

[ Solved ] server crush


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
xPaw
Retired AMX Mod X Moderator
Join Date: Jul 2008
Old 07-20-2008 , 12:44   [ Solved ] server crush
Reply With Quote #1

my plugin crushes server, why ?

PHP Code:
#include <amxmodx>
#include <fakemeta>
#include <cstrike>

//Set botname here.
#define BOTNAME "botname here"

public plugin_init() 
{
    
register_plugin("FakePlayer""1.0""xPaw")

    
createBot()
}

public 
createBot()
{
    new 
bot;
    
        
//is bot in server already?
        
bot find_player("bi"BOTNAME)
        if(
bot) {
            return 
PLUGIN_HANDLED
        
}
        
        
//bot not in server, create them.
        
bot engfunc(EngFunc_CreateFakeClientBOTNAME)
        new 
ptr[128];
        
dllfunc(DLLFunc_ClientConnectbotBOTNAME"127.0.0.1"ptr)
        
dllfunc(DLLFunc_ClientPutInServerbot)
        
cs_set_user_team(botCS_TEAM_SPECTATORCS_DONTCHANGE)

        return 
PLUGIN_CONTINUE


Last edited by xPaw; 08-26-2008 at 09:05.
xPaw 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 05:31.


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