Raised This Month: $ Target: $400
 0% 

How do I spawn a bot after I create it??


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Geesu
Veteran Member
Join Date: Mar 2004
Location: Cincinnati, OH
Old 04-26-2006 , 15:29   How do I spawn a bot after I create it??
Reply With Quote #1

Basically I can create the bots, but how do I spawn them?

Code:
        engfunc( EngFunc_CreateFakeClient, "" );         engfunc( EngFunc_CreateFakeClient, "" );         engfunc( EngFunc_CreateFakeClient, "" );         engfunc( EngFunc_CreateFakeClient, "" );         engfunc( EngFunc_CreateFakeClient, "" );         new players[32], iPlayerNum, id, i;         get_players( players, iPlayerNum, "b" );         for ( i = 0; i < iPlayerNum; i++ )         {             id = players[i];             if ( is_user_bot( id ) && !is_user_alive( id ) )             {                 server_print( "Spawning %d", id );                 spawn( id );             }         }

The above doesn't work
__________________
Need war3ft help? DO NOT PM ME... Check the forums
Geesu is offline
Send a message via AIM to Geesu Send a message via MSN to Geesu
Des12
Senior Member
Join Date: Jan 2005
Old 04-26-2006 , 18:04  
Reply With Quote #2

I think you need two spawns:

Code:
engfunc( EngFunc_CreateFakeClient, "" );         engfunc( EngFunc_CreateFakeClient, "" );         engfunc( EngFunc_CreateFakeClient, "" );         engfunc( EngFunc_CreateFakeClient, "" );         engfunc( EngFunc_CreateFakeClient, "" );         new players[32], iPlayerNum, id, i;         get_players( players, iPlayerNum, "b" );         for ( i = 0; i < iPlayerNum; i++ )         {             id = players[i];             if ( is_user_bot( id ) && !is_user_alive( id ) )             {                 server_print( "Spawning %d", id );                 spawn( id );                 spawn( id );             }         }
__________________
-Dest Romano

www.JustRP.com
A TSRP Server

Quote:
Originally Posted by Brad
Don't you go be bringing reality into this.
Des12 is offline
Urahara
Member
Join Date: Apr 2006
Old 04-26-2006 , 18:45  
Reply With Quote #3

Ohayo Geesu-san!

that particular FM function returns the ID of the bot Geesu-san! if you will simply make it connect using the dllfunc for clientconnect im sure you will get a fully functional bot, nyaah?

if not please try putinserver as you see bots are clients too and must not be simply forcibly spawned like that no no they get sad if they are not properly spawned

something along these lines works for ESF and SVEN Geesu-san!

Code:
public spawn_bot(id)
{
	new ent = engfunc(EngFunc_CreateFakeClient,"Urahara")
	if(!ent) return 0;

	set_user_info(ent,"model","BLEACHurahara")

	dllfunc(DLLFunc_ClientPutInServer,ent)

	finish_spawn(ent)

	return ent;
}

where finish_spawn is equivilent to a generic list of DispatchKeys though a ClientConnect should work better!
__________________

Urahara's Shop is open! For all your needs:
http://urahara.amxmodx.org/forums/
Projects:
Ururu AntiCheat
MetaScript Library
Jinta Hax
Urahara is offline
p3tsin
Senior Member
Join Date: Sep 2005
Location: Finland
Old 04-27-2006 , 09:09  
Reply With Quote #4

uh, what comes after running ClientConnect and ClientPutInServer?
i tried cs_set_user_team() and it makes the bot spawn correctly, but it still acts like if it was in spectator mode (teleporting around the map to the spots where cameras are located)
__________________
plop
p3tsin 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 05:03.


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