String to long for SCMToAll - 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)
+--- Thread: String to long for SCMToAll (
/showthread.php?tid=381328)
String to long for SCMToAll - Timmeyable - 29.09.2012
Hi,
i have a big problem. If i mute somebody a SendClientMessageToAll will be send to the chat.
The problem is that sometimes the string is to long for SendClientMessageToAll and the message is not shown in the chat.
pawn Код:
new stryzz[350];
format(stryzz,sizeof(stryzz),"{FF0000}[MUTE]: '{FFFFFF}%s (Id: %d){FF0000}' wurde von '{FFFFFF}%s{FF0000}' fьr %d Minute(n) gemuted. (Grund: {FFFFFF}%s{FF0000})",SpielerName(pID),pID,SpielerName(playerid),time,reason);
SendClientMessageToAll(0xFF0000FF,stryzz);
For example if the "reason" is to big (like 6 chars) the message is not shown. If the reason is small (3 chars) the message is shown.
What can i do that the message will be shown every time?
Re: String to long for SCMToAll -
Face9000 - 29.09.2012
Use strcat for that.
AW: String to long for SCMToAll - Timmeyable - 29.09.2012
Ok thank you. Do you mean that i send two SendClientMessageToAll?
For example the first SCMTA with the names and the second with the reason.
Player1 muted Player2 for X minutes
Reason: XXXXXX