21.02.2010, 00:32
pawn Код:
//Comando
if(strcmp(cmd, "/radio", true) == 0 || strcmp(cmd, "/r", true) == 0)
{
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))
{
SendClientMessageEx(playerid, COR_CINZA, "USE: (/r)adio [radio chat]","Use: (/r)adio [radio chat]");
return 1;
}
if(gTeam[playerid] == TEAM_USA)
{
if(gTeam[playerid] == TEAM_USA) { format(string, sizeof(string), "** USA %s: %s, over. **", sendername, result); }
else
{
format(string, sizeof(string), "** USA %s: %s, over. **", sendername, result);
}
SendRadioMessage(5,COR_AZULC,string);
printf("%s", string);
return 1;
}
return 1;
}