19.01.2017, 13:38
Hi, i need help with this problem, i want to make faction radio chat. i try to make a shortcut like when some player use command like this "/fr @ ..." this will be give message like [RADIO] Player_Name: Badge ....
@ is a shortcut to display player badge.
Example command:
Input must be like:
I try to make some code like this.
How to fix this?. this is two different image.

@ is a shortcut to display player badge.
Example command:
Код:
/f(action)r(adio) [text] /fr @ copy that.
Код:
[RADIO] Rank Player_Name: Badge copy that.
Код:
CMD:fr(playerid, params[]) { new text[128]; if(PlayerData[playerid][pFaction] == -1) return SendErrorMessage(playerid, "You must in faction member to use this command"); if (GetFactionType(playerid) == FACTION_GANG) return SendErrorMessage(playerid, "Family doesn't have faction radio."); if(sscanf(params,"s[128]",text)) return SendSyntaxMessage(playerid, "/f(action)r(adio) [text]"); if(strval(text) > 128) return SendErrorMessage(playerid,"Text too long."); if(strfind(text, "@", true, text[0])) { SendFactionMessage(PlayerData[playerid][pFaction], FactionData[PlayerData[playerid][pFaction]][factionColor], "[RADIO] %s %s: %s.%03d %s", Faction_GetRank(playerid),ReturnName2(playerid, 0), GetInitials(Faction_GetRank(playerid)), PlayerData[playerid][pBadge], text[1]); } else SendFactionMessage(PlayerData[playerid][pFaction], FactionData[PlayerData[playerid][pFaction]][factionColor], "[RADIO] %s %s: %s", Faction_GetRank(playerid),ReturnName2(playerid, 0), text); return 1; }

