help please
#4

Try this: (Not Tested):

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
new string[128];
new Color[MAX_PLAYERS];
Color[playerid] = GetPlayerColor(playerid);

if (strcmp("/cr", cmdtext, true, 3) == 0)
{
if(Color[playerid] == 0x2641FEAA)
{
if(strlen(cmdtext) <= 3)
return SendClientMessage(playerid,0xFF7F50AA,"Usage: /cr [Text]");
       
new pname[24];
GetPlayerName(playerid, pname, 24);
   
for(new i=0;i<MAX_PLAYERS;i++)
{
if(IsPlayerConnected(i) && Color[i] == 0x2641FEAA)
{
format(string, sizeof(string), "|COP|: %s(%d): %s",pname,playerid,cmdtext[4]);
SendClientMessage(i,0xFF7F50AA,string);
}
}
}
else return SendClientMessage(playerid,0xFF7F50AA,"ERROR: You not is COP!");
return 1;
}
return 0;
}
Reply


Messages In This Thread
help please - by bartje01 - 13.02.2010, 15:50
Re: help please - by Miguel - 13.02.2010, 16:11
Re: help please - by bartje01 - 13.02.2010, 16:22
Re: help please - by LuxurioN™ - 13.02.2010, 16:25
Re: help please - by bartje01 - 13.02.2010, 16:31

Forum Jump:


Users browsing this thread: 2 Guest(s)