Radio issue
#1

Код:
	if(strcmp(cmd, "/radio", true) == 0 || strcmp(cmd, "/r", true) == 0)
	{
	  if(IsPlayerConnected(playerid))
	  {
			GetPlayerName(playerid, sendername, sizeof(sendername));
			new length = strlen(cmdtext);
			while ((idx < length) && (cmdtext[idx] <= ' '))
			{
				idx++;
			}
			new offset = idx;
			new result[64];
			while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
			{
				result[idx - offset] = cmdtext[idx];
				idx++;
			}
			result[idx - offset] = EOS;
			if(!strlen(result))
			{
				SendClientMessage(playerid, COLOR_GRAD2, "USAGE: (/r)adio [Radio chat]");
				return 1;
			}
			if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1 || PlayerInfo[playerid][pLeader] == 2 || PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pMember] == 3 || PlayerInfo[playerid][pLeader] == 3)
			{
			  if(PlayerInfo[playerid][pRank] == 6) { format(string, sizeof(string), "[RADIO] %s(%d): %s, over.", sendername, playerid, result); }
				else if(PlayerInfo[playerid][pRank] == 5) { format(string, sizeof(string), "[RADIO] %s(%d): %s, over.", sendername, playerid, result); }
				else if(PlayerInfo[playerid][pRank] == 4) { format(string, sizeof(string), "[RADIO] %s(%d): %s, over.", sendername, playerid, result); }
				else if(PlayerInfo[playerid][pRank] == 3) { format(string, sizeof(string), "[RADIO] %s(%d): %s, over.", sendername, playerid, result); }
				else if(PlayerInfo[playerid][pRank] == 2) { format(string, sizeof(string), "[RADIO] %s(%d): %s, over.", sendername, playerid, result); }
				else if(PlayerInfo[playerid][pRank] == 1) { format(string, sizeof(string), "[RADIO] %s(%d): %s, over.", sendername, playerid, result); }
				else
				{
					format(string, sizeof(string), "** Officer %s: %s, over. **", sendername, result);
				}
				SendTeamMessage(2, COLOR_DBLUE, string);
				SendTeamMessage(1, COLOR_DBLUE, string);
				printf("%s", string);
				return 1;

			}
			else if(gTeam[playerid] == 1||PlayerInfo[playerid][pMember]==4||PlayerInfo[playerid][pLeader]==4)
			{
				format(string, sizeof(string), "** Paramedic %s: %s, over. **", sendername, result);
				SendTeamMessage(2, COLOR_DBLUE, string);
				SendTeamMessage(1, COLOR_DBLUE, string);
				printf("%s", string);
				return 1;
			}
			else
			{
				SendClientMessage(playerid, COLOR_GRAD2, "  You are not part of a Team !");
				return 1;
			}
		}
		return 1;
	}
Thats the code I have, yet, faction leaders of the FBI cannot see the radio, yet others can.

Does anyone have a fix? I had it working once but I don't remember how
Reply
#2

i think you forgot SendTeamMessage(the team id of the leaders ...
Reply
#3

Would you be able to post an example?
Reply
#4

Bump

_________________________________________________

Anyone know how to fix?
Reply
#5

'You can bump topics when the last reply is at least 12 hours old.'
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)