AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   hook cz bots spawn pre (https://forums.alliedmods.net/showthread.php?t=153214)

georgik57 03-20-2011 09:13

hook cz bots spawn pre
 
so...as the tile says
how can i hook the czbots spawn pre?
i need to set their human class then
client_putinserver is too soon
and spawn post is too late
please help

yokomo 03-20-2011 09:19

Re: hook cz bots spawn pre
 
Quote:

Originally Posted by georgik57 (Post 1436419)
so...as the tile says
how can i hook the czbots spawn pre?
i need to set their human class then
client_putinserver is too soon
and spawn post is too late
please help

Why don't use
PHP Code:

public client_connected(indexSomeBoolen[index] = true 


georgik57 03-20-2011 09:20

Re: hook cz bots spawn pre
 
as i said
putinserver is too soon and connect is earlier than that
so...

yokomo 03-20-2011 09:37

Re: hook cz bots spawn pre
 
Quote:

Originally Posted by georgik57 (Post 1436424)
as i said
putinserver is too soon and connect is earlier than that
so...

You want to set random human classes for BOT?

In my zp gender plugin i use client_putinserver(index) to set random gender for BOT, and they will spawn with random gender. There is no problem with it. You need to modify your core plugin to set human classes on spawn event.

I use this method for my zp gender plugin.

georgik57 03-20-2011 14:28

Re: hook cz bots spawn pre
 
if i set a random human class for the bots on putinserver it doesn't solve the problem and also some other strange bugs occur like i(as human) can kill other human bots, they can kill eachother even if they are both in the same team, etc
so i'm all out of ideas
and i really need to do this to support CZ

ConnorMcLeod 03-24-2011 14:29

Re: hook cz bots spawn pre
 
Why putinserver doesn't work ? i mean show code or explain better what you do.

georgik57 03-24-2011 14:43

Re: hook cz bots spawn pre
 
if i use putinserver strange bugs start happening like bots can kill each other while on the same team, etc

ConnorMcLeod 03-24-2011 15:05

Re: hook cz bots spawn pre
 
You don't explain anything you do in the code, don't expect any help then.

georgik57 03-24-2011 15:21

Re: hook cz bots spawn pre
 
i've fixed it
logic error -.-
thank you both

Exolent[jNr] 03-24-2011 17:29

Re: hook cz bots spawn pre
 
Quote:

Originally Posted by georgik57 (Post 1438728)
bump
anyone please?

Don't bump until 2 weeks have passed since last post.


All times are GMT -4. The time now is 14:41.

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