Raised This Month: $51 Target: $400
 12% 

[SOLVED]Problem with Ham


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Randomize
BANNED
Join Date: May 2012
Location: in your heart
Old 08-10-2013 , 02:39   [SOLVED]Problem with Ham
Reply With Quote #1

I'm trying to give all T C4 everytime they spawn using Ham_Spawn but it seems don't work at all, what's wrong? Also when all the T have C4, their C4 don't show on their back?

PHP Code:
public plugin_init()
{
    
register_clcmd("say /c4""give_c4")

PHP Code:
public give_c4(id)
{
    new 
players[32], playersnum
    get_players
(playersplayersnum"e""TERRORIST")
    
    new 
i
    
for (playersnum ; ++i)
    {
        new 
players[i]
        if (
is_user_alive(x))
        {
            
give_item(x"weapon_c4")
            
cs_set_user_plant(x11)
        }
    }

EDIT: SOLVED

Last edited by Randomize; 08-10-2013 at 03:20. Reason: EDIT
Randomize is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 08-10-2013 , 04:08   Re: [SOLVED]Problem with Ham
Reply With Quote #2

At new round, players drop their c4, so after you've just given them one.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Black Rose
Veteran Member
Join Date: Feb 2011
Location: Stockholm, Sweden
Old 08-10-2013 , 04:24   Re: [SOLVED]Problem with Ham
Reply With Quote #3

Quote:
Originally Posted by Randomize View Post
EDIT: SOLVED
Please share the solution so that others can learn from it.

Quote:
Originally Posted by ConnorMcLeod View Post
At new round, players drop their c4, so after you've just given them one.
I don't understand.
__________________

Last edited by Black Rose; 08-10-2013 at 04:26.
Black Rose is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 08-10-2013 , 04:30   Re: [SOLVED]Problem with Ham
Reply With Quote #4

At new round :

1 Players are respawned
2 Players who has a c4 weapon drop them (this is stopping your reloading process when you are reloading)
3 A terrorist is given a c4
4 Ground weapons are removed.

So, give a c4 at spawn has no effect, except for players who has just arrived on server and who spawn outside of the new round process.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Black Rose
Veteran Member
Join Date: Feb 2011
Location: Stockholm, Sweden
Old 08-10-2013 , 04:36   Re: [SOLVED]Problem with Ham
Reply With Quote #5

Thanks, now I understand.
__________________
Black Rose is offline
Randomize
BANNED
Join Date: May 2012
Location: in your heart
Old 08-10-2013 , 05:13   Re: [SOLVED]Problem with Ham
Reply With Quote #6

Connor, okay thanks for the information, but I have one trouble left. The bot doesn't want to defuse it, they just stay where they stand.
Black Rose: I solve this like this:
PHP Code:
register_logevent("give_c4"2"1=Round_Start"
and

PHP Code:
public give_c4(id)
{
    new 
players[32], playersnum
    get_players
(playersplayersnum"ae""TERRORIST")
    
    for (new 
playersnum ; ++i)
    {
        new 
players[i]
        
give_item(x"weapon_c4")
        
cs_set_user_plant(x11)
        
set_pev(xpev_body1//this is for set the backpack
    
}

Randomize 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 21:33.


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