Raised This Month: $ Target: $400
 0% 

Changing win msgs


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Fawkes37
Senior Member
Join Date: Jul 2008
Old 12-30-2008 , 11:10   Changing win msgs
Reply With Quote #1

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
Fawkes37 is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 09:15.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode