Raised This Month: $ Target: $400
 0% 

Problem with Bot


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
rectos
New Member
Join Date: Jan 2009
Old 01-24-2009 , 13:54   Problem with Bot
Reply With Quote #1

Hi all.
PHP Code:
// Bot() creates a Bot, puts him in spectators
public Bot() {
    new 
botid
    botid 
find_player("ali"bot_name)
    if(!
botid) {
        
botid engfunc(EngFunc_CreateFakeClientbot_name)
        new 
ptr[128]
        
dllfunc(DLLFunc_ClientConnectbotidbot_name"127.0.0.1"ptr )
        
dllfunc(DLLFunc_ClientPutInServerbotid)
        
cs_set_user_team(botidCS_TEAM_SPECTATOR)
    }
    return 
botid
}
...
//this should kick "username", but...
    
Bot()
    
client_cmd(id"amx_kick %s"username// id = id of Bot, got with get_user_userid 
... i got this, and nothing happens!

L 01/24/2009 - 19:48:47: Invalid player id 18
L 01/24/2009 - 19:48:47: [AMXX] Run time error 10 (plugin "SupraBan.amxx") (native "client_cmd") - debug not enabled!


I want to, let's say, "port" the command amx_kick through the bot, so that it seems like the bot is kicking someone. Anyone help me pls?

Additional info: the bot IS in spect.
rectos is offline
 


Thread Tools
Display Modes

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:44.


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