Here is the correct way!
Code:
static const g_reason[] = "blah blah....."
public plugin_init() {
....
register_event("DeathMsg", "death_msg", "a")
}
public death_msg()
{
new victim = read_data(2)
switch(get_pcvar_num(killed))
{
case 1:
server_cmd("amx_ban #%i %d ^"%s^"", get_user_userid(victim), get_pcvar_num(bantime), g_reason)
case 2:
server_cmd("kick #%i ^"%s^"", get_user_userid(victim), g_reason)
}
}
Also i see you use "
get_pcvar_num(reason)" ,that is incorrect! You must use "
get_pcvar_string(pcvar)" to get a string!
__________________