23.05.2009, 14:12
try this:
pawn Код:
if(strcmp(cmd,"/pr",true)==0)
{
if (gTeam[playerid] == TEAM_COPS)
{
if ((strlen(cmdtext) > 4)&&(strlen(cmdtext) <= 50))
{
new message[50];
new name[MAX_PLAYERS];
strmid(message,cmdtext,4,strlen(cmdtext)-4);
GetPlayerName(playerid,name,sizeof(name));
format(string,sizeof(string),"Police Radio(%s):%s",name,message);
SendCopMessage(0xFFFFFF, string);
return 1;
}
else return SendClientMessage(playerid, 0xFFFF00AA, "-> You mean: /pr [Message]");
}
else return SendClientMessage(playerid, 0xFFFF00AA, "-> You are not a Police Officer");
}