SendChat weird behaviour - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: SendChat weird behaviour (
/showthread.php?tid=100098)
SendChat weird behaviour -
DragoNuno - 02.10.2009
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:
Код:
public OnRecordingPlaybackEnd() {
StartRecordingPlayback(RECORDING_TYPE, RECORDING);
new string:RandomText[5][255] = {
{"1111"},
{"2222"},
{"3333"},
{"4444"},
{"5555"}
};
new x = random(sizeof(RandomText));
SendChat(RandomText[x]);
}
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?