Ok,I give the code.
PHP Code:
#include <amxmodx>
#include <hamsandwich>
#include <cstrike>
#include <fun>
#define VERSION "1.0"
new p_On, p_Limit;
new g_iRespawnCount[ 33 ];
public plugin_init()
{
register_plugin( "Manual Respawn", VERSION, "Ianglowz | Dores" );
p_On = register_cvar( "mr_allow", "1" );
p_Limit = register_cvar( "mr_limit", "3" );
register_clcmd( "say /respawn", "Cmd_Respawn" );
register_event( "HLTV", "ev_newRound", "a", "1=0", "2=0" );
}
public Cmd_Respawn( id )
{
if( !get_pcvar_num( p_On ) )
{
client_print( id, print_chat, "Manual Respawn is off!" );
return PLUGIN_HANDLED;
}
new limit;
if( ++g_iRespawnCount[ id ] > ( limit = get_pcvar_num( p_Limit ) ) )
{
client_print( id, print_chat, "You have respawned yourself too much. Wait to new round." );
return PLUGIN_HANDLED;
}
if( !is_user_alive( id ) )
{
ExecuteHamB( Ham_CS_RoundRespawn, id );
client_print( id, print_chat, "Respawns left: %d", ( limit - g_iRespawnCount[ id ] ) );
give_item(id,"weapon_mp5navy")
give_item(id,"ammo_9mm")
give_item(id,"ammo_9mm")
}
else
{
client_print( id, print_chat, "You must be dead." );
}
return PLUGIN_HANDLED;
}
public ev_newRound()
{
for( new i = 1 ; i <= get_maxplayers() ; i++ )
{
g_iRespawnCount[ i ] = 0;
}
}
public client_disconnect( id )
{
g_iRespawnCount[ id ] = 0;
}
When I say /respwan,
It will show like this:
Respawn left:2
I see at one plugin,it show like this.Example that was my plugin.
ianglowz:/respawn
Respawn left at ianglowz:2
I want like this because many people don't that my server has respawn plugin.
__________________
~
+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 ~