Admin Message
#7

You need the sscanf include, then #include <sscanf> at the top of your script!

pawn Код:
CMD:cm(playerid, params[])
{
    if(PlayerInfo[playerid][pAdmin] >= 1 )
        return SendClientMessage(playerid, -1, "You are not an admin!"); // Change

    new
        text[128];

    if(sscanf(params, "s", text))
        return SendClientMessage(playerid, -1, "USAGE: /cm [Message]");
       
    new
        text1[128];
    format(text1, sizeof(text1), "Admin %s says: %s", GetName(playerid), text);
    SendClientMessageToAll(-1, text1);
    return 1;
}
Reply


Messages In This Thread
Admin Message - by DuarteCambra - 22.03.2013, 13:50
Re: Admin Message - by [DX]Aru12345 - 24.03.2013, 16:02
Re: Admin Message - by vitorvlv - 24.03.2013, 16:54
Re: Admin Message - by Denying - 24.03.2013, 17:28
Re: Admin Message - by DuarteCambra - 24.03.2013, 17:55
Re: Admin Message - by vitorvlv - 24.03.2013, 18:04
Re: Admin Message - by FunnyBear - 24.03.2013, 18:06
Re: Admin Message - by vitorvlv - 24.03.2013, 18:09
Re: Admin Message - by vitorvlv - 24.03.2013, 18:13
Re: Admin Message - by DuarteCambra - 24.03.2013, 18:37

Forum Jump:


Users browsing this thread: 1 Guest(s)