client_print problem
Hello,
I have some problems with client_print This is how I declared my vars Code:
I read the achievement data from a file, but the weird thing is.. that when I try to print the stored string into chat, it shows me '[AC] Ai primit medalia xph`XPH@80(' Code:
BUT when I use the same variables to print the stored string into server console, it's nothing wrong.. Code:
id_medalie is 3 in both cases. Thanks in advance ^^. LE: BTW, is there any posibility to change the volume of a sound using emit_sound so I can hear it louder? LE2: Great, now crashes the server.. Code:
Code:
Code:
|
Re: client_print problem
Might be due to the fact that 190 is maximum size of the TextMsg event, which is used in the client_print function to actually send the message (see UTIL_ClientPrint below). Not entirely sure however. As it seems to be working correctly with log_amx I would assume so.
Source code from client_print: Code:
About emit_sound() - parameter 4 (vol) decides the volume of the current sound. Also, there is no need to iterate through all players to send a message, simply do the following to send it to all players: Code:
|
Re: client_print problem
1. I made some changes and now it doesn't crash the server anymore.. but still prints like !@#%:
I wanted to check if in console prints ok but.. it doesn't. Only when it loads from file it prints how it should.. This message is printed when the file is readed and stored into vars: Code:
This message is printed when I get the achievement: Code:
Also, the same message is printed in chat. '[AC] Ai primit medalia |xtplhd`\XTPLHD@<840,($' 2. I already tried to change the param volume and if I raise it, the server crashes. Thats why I asked here :-? maybe it's something else, another way maybe. 3. I Iterate through all players cause I send a message to the player who's receiving the Achievement and a different message to all other players. |
Re: client_print problem
Can I see the function where you load the achievements?
|
Re: client_print problem
Quote:
Code:
0 "Ace Shot" "Omoara 2 playeri cu un glont"Code:
Code:
|
Re: client_print problem
Cannot see anything wrong with that code, except for the unnecessary temp variable. Just use charsmax(_ACHIEVEMENT_GlobalInfo[ ][ ACHIEVEMENT_* ]).
Try to format the string then print it using client_print and see what results you have. |
Re: client_print problem
Code:
This is printed into chat, I changed the language.. also switched to color_chat cause client_print was crashing the server. [AC] You've earned the |xtplhd`\XTPLHD@<840,($ achievement for " This is printed into console: L 11/22/2011 - 17:03:50: [achievements.amxx] [AC] ThE_ChOSeN_OnE has earned the "|xtplhd`\XTPLHD@<840,($ " achievement ! |
Re: client_print problem
I did a quick test, and it works correctly for me.
Tested code: Code:
|
Re: client_print problem
This code is working ..
Code:
Code:
This is printed into chat from the task: Code:
Life Hater: Sinucide-te o dataCode:
|xtplhd`\XTPLHD@<840,($ |
Re: client_print problem
Code:
|
| All times are GMT -4. The time now is 08:30. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.