SA-MP Forums Archive
[How To] /Do command - 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: [How To] /Do command (/showthread.php?tid=181108)



[How To] /Do command - Crayon - 04.10.2010

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


Re: [How To] /Do command - CaptainOwen - 04.10.2010

Hehe, Ali you little Clucker.


Re: [How To] /Do command - Crayon - 04.10.2010

Anyone know?


Re: [How To] /Do command - Crayon - 04.10.2010

Sorry I had the wrong code up, fixed.

edit: Sorry for dbl post, thought I pressed edit.


Re: [How To] /Do command - Retardedwolf - 04.10.2010

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


Re: [How To] /Do command - Crayon - 04.10.2010

thanks so much