Criminal Chat Problem [DCMD]
#1

pawn Код:
dcmd_cchat(playerid,params[])
{
    new string[128];
    if(!strlen(params))
    {
        SendClientMessage(playerid,COLOR_ERROR,"USAGE: /cchat (Message)");
        return 1;
    }
    if(GetPlayerWantedLevel(playerid) < 20)
    {
    return SendClientMessage(playerid, -1, "You are not a hardend criminal");
    }
    if(IsSpawned[playerid] == 0)
    {
        SendClientMessage(playerid,COLOR_ERROR,"You must be alive and spawned in order to be able to use this command.");
        return 1;
    }
    if(GetPlayerWantedLevel(playerid) >= 20)
   {
    format(string,sizeof(string),"4[CRIM CHAT] %s(%d): %s",PlayerName(playerid),playerid,params);
    IRC_GroupSay(gGroupAdminID,IRC_ADMINCHANNEL,string);
    for(new i=0; i<MAX_PLAYERS; i++)
    {
     if(GetPlayerWantedLevel(playerid) >= 20)
        {
            format(string,sizeof(string),"[CRIM CHAT] %s(%d): %s",PlayerName(playerid),playerid,params);
            SendClientMessage(i,COLOR_RED,string);
        }
        }
        }
    return 1;
}
Whats wrong with it?

Basically what its supposed to be is a chat for criminals with over 20 + wanted level. But yet, the criminals cant see the text, and the innocents can. Iv tried a while it wont work, i get no errors.

Please help ASAP,
-Jamie
Reply


Messages In This Thread
Criminal Chat Problem [DCMD] - by CNRLIFE - 09.05.2013, 15:47
Re: Criminal Chat Problem [DCMD] - by Kwarde - 09.05.2013, 15:51
Re: Criminal Chat Problem [DCMD] - by CNRLIFE - 09.05.2013, 15:55
Re: Criminal Chat Problem [DCMD] - by Kwarde - 09.05.2013, 16:04
Re: Criminal Chat Problem [DCMD] - by CNRLIFE - 09.05.2013, 16:29

Forum Jump:


Users browsing this thread: 1 Guest(s)