13.07.2010, 19:59
pawn Код:
if(!strcmp(cmdtext, "/r", true, 2))
{
if(mechanic[playerid] < 1) return SendClientMessage(playerid,RED,"You are not a mechanic!");
if(!cmdtext[2]) return SendClientMessage(playerid, RED, "USAGE: /r [chat]");
new string[128],name[24];
GetPlayerName(playerid,name,sizeof(name));
for(new mechanics;mechanics < MAX_PLAYERS; mechanics++)
{
if(IsPlayerConnected(mechanics))
{
if(mechanic[mechanics] >= 1)
{
format(string,sizeof(string),"Mechanic %s Says: %s",name,cmdtext[3]);
SendClientMessage(mechanics,color,string);
}
}
}
return 1;
}