hey. Im trying to make a revive plugin for cs. I got it to revive a player, but in order to do so you have to type their full name (case sensitive) Does anyone know a way to get around that?
here is my plugins code
Code:
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fun>
#include <engine>
#define PLUGIN "Revive"
#define VERSION "1.0"
#define AUTHOR "Demon"
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_concmd("amx_revive","revive_player", ADMIN_KICK, "Revive a player.")
}
public revive_player(id, level, cid)
{
if (!cmd_access(id, level, cid,2))
{
return PLUGIN_HANDLED
}
new Player[30]
new PlayerIndex
read_argv(1,Player,29)
PlayerIndex = get_user_index(Player)
if(!is_user_alive(PlayerIndex))
{
spawn(PlayerIndex)
return(PLUGIN_HANDLED)
}
return(PLUGIN_HANDLED)
}
[/small]