25.06.2012, 18:26
Does not show text for players that have skins: 106, 105, 107
Where's problem?
pawn Код:
stock SendPRTransmission(color, msg[], team)
{
for(new i; i < MAX_PLAYERS; i++) // foreach(Player, 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(GetPlayerSkin(playerid) == 105 || GetPlayerSkin(playerid) == 106 || GetPlayerSkin(playerid) == 107)
{
if(sscanf(params,"s",text)) return SendClientMessage(playerid,raudona,"USAGE: /rg [text]");
GetPlayerName(playerid, name, MAX_PLAYER_NAME);
format(string, sizeof(string),"{DB881A}[PR] {E3B924}%s: %s", name, text);
printf("RP %s: %s",name, text);
if(GetPlayerSkin(playerid) == 106) return SendPRTransmission(raudona, string, 106); // So on.
if(GetPlayerSkin(playerid) == 105) return SendPRTransmission(raudona, string, 105); // So on.
if(GetPlayerSkin(playerid) == 107) return SendPRTransmission(raudona, string, 107); // So on.
} else SendClientMessage(playerid,raudona,"You are not this gang member!");
return 1;
}