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

Grenade every 10 seconds


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Ratonel
Member
Join Date: Jul 2012
Location: Romania
Old 12-03-2012 , 13:47   Grenade every 10 seconds
Reply With Quote #1

I want to make a plugin that gives a grenade to all the players every 10 seconds...I know a method but it consumes a lot of resources.
Ratonel is offline
yan1255
Senior Member
Join Date: Jul 2011
Old 12-03-2012 , 13:57   Re: Grenade every 10 seconds
Reply With Quote #2

I believe that should do it...
PHP Code:
#include < amxmodx >
#include < fun >

new gMaxPlayers;

public 
plugin_init( )
{
    
gMaxPlayers get_maxplayers( );
    
    
set_task10.0"ActionGiveGrenade"___"b" );
}

public 
ActionGiveGrenade( )
{
    for(new 
0gMaxPlayersi++) 
    {
        if ( 
is_user_alive) && is_user_connected) )
        {
            
give_itemid"weapon_hegrenade" )
        }
    }

__________________
yan1255 is offline
wickedd
Veteran Member
Join Date: Nov 2009
Old 12-03-2012 , 14:32   Re: Grenade every 10 seconds
Reply With Quote #3

PHP Code:
if ( is_user_alive) && is_user_connected) ) 


PHP Code:
if ( is_user_alive)  ) 
If they are alive, they must be connected.
__________________
Just buy the fucking game!!!!
I hate No-Steamers and lazy ass people.
wickedd is offline
yan1255
Senior Member
Join Date: Jul 2011
Old 12-03-2012 , 14:53   Re: Grenade every 10 seconds
Reply With Quote #4

Quote:
Originally Posted by wickedd View Post
PHP Code:
if ( is_user_alive) && is_user_connected) ) 


PHP Code:
if ( is_user_alive)  ) 
If they are alive, they must be connected.
oops... my mistake
__________________

Last edited by yan1255; 12-03-2012 at 14:54.
yan1255 is offline
Ratonel
Member
Join Date: Jul 2012
Location: Romania
Old 12-04-2012 , 00:13   Re: Grenade every 10 seconds
Reply With Quote #5

Thank you.
Ratonel 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 16:13.


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