Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- forward SendRadioMessage(member, COLOR, string[]);
- new cmd[256];
- new idx;
- new string[256];
- 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, VERDE, "USO: (/r)adio [radio chat]");
- return 1;
- }
- if(Profissao[playerid] == TAXISTA)
- {
- if(Profissao[playerid] == TAXISTA) { format(string, sizeof(string), "** Taxista %s: %s, . **", sendername, result); }
- {
- format(string, sizeof(string), "** Taxista %s: %s, . **", sendername, result);
- }
- SendRadioMessage(1, VERDE, string);
- printf("%s", string);
- return 1;
- }
- else
- {
- SendClientMessage(playerid, VERDE, " Você não pode usar o rádio !");
- return 1;
- }
- }
- return 1;
- }
- public SendRadioMessage(member, COLOR, string[])
- {
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- if(Profissao[i] == TAXISTA)
- {
- SendClientMessage(i, VERDE, string);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment