09.02.2011, 02:36
Isto deve resolver o seu problema:
Espero ter ajudado
pawn Код:
if(strcmp(cmd, "/susurrar", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(gPlayerLogged[playerid] == 0)
{
SendClientMessage(playerid, COLOR_GREY, "Nгo fizeste o login!");
return 1;
}
if(PlayerInfo[playerid][pMuted] == 1)
{
SendClientMessage(playerid, TEAM_CYAN_COLOR, "Estбs Silenciado, logo nгo consegues falar.");
return 1;
}
new result[256];
GetPlayerName(playerid, sendername, sizeof(sendername));
result = strtok(cmdtext, idx);
if(!strlen(result)) return SendClientMessage(playerid, COLOR_GRAD2, "Dica: /susurrar (playerid) (texto) ");
new ID = strval(result);
result = strtok(cmdtext, idx);
if(!strlen(result)) return SendClientMessage(playerid, COLOR_GRAD2, "Dica: /susurrar (playerid) (texto) ");
format(string, sizeof(string), " %s susurrou algo.", sendername);
ProxDetector(3.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
format(string, sizeof(string), " %s susurrou-te ao ouvido: %s ", sendername, result);
SendClientMessage(playerid, COLOR_WHITE, string);
SendClientMessage(ID, COLOR_WHITE, string);
ChatLog(string);
}
return 1;
}
Espero ter ajudado