02.10.2009, 18:52
I'm having a bit of a problem with SendChat. For some weird reason the string they are supossed to say ALWAYS show up in the DOS window of the server but in-game sometimes it shows up and sometimes it doens't. At first I thought maybe because I wasn't close enough to them but even standing at 1 cm of them won't make a change. And to confirm it even more I went to a diferent town and the chat still show up (the lines that actually get shown)
I find this weird cause in the DOS window of the server the text always appears there. more strangely is if I change the order of the code. for example if the code is something like this:
the effect described happens. but if I change the StartRecordingPlayback line to after the SendChat the text shows up in the server window but NEVER in-game.
Is it a bug or it's just my code that's messed up?
I find this weird cause in the DOS window of the server the text always appears there. more strangely is if I change the order of the code. for example if the code is something like this:
Код:
public OnRecordingPlaybackEnd() {
StartRecordingPlayback(RECORDING_TYPE, RECORDING);
new string:RandomText[5][255] = {
{"1111"},
{"2222"},
{"3333"},
{"4444"},
{"5555"}
};
new x = random(sizeof(RandomText));
SendChat(RandomText[x]);
}
Is it a bug or it's just my code that's messed up?

