SA-MP Forums Archive
[INFO]Convert 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: [INFO]Convert Command (/showthread.php?tid=276280)



[INFO]Convert Command - TheBluec0de - 13.08.2011

how to turn this command / me, YCMD?

https://sampwiki.blast.hk/wiki/Using_strcmp%28%29


Re: [INFO]Convert Command - Tigerkiller - 13.08.2011

use zcmd+sscanf

CMD:me(playerid,params[])
{
new text[128];
if(sscanf(params,"s",text)) return SendClientMessage(playerid,-1,"usage /me text");
{
new name[24], s[128];
GetPlayerName(playerid, name, sizeof name);
format(s, sizeof s, "%s say %s",name, text);
SendClientMessageToAll(-1,s);
}
return 1;
}


Re: [INFO]Convert Command - Raimis_R - 13.08.2011

Next time use SUPER DUPER MAGIC search function!

pawn Код:
YCMD:me(playerid, params[], help)
{
    if (help)
    {
        SendClientMessage(playerid, 0xFF0000AA, "Sends an action to other players.");
    }
    else
    {
        new
            str[128];
        if (isnull(params))
        {
            format(str, sizeof (str), "Usage: \"/%s [action]\"", Command_GetDisplayNamed("me", playerid));
            SendClientMessage(playerid, 0xFF0000AA, str);
        }
        else
        {
            GetPlayerName(playerid, str, sizeof (str));
            format(str, sizeof (str), "* %s %s", str, params);
            SendClientMessageToAll(0xFF0000AA, str);
        }
    }
    return 1;
}



Re: [INFO]Convert Command - TheBluec0de - 13.08.2011

Thank you..