hello
i am a newbie, i know. but trying to get this done. i admit that i copied the piece of code directly out of Biohazard and have no skills myself.
so basically what im trying to do is change those "Terrorists win!" and so on messages to w/e i want to. but i get the warning that g_winningteam - symbol assigned a value that is never used. i was just trying but i dont think this piece of code would do the job.
so basically what did i do wrong? (btw, this code aint alone, copied it to another plugin.) heres the piece of code:
Code:
new CsTeams:g_winningteam
register_message(get_user_msgid("TextMsg"), "msg_textmsg");
public msg_textmsg(msgid, dest, id)
{
if(get_msg_arg_int(1) != 4)
return PLUGIN_CONTINUE
static txtmsg[25], winmsg[32]
get_msg_arg_string(2, txtmsg, 24)
if(equal(txtmsg[1], "Game_bomb_drop"))
return PLUGIN_HANDLED
else if(equal(txtmsg[1], "Terrorists_Win"))
{
formatex(winmsg, 31, "%L", LANG_SERVER, "WIN_ZOMBIES")
set_msg_arg_string(2, winmsg)
g_winningteam = CS_TEAM_T
}
else if(equal(txtmsg[1], "Target_Saved") || equal(txtmsg[1], "CTs_Win"))
{
formatex(winmsg, 31, "%L", LANG_SERVER, "WIN_SURVIVORS")
set_msg_arg_string(2, winmsg)
g_winningteam = CS_TEAM_CT
}
return PLUGIN_CONTINUE
}
thx