AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   message_begin gets an error (https://forums.alliedmods.net/showthread.php?t=49956)

hlstriker 01-16-2007 11:38

message_begin gets an error
 
Hi when I try and compile this code the line with message_begin gets this error...
Quote:

error 035: argument type mismatch (argument 2)
Here is the code...
Code:
public updateScore(id) {     message_begin(MSG_ALL, "ScoreInfo"); /* <--- Gets error here */     write_byte(id); // Player id     write_short(0); // Frags     write_short(0); // Deaths     write_short(0); // Class     write_short(0); // Team     message_end(); }

jim_yang 01-16-2007 11:43

Re: message_begin gets an error
 
should be msgid, get_user_msgid("ScoreInfo")

hlstriker 01-16-2007 11:47

Re: message_begin gets an error
 
Alright thank you :)

Also, the team part...
write_short(0); // Team

Is there a way I can change the text of the team on the score board to show to something custom?

Example:
Change "Counter-Terrorist" to "Team 2"
Change "Terrorist" to "Team 1"
Change "Spectate" to "View"

jim_yang 01-16-2007 11:59

Re: message_begin gets an error
 
that's defined in client-side. you can only change the text your own.


All times are GMT -4. The time now is 22:30.

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