how to make /me
#10

Quote:
Originally Posted by TwinkiDaBoss
Посмотреть сообщение
First of all this is script help thread, not tutorials thread.

And the problem with your code is .
PHP код:
CMD:me(playerid,params[])
{
new 
text[128], string[128];
if(
sscanf(params,"s[128]",text)) return SendClientMessage(playerid,0xEBFF00FF,"USAGE: /me [Text]");
format(string,sizeof(string),"*%s %s",pName(playerid),text);
SendClientMessageToAll(0xFF00E1FF,string);
return 
1;

sscanf must include string size, also there is no need for "d" in it, you are not looking for any intergrers. Also your "text" wasnt set to string size
There's no need for sscanf here.
ZCMD has "params", which is what you write after the command.

You use sscanf to split or change those params.
Since 'params' is a string, you can easlily do this instead:

pawn Код:
if (isnull(params)) return SendClientMessage(playerid,0xEBFF00FF,"USAGE: /me [Text]");
format(string,sizeof(string),"*%s %s", pName(playerid), params);
SendClientMessageToAll(0xFF00E1FF, params);
return 1;
Reply


Messages In This Thread
how to make /me - by NourNN - 14.12.2015, 19:20
Re: how to make /me - by TwinkiDaBoss - 14.12.2015, 20:02
Re: how to make /me - by TheSnaKe - 14.12.2015, 20:18
Re: how to make /me - by CrazyPerry - 15.12.2015, 01:03
Re: how to make /me - by TwinkiDaBoss - 15.12.2015, 01:20
Re: how to make /me - by SoFahim - 15.12.2015, 03:03
Re: how to make /me - by DaniceMcHarley - 15.12.2015, 07:38
Re: how to make /me - by NourNN - 15.12.2015, 12:34
Re: how to make /me - by N0FeaR - 15.12.2015, 12:49
Re: how to make /me - by Stinged - 15.12.2015, 14:12

Forum Jump:


Users browsing this thread: 4 Guest(s)