Raised This Month: $ Target: $400
 0% 

Bot support question


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 11-16-2011 , 23:56   Re: Bot support question
Reply With Quote #8

Install the attached plugin.
Then in your plugin put this function :

PHP Code:
public cz_bot_ham_registerableid )
{


Example :
PHP Code:
public plugin_init()
{
    
// register as usual for normal players
    
RegisterHam(Ham_Spawn"player""Player_Spawn"1)
}

public 
cz_bot_ham_registerablebot_index )
{
    
// register for bots here
    
RegisterHamFromEntity(Ham_Spawnbot_index"Player_Spawn"1)
}

public 
Player_Spawnid )
{
    if( 
is_user_alive(id) )
    {
        
set_user_health(id150)
    }

Attached Files
File Type: sma Get Plugin or Get Source (ham_register_cz_bots.sma - 587 views - 1.8 KB)
__________________
- tired and retired -

- my plugins -

Last edited by ConnorMcLeod; 11-16-2011 at 23:57.
ConnorMcLeod 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:27.


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