Raised This Month: $ Target: $400
 0% 

[SOLVED] Ham Touch doesn't work on POD BOT-s :(


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 04-13-2009 , 09:43   Re: [SOLVED] Ham Touch doesn't work on POD BOT-s :(
Reply With Quote #9

I was wrong, you don't need to resend, will post the code in few seconds/minutes.

Ok, tested on my listenserver, so 1 represent(=listenserver) my player id, all other players were BOTs.
Gives me the bomb each new round, you just have to make it works with your code.

PHP Code:
/*    Copyright © 2009, ConnorMcLeod

    Detect c4 is free software;
    you can redistribute it and/or modify it under the terms of the
    GNU General Public License as published by the Free Software Foundation.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with Detect c4; if not, write to the
    Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.
*/

#include <amxmodx>
#include <cstrike>
#include <engine>
#include <hamsandwich>

#define PLUGIN "Detect c4"
#define AUTHOR "ConnorMcLeod"
#define VERSION "0.0.1"

// #define MAX_PLAYERS    32
#define IsPlayer(%1)    ( 1 <= %1 <= g_iMaxPlayers )

new g_iMaxPlayersgmsgScoreAttrib

public plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)

    
g_iMaxPlayers get_maxplayers()
    
gmsgScoreAttrib get_user_msgid("ScoreAttrib")
    
RegisterHam(Ham_Touch"weapon_c4""C4_Touch")
}

public 
C4_Touch(iEntid)
{
    if( 
IsPlayer(id) && is_user_bot(id) )
    {
        if( 
is_user_alive(1) )
        {
            
SetHamParamEntity(21)
            
SetPlanter(id0)
            
SetPlanter(11)
        }
    }
}

SetPlanter(idbOnOff)
{
    new 
iFlagsiPlantSkill
    
if( bOnOff )
    {
        
iFlags = (1<<1)
        
iPlantSkill 1
    
}

    
cs_set_user_plant(idiPlantSkill// set player ability to plant the bomb (or not)
    
entity_set_int(idEV_INT_bodyiPlantSkill// draw bomb at player's back (or not)

    
message_begin(MSG_BROADCASTgmsgScoreAttrib// show players as bomb carrier in scoreboard (or not)
    
write_byte(id)
    
write_byte(iFlags)
    
message_end()

__________________
- tired and retired -

- my plugins -

Last edited by ConnorMcLeod; 04-13-2009 at 09:48.
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 02:28.


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