haha, i thought you meant revive another player ^^
Well, if you want to respawn another player use this:
PHP Code:
/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <hamsandwich>
#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "author"
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_clcmd("say", "cmdHookSay");
}
public cmdHookSay(id) {
new iArgs[38], iArg1[6], iArg2[33];
read_args( iArgs, 37 );
remove_quotes( iArgs );
if( containi(iArgs, "revive") == -1 && iArgs[0] != '/' )
return PLUGIN_CONTINUE;
parse( iArgs, iArg1, 5, iArg2, 32 );
if( equali(iArg1, "/revive", 5) && get_user_flags(id) & ADMIN_CHAT ) {
new iPlayer = cmd_target( id, iArg2, 4 );
if( iPlayer ) {
if (!is_user_alive(iPlayer) && cs_get_user_team(id) != CS_TEAM_SPECTATOR ) {
new szAdminName[32], szPlayerName[32];
get_user_name(id, szAdminName, 31);
get_user_name(iPlayer, szPlayerName, 31);
ExecuteHam(Ham_CS_RoundRespawn, id);
client_print(iPlayer, print_chat, "ADMIN %s revived you", szAdminName);
client_print(id, print_chat, "You revived %s", szPlayerName);
}
}
else if( !equal(iArg2, "") )
client_print(id, print_chat, "Failed to find player named %s.", iArg2);
else if( equal(iArg2, "") )
client_print(id, print_chat, "Usage: /revive <nick>");
}
return PLUGIN_CONTINUE;
}
Usage:
Say in chat: /revive name