Announce Cmd.
#2

pawn Код:
CMD:announce(playerid, params[])
{
    #define Msg SendClientMessage
    if (!IsPlayerAdmin(playerid)) return
        Msg(playerid, 0xFF0000AA, "Only for admins.");
       
    new text[64], timems, style;
    if (sscanf(params, "iis[64]", style, timems, text)) return
        Msg(playerid, 0xFF0000AA, "Usage: /announce <style[0-6]> <time in ms> <text>");

    if (strlen(text) > 64) return
        Msg(playerid, 0xFF0000AA, "Message is too long (64 characters)");

    if (style < 0 || style > 6) return
        Msg(playerid, 0xFF0000AA, "Invalid style");

    if (time > 20*1000) return
        Msg(playerid, 0xFF0000AA, "No longer than 20 seconds");
       
    GameTextForAll(text, timems, style);
    #undef Msg
    return true;
}
Reply


Messages In This Thread
Announce Cmd. - by Davz*|*Criss - 18.03.2011, 22:17
Re: Announce Cmd. - by admantis - 18.03.2011, 22:23
Re: Announce Cmd. - by Davz*|*Criss - 18.03.2011, 22:34
Re: Announce Cmd. - by Davz*|*Criss - 18.03.2011, 22:45
Respuesta: Announce Cmd. - by Code8976Man - 18.03.2011, 22:53
Re: Announce Cmd. - by admantis - 18.03.2011, 22:55
Re: Announce Cmd. - by Davz*|*Criss - 18.03.2011, 23:09

Forum Jump:


Users browsing this thread: 3 Guest(s)