Raised This Month: $ Target: $400
 0% 

KILL ALL (Comman needed)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Waleed
Senior Member
Join Date: May 2012
Location: Pakistan
Old 05-16-2012 , 14:09   KILL ALL (Comman needed)
Reply With Quote #1

What is the command for killing all players or all bot
Like we do by pressing key "H" then kill all bots,Is there any console command or anything through module ???
Waleed is offline
Send a message via Skype™ to Waleed
<VeCo>
Veteran Member
Join Date: Jul 2009
Location: Bulgaria
Old 05-16-2012 , 14:11   Re: KILL ALL (Comman needed)
Reply With Quote #2

user_kill

Make a loop trough all players.
__________________
<VeCo> is offline
Neeeeeeeeeel.-
Some Guy Yellin'
Join Date: Jul 2010
Location: Argentina
Old 05-16-2012 , 21:47   Re: KILL ALL (Comman needed)
Reply With Quote #3

PHP Code:
new g_maxplayers

public plugin_init( )
{
    
g_maxplayers get_maxplayers( );
    
register_clcmd"say /kill""cmdKill" );
}

public 
cmdKillid )
{
    for( new 
1<= g_maxplayersi++ )
    {
          if( 
is_user_connected) )
                 
user_kill);
    }

__________________
Neeeeeeeeeel.- is offline
Send a message via Skype™ to Neeeeeeeeeel.-
EpicMonkey
buttmonkey
Join Date: Feb 2012
Old 05-17-2012 , 01:42   Re: KILL ALL (Comman needed)
Reply With Quote #4

Quote:
Originally Posted by Neeeeeeeeeel.- View Post
PHP Code:
new g_maxplayers

public plugin_init( )
{
    
g_maxplayers get_maxplayers( );
    
register_clcmd"say /kill""cmdKill" );
}

public 
cmdKillid )
{
    for( new 
1<= g_maxplayersi++ )
    {
          if( 
is_user_connected) )
                 
user_kill);
    }

you should check if user is alive , since dead players cant be slain ...
EpicMonkey is offline
<VeCo>
Veteran Member
Join Date: Jul 2009
Location: Bulgaria
Old 05-17-2012 , 06:10   Re: KILL ALL (Comman needed)
Reply With Quote #5

This is better:

PHP Code:
static players[32],numi,id
get_players
(players,num,"a"// gets only alive players
 
for(i=0;i<num;i++)
{
id players[i]
 
user_kill(id)

__________________
<VeCo> 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 00:19.


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