17.08.2011, 16:47
when player does /lc nobody in law doesnt get a message
pawn Код:
CMD:lc(playerid,params[])
{
if(PlayerData[playerid][IsLaw] == 1)
{
if(isnull(params)) return SendClientMessage(playerid,orange,"USAGE: /lc [message]");
GetPlayerName(playerid,Nam,sizeof(Nam));
format(str,sizeof(str),"[LAWCHAT] %s: %s",Nam,params);
for(new i = 0; i < MAX_PLAYERS; ++i)
{
if(!IsPlayerConnected(i) && !IsPlayerNPC(i))
{
if(PlayerData[i][IsLaw] == 1)
{
SendClientMessage(i,COLOR_BLUE,str);
}
}
}
}
else return 0;
return 1;
}