Max ChatMgs - 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: Max ChatMgs (
/showthread.php?tid=159306)
Max ChatMgs -
Nonameman - 12.07.2010
Hey Guys!
I'm trying to make a function into my script, which writes the player's name and ID into the chat when he messages.
I have the code:
pawn Код:
public OnPlayerText(playerid, text[])
{
new str[?];//And I dunno what string size should I write here =P
format(str, sizeof(str), "[%s][ID:%d]: %s", GetName(playerid), playerid, text);
return SendClientMessageToAll(colorWHITE, str);
}
So if You know, please reply
Thanks
Nonameman
Re: Max ChatMgs -
Mystique - 12.07.2010
Код:
public OnPlayerText(playerid, text[])
{
new str[128];//And I dunno what string size should I write here =P
format(str, sizeof(str), "[%s][ID:%d]: %s", GetName(playerid), playerid, text);
return SendClientMessageToAll(colorWHITE, str);
}
Re: Max ChatMgs -
Nonameman - 12.07.2010
I was thinking about 128 too, but only 128 characters can be in a player's message?
Re: Max ChatMgs -
Kar - 12.07.2010
yep 128 is max
Re: Max ChatMgs -
Nonameman - 12.07.2010
Thanks