If I want set the health of client that respawn,like this?
PHP Code:
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 ) )
{
new name[32]
get_user_name(id,name,31)
ExecuteHamB( Ham_CS_RoundRespawn, id );
client_print( id, print_chat, "%s use Manual Respawn.%d respawn left.", ( name,limit - g_iRespawnCount[ id ] ) );
give_item(id,"weapon_mp5navy")
give_item(id,"ammo_9mm")
give_item(id,"ammo_9mm")
return PLUGIN_CONTINUE;
} else {
client_print( id, print_chat, "You must be dead to acces Manual Respawn." );
return PLUGIN_CONTINUE;
}
return PLUGIN_CONTINUE;
}
To..
PHP Code:
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 ) )
{
new name[32]
get_user_name(id,name,31)
ExecuteHamB( Ham_CS_RoundRespawn, id );
client_print( id, print_chat, "%s use Manual Respawn.%d respawn left.", ( name,limit - g_iRespawnCount[ id ] ) );
give_item(id,"weapon_mp5navy")
give_item(id,"ammo_9mm")
give_item(id,"ammo_9mm")
set_user_health(id,50)
return PLUGIN_CONTINUE;
} else {
client_print( id, print_chat, "You must be dead to acces Manual Respawn." );
return PLUGIN_CONTINUE;
}
return PLUGIN_CONTINUE;
}
Right?
__________________
~
+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 ~