25.06.2012, 13:55
pawn Код:
stock SendPRTransmission(color, msg[], team)
{
for(new i; i < MAX_PLAYERS; i++)
{
if(GetPlayerSkin(i) == team)
{
SendClientMessage(i, color, msg);
}
}
return 1;
}
dcmd_rg(playerid, params[])
{
new string[256], name[MAX_PLAYER_NAME], text[150];
if(sscanf(params,"s",text)) return SendClientMessage(playerid,raudona,"{FBDF89}USAGE: /rg [text]");
GetPlayerName(playerid, name, MAX_PLAYER_NAME);
format(string, sizeof(string),"[PR]: %s: %s", name, text);
if(GetPlayerSkin(playerid) == 106) return SendPRTransmission(raudona, string, 106);
if(GetPlayerSkin(playerid) == 105) return SendPRTransmission(raudona, string, 105);
if(GetPlayerSkin(playerid) == 107) return SendPRTransmission(raudona, string, 107);
return 1;
}
pawn Код:
else
{
SendClientMessage(playerid,raudona,"You need to be administrator to use this command");
}