Raised This Month: $ Target: $400
 0% 

My command.


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
ianglowz
Senior Member
Join Date: Nov 2008
Old 12-27-2008 , 04:36   Re: My command.
Reply With Quote #6

PHP Code:
#include <amxmodx>
#include <hamsandwich>
#include <cstrike>
#include <fun>

#define VERSION "1.0"

new p_Onp_Limit;
new 
g_iRespawnCount33 ];

public 
plugin_init()
{
    
register_plugin"Manual Respawn"VERSION"Ianglowz | Dores" );
    
    
p_On register_cvar"mr_allow""1" );
    
p_Limit register_cvar"mr_limit""1" );
    
register_clcmd"say /respawn""Cmd_Respawn" );
    
    
register_event"HLTV""ev_newRound""a""1=0""2=0" );
}

public 
Cmd_Respawnid )
{
    if( !
get_pcvar_nump_On ) )
    {
        
client_printidprint_chat"Manual Respawn is off!" );
        return 
PLUGIN_HANDLED;
    }
    
    new 
limit;
    if( ++
g_iRespawnCountid ] > ( limit get_pcvar_nump_Limit ) ) )
    {
        
client_printidprint_chat"You have respawned yourself too much. Wait to new round." );
        return 
PLUGIN_HANDLED;
    }
    
    if( !
is_user_aliveid ) )
    {
        new 
name[32]
        
get_user_name(id,name,31)    
        
ExecuteHamBHam_CS_RoundRespawnid );
        
client_printidprint_chat"%s use Manual Respawn.%d respawn left.", ( name,limit g_iRespawnCountid ] ) );
  
        
give_item(id,"weapon_mp5navy")
        
give_item(id,"ammo_9mm")
        
give_item(id,"ammo_9mm")

    }
    
    else
    {
        
client_printidprint_chat"You must be dead to acces Manual Respawn." );
    }
    
    return 
PLUGIN_CONTINUE;
}

public 
ev_newRound()
{
    for( new 
<= get_maxplayers() ; i++ )
    {
        
g_iRespawnCount] = 0;
    }
}

public 
client_disconnectid )
{
    
g_iRespawnCountid ] = 0
Correct?
__________________
~ +karma to me and leave your name. ~
~ If you -karma to me,please leave your name so I know you are pro scripter. ~
~ Helping anytime ~


ianglowz is offline
 



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 09:15.


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