09.05.2013, 15:47
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;
}
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