command, (sendmessagetoallplayers)
#1

could someone make a command for me for example:

/o text
it shows:

(( [name]: [text] ))
Reply
#2

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?
Reply
#3

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?
Reply
#4

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;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)