SA-MP Forums Archive
How do I rearrange this... - 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)
+--- Thread: How do I rearrange this... (/showthread.php?tid=362693)



How do I rearrange this... - Rabbayazza - 25.07.2012

pawn Код:
if(!strcmp(cmdtext, "/do", true, 3)) // 3 is the length of /me
        {
            if(!cmdtext[3])return SendClientMessage(playerid, 0xFF0000FF, "Correct usage: /do [text]");
            new str[128];
            GetPlayerName(playerid, str, sizeof(str));
            format(str, sizeof(str), "* %s %s", str, cmdtext[4]);
            ProxDetector(20.0, playerid, str, 0xFF85FFB0,0xFF85FFB0,0xFF85FFB0,0xFF85FFB0,0xFF85FFB0);
            return 1;
    }
Currently this would look like

Robert types this in

I want it to be like

Text Entered ((PlayerName))

how do I do that?


Re: How do I rearrange this... - Kindred - 25.07.2012

pawn Код:
if(!strcmp(cmdtext, "/do", true, 3))
{
    if(!cmdtext[3])return SendClientMessage(playerid, 0xFF0000FF, "Correct usage: /do [text]");
    new str[128];
    GetPlayerName(playerid, str, sizeof(str));
    format(str, sizeof(str), "%s ((%s))", cmdtext[4], str);
    ProxDetector(20.0, playerid, str, 0xFF85FFB0,0xFF85FFB0,0xFF85FFB0,0xFF85FFB0,0xFF85FFB0);
    return 1;
}
Abracadavre.

Learn BASIC coding. Plus, search before doing this, it's that simple.


Re: How do I rearrange this... - Rabbayazza - 25.07.2012

Thank you. No need for the arrogance though