faction (radio), need help!
#1

Hello guys, I was trying to make this, but failed. I don't have an idea, what to do.

Now:
When I type /r Text, it shows that: **Sergeant Marcus Bauer(radio): Text,over.**

I was trying to make it like that:
** Sergeant M. Bauer (radio): Text,over.**

Here is my script:
Код:
if(strcmp(cmd, "/radio", true) == 0 || strcmp(cmd, "/r", true) == 0)
	{
	    new rtext[128];
	    if(PlayerInfo[playerid][pMember] == 6)
		{
		    switch (PlayerInfo[playerid][pRank])
	        {
	            case 1: { rtext = "Cadet"; }
                case 2: { rtext = "Inspector"; }
                case 3: { rtext = "Detective"; }
			    case 4: { rtext = "Major"; }
			    case 5: { rtext = "Officer"; }
			    case 6: { rtext = "Sergeant"; }
			    case 7: { rtext = "Lieutenant"; }
	            case 8: { rtext = "Captain"; }
	            case 9: { rtext = "Deputy Sheriff"; }
	            case 10: { rtext = "Assistant Sheriff"; }
	            case 11: { rtext = "Undersheriff"; }
			    case 12: { rtext = "Sheriff"; }
		    }
		}
  if(IsPlayerConnected(playerid))
	    {
			GetPlayerName(playerid, sendername, sizeof(sendername));
			GiveNameSpace(sendername);
			if(PlayerInfo[playerid][pMaskUse] == 1) { format(sendername, sizeof(sendername), "Stranger_%d", PlayerInfo[playerid][pRandMask]); }
			new length = strlen(cmdtext);
			while ((idx < length) && (cmdtext[idx] <= ' '))
			{
				idx++;
			}
			new offset = idx;
			new result[128];
			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(PlayerInfo2[Mute][playerid] == 1)
			{
				SendClientMessage(playerid, TEAM_CYAN_COLOR, "   You can't speak, you have been silenced !");
				return 1;
			}
			if(PlayerInfo[playerid][pJailed] > 0)
			{
				SendClientMessage(playerid, TEAM_CYAN_COLOR, "[INFO]: your radio has been confesgated, You will receive it at the front.");
				return 1;
			}
			if (PlayerInfo[playerid][pMember] == 9)
	        {
	        	SendClientMessage(playerid, COLOR_GREY, " Faction radio has been closed !");
				return 1;
	        }
		    if(PlayerInfo[playerid][pMember] > 0)
			{
			    format(string, sizeof(string), "** %s %s(radio): %s, over. **", rtext, sendername, result);
				ProxRadio(20.0, playerid, string);
				SendRadioMessage(PlayerInfo[playerid][pMember], TEAM_BLUE_COLOR, string);
				return 1;
		    }
			else
			{
				SendClientMessage(playerid, COLOR_GRAD2, "   You are not part of a Faction !");
				return 1;
			}
		}
		return 1;
	}
Thank you all in advance! ^^
Reply
#2

Can someone help me with this?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)