Raised This Month: $ Target: $400
 0% 

Help here plzz (Timer) !!!


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
NiceGuyx
Senior Member
Join Date: Nov 2011
Old 12-02-2011 , 15:02   Help here plzz (Timer) !!!
Reply With Quote #1

Hello, I want after i say /infgrenade Then: (Wait 5secondes before giving to me 100 HE grenade)

What i have to add on this code?:

PHP Code:
register_clcmd("say /infgrenade""cmd_play")

public 
cmd_play(id)
{
        
give_itemid"weapon_hegrenade" );
        
cs_set_user_bpammoidCSW_HEGRENADE100 );

Thanks!!!
NiceGuyx is offline
Xscript
Junior Member
Join Date: Nov 2011
Old 12-02-2011 , 15:13   Re: Help here plzz (Timer) !!!
Reply With Quote #2

this is difficalt sorry
Xscript is offline
kotinha
Senior Member
Join Date: Jun 2009
Location: Alentejo, Portugal :)
Old 12-02-2011 , 15:16   Re: Help here plzz (Timer) !!!
Reply With Quote #3

Use in cmd_play set_task() function to call another function with what you're trying to do.
__________________
"If God exists, I hope he has a good excuse." - Woody Allen
kotinha is offline
Xpawn
Junior Member
Join Date: Dec 2011
Old 12-02-2011 , 15:19   Re: Help here plzz (Timer) !!!
Reply With Quote #4

This is the correct


PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <cstrike>

public plugin_init() {
    
register_plugin("100HE""0.1""Xpawn")
    
register_clcmd("say /infgrenade""cmd_play")
}
public 
cmd_play(id)
{
        
cs_set_user_bpammoidCSW_HEGRENADE100 )
    return 
PLUGIN_CONTINUE

__________________
New Member

Last edited by Xpawn; 12-02-2011 at 15:23.
Xpawn is offline
Send a message via MSN to Xpawn
Xpawn
Junior Member
Join Date: Dec 2011
Old 12-02-2011 , 15:30   Re: Help here plzz (Timer) !!!
Reply With Quote #5

Buy befor 1 he and say /infgrenade
__________________
New Member
Xpawn is offline
Send a message via MSN to Xpawn
NiceGuyx
Senior Member
Join Date: Nov 2011
Old 12-02-2011 , 15:37   Re: Help here plzz (Timer) !!!
Reply With Quote #6

Like this??

PHP Code:
#define TASK_ID 1337


public cmd_play(id)
{
        
set_task(5.0"cmd_weapon"TASK_ID);
}  

public 
cmd_weapon(id)
{
        
give_itemid"weapon_hegrenade" );
        
cs_set_user_bpammoidCSW_HEGRENADE100 );

NiceGuyx is offline
NiceGuyx
Senior Member
Join Date: Nov 2011
Old 12-02-2011 , 15:39   Re: Help here plzz (Timer) !!!
Reply With Quote #7

Quote:
Originally Posted by Xpawn View Post
#include <amxmodx>
#include <amxmisc>
#include <cstrike>

....
You think i'm an idiot?

I know this, i want only add some modifications on my plugin
NiceGuyx is offline
Xpawn
Junior Member
Join Date: Dec 2011
Old 12-02-2011 , 15:46   Re: Help here plzz (Timer) !!!
Reply With Quote #8

bad Plugin
__________________
New Member
Xpawn is offline
Send a message via MSN to Xpawn
Devil259
Veteran Member
Join Date: Dec 2009
Location: France (59)
Old 12-02-2011 , 16:12   Re: Help here plzz (Timer) !!!
Reply With Quote #9

Code:
#include < amxmodx > #include < fun > public plugin_init( ) {     set_task( 3.0 , "check" , .flags="b" ) } public check( ) {     new players[ 32 ] , num , i , id     get_players( players , num , "ach" )         for( i = 0; i < num; i++ )     {         id = players[ i ]                 if( !user_has_weapon( id , CSW_HEGRENADE ) )         {             give_item( id , "weapon_hegrenade" )         }     }         return PLUGIN_CONTINUE }
Devil259 is offline
joshknifer
Veteran Member
Join Date: Jun 2011
Location: Denver, CO
Old 12-02-2011 , 16:18   Re: Help here plzz (Timer) !!!
Reply With Quote #10

Why do i get the feeling the same person is arguing with themselves lol?
__________________
joshknifer is offline
Send a message via Skype™ to joshknifer
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 22:06.


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