AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Help here plzz (Timer) !!! (https://forums.alliedmods.net/showthread.php?t=173249)

NiceGuyx 12-02-2011 15:02

Help here plzz (Timer) !!!
 
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!!!

Xscript 12-02-2011 15:13

Re: Help here plzz (Timer) !!!
 
this is difficalt sorry

kotinha 12-02-2011 15:16

Re: Help here plzz (Timer) !!!
 
Use in cmd_play set_task() function to call another function with what you're trying to do.

Xpawn 12-02-2011 15:19

Re: Help here plzz (Timer) !!!
 
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



Xpawn 12-02-2011 15:30

Re: Help here plzz (Timer) !!!
 
Buy befor 1 he and say /infgrenade

NiceGuyx 12-02-2011 15:37

Re: Help here plzz (Timer) !!!
 
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 12-02-2011 15:39

Re: Help here plzz (Timer) !!!
 
Quote:

Originally Posted by Xpawn (Post 1606528)
#include <amxmodx>
#include <amxmisc>
#include <cstrike>

....

You think i'm an idiot?

I know this, i want only add some modifications on my plugin

Xpawn 12-02-2011 15:46

Re: Help here plzz (Timer) !!!
 
bad Plugin :down:

Devil259 12-02-2011 16:12

Re: Help here plzz (Timer) !!!
 
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 }

joshknifer 12-02-2011 16:18

Re: Help here plzz (Timer) !!!
 
Why do i get the feeling the same person is arguing with themselves lol?


All times are GMT -4. The time now is 08:27.

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