SA-MP Forums Archive
command, (sendmessagetoallplayers) - 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: command, (sendmessagetoallplayers) (/showthread.php?tid=255122)



command, (sendmessagetoallplayers) - davelord - 14.05.2011

could someone make a command for me for example:

/o text
it shows:

(( [name]: [text] ))


Re: command, (sendmessagetoallplayers) - Cjgogo - 14.05.2011

There's nothing forbidden in this post and shouldn't be deleted

If I understand well,you don't know that in the box that shows up when you press T you can type a text and if you press ENTER it will be displaaied for evry player as : [PlayerName]: {text}

If that's not what you mean you didn't made an understandable topic.

And why do you need that command if you agree with first thing I said?


Re: command, (sendmessagetoallplayers) - Famalamalam - 14.05.2011

Quote:
Originally Posted by davelord
Посмотреть сообщение
could someone make a command for me for example:

/o text
it shows:

(( [name]: [text] ))
Are you using ZCMD and sscanf?


Re: command, (sendmessagetoallplayers) - Biesmen - 14.05.2011

DCMD and SSCANF:
pawn Код:
//OnPlayerCommand
dcmd(o, 1, cmdtext);
//SOmewhere outside callbacks
dcmd_o(playerid, params[])
{
   new playername[MAX_PLAYER_NAME], message[128],string[128];
   if(sscanf(params, "s[128]", message)) return SendClientMessage(playerid, -1, "Correct usage: /o [message]");
   GetPlayerName(playerid, playername, sizeof(playername));
   format(string, sizeof(string), "(( [%s]: %s ))", playername, message);
   SendClientMessageToAll(-1, string);
   return 1;
}