13.01.2013, 18:46
Rбpido, troque o nome do gamemode para "GM.pwn" depois aperte CTRL+Z
e coloque isto:
e coloque isto:
pawn Код:
if(strcmp(cmd,"/vozadmin",true)==0)// avvoice
{
if(IsPlayerConnected(playerid))
{
if (PlayerInfo[playerid][pAdmin] >= 1337)
{
new Str[100];
new result[64];
new Nome[MAX_PLAYER_NAME];
GetPlayerName(playerid, sendername, sizeof(sendername));
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
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, "USE: /avvoice [texto]");
return true;
}
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
GetPlayerName(playerid, Nome, sizeof(Nome));
format(string, sizeof(string), "|________ Mensagen de Voz do Admin: %s ________|", sendername);
SendClientMessage(i,COLOR_WHITE, string);
format(Str, sizeof(Str), "http://translate.******.com/translate_tts?tl=pt&q=%s", (result));
PlayAudioStreamForPlayer(i, Str, 0, 0, 0, 0, 0);
}
}
}
}
return 1;
}