[How To] /Do command
#1

Code:

if(!strcmp(cmdtext, "/do", true, 3))
{
if(!cmdtext[3])return SendClientMessage(playerid, COLOR_GREY, "USAGE: /do [description]");
new str[128];
GetPlayerName(playerid,str, sizeof(str));
format(str, sizeof(str), "(( %s ))%s", str, cmdtext [3]);
SendClientMessageToAll (COLOR_PURPLE, str);
return 1;
}

Everything works as is. The players name wraps up in brackets as I like.

Question:

How can I make the player name to appear at the back of the sentence.

Example:

/do Big Muscular Man

Comes out as:

Big Muscular Man ((User_Name))

Thanks for help
Reply
#2

Hehe, Ali you little Clucker.
Reply
#3

Anyone know?
Reply
#4

Sorry I had the wrong code up, fixed.

edit: Sorry for dbl post, thought I pressed edit.
Reply
#5

format(str, sizeof(str), "%s ((%s))", cmdtext [3], str);
Reply
#6

thanks so much
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)