Chat help
#2

(my first code since almost a half a year..)

pawn Код:
CMD:flag(playerid, params[])
{
    new string[128],
    flag[48];

    if(sscanf(params, "s", flag)) return SendClientMessage(playerid, "/flag [color]");

    if(!strcmp(flag, "red", true))
    {
        format(string, sizeof(string), "Red flag message");
    }
    if(!strcmp(flag, "yellow", true))
    {
        format(string, sizeof(string), "yellow flag message");
    }
    if(!strcmp(flag, "green", true))
    {
        format(string, sizeof(string), "green flag message");
    }
    for(new i=0; i < MAX_PLAYERS; i++)
        if(IsPlayerConnected(i) && GetPlayerInterior(i) == INTERIORID)
            SendClientMessage(i, COLOR, string);
           
    return 1;
}
Reply


Messages In This Thread
Chat help - by nickstar - 09.11.2012, 01:22
Re: Chat help - by SnG.Scot_MisCuDI - 09.11.2012, 02:11
Re: Chat help - by nickstar - 09.11.2012, 02:17
Re: Chat help - by Lordzy - 09.11.2012, 04:24
Re: Chat help - by nickstar - 09.11.2012, 21:40
Re: Chat help - by SnG.Scot_MisCuDI - 10.11.2012, 02:50
Re: Chat help - by Lordzy - 10.11.2012, 02:55
Re: Chat help - by nickstar - 10.11.2012, 03:53

Forum Jump:


Users browsing this thread: 1 Guest(s)