Raised This Month: $ Target: $400
 0% 

Eliminating round drawn?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
dajrokan
New Member
Join Date: Apr 2006
Old 06-25-2006 , 20:20   Re: Eliminating round drawn?
Reply With Quote #3

my edit of this plugin (for KZ mod usage):

Code:
#define BOT_NAME "blabla"
new bot_id
new bot_userid
.
.
public client_putinserver(id) {

	new players[32], inum
	get_players(players, inum)

	switch (inum) {
		case 1: mi_bot_connect()
		case 5: mi_bot_disconnect()
	}
	return PLUGIN_CONTINUE
}

public client_disconnect(id) {

	new players[32], inum
	get_players(players, inum)

	switch (inum) {
		case 2: mi_bot_disconnect()
		case 3: mi_bot_connect()
	}
	return PLUGIN_CONTINUE
}
.
.
public mi_bot_connect() {

	if (!bot_id) {
		bot_id = engfunc(EngFunc_CreateFakeClient, BOT_NAME)
		new ptr[128]
		dllfunc(DLLFunc_ClientConnect, bot_id, BOT_NAME, "127.0.0.1", ptr )
		dllfunc(DLLFunc_ClientPutInServer, bot_id)
		cs_set_user_team(bot_id, CS_TEAM_CT, CS_CT_URBAN)
		dllfunc(DLLFunc_Spawn, bot_id)
		set_pev(bot_id, pev_effects, (pev(bot_id, pev_effects) | 128) )
		set_pev(bot_id, pev_solid, 0)
		bot_userid = get_user_userid(bot_id)
	}

	return PLUGIN_CONTINUE
}

public mi_bot_disconnect() {

	if (bot_id) {
//		dllfunc(DLLFunc_ClientDisconnect, bot_id) - wrong /?
		botid = 0
		server_cmd("kick #%d", bot_userid)
	}

	return PLUGIN_CONTINUE
}

Last edited by dajrokan; 06-25-2006 at 20:43. Reason: specification
dajrokan 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 08:08.


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