07.07.2010, 15:25
Ficaria assim mais como o andmeida disse na versao 0.3 nao tem mais
pawn Code:
public OnPlayerPrivmsg(playerid, recieverid, text[])
{
new string[256];
new PlayerName[MAX_PLAYER_NAME];
new RecName[MAX_PLAYER_NAME];
GetPlayerName(recieverid, RecName, sizeof(RecName));
GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
if(IsPlayerConnected(recieverid) && IsPlayerConnected(playerid))
{
format(string, sizeof(string), "PM de %s to %s: %s.", PlayerName, RecName, text);
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i) && PlayerInfo[i][pAdmin] >= 1 && i != playerid && i != recieverid)
{
if(PlayerInfo[i][pPMs] == 1)
{
SendClientMessage(i, COLOR_CYAN, string);
}
}
}
if(Mute[playerid] == 1) return SendClientMessage(playerid, COLOR_YELLOW, "Vocк nгo pode madar PMs enquanto estб mudo! Por favor use /report para reportar sua situaзгo para o Admin se vocк ficou muito tempo mudo.");
if(recieverid != playerid)
{
GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
GetPlayerName(recieverid, RecName, sizeof(RecName));
GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~n~~n~~y~Menssagem privada ~r~enviada~y~!", 3000, 3);
GameTextForPlayer(recieverid, "~n~~n~~n~~n~~n~~n~~n~~n~~n~~y~ Menssagem privada ~r~recebida~y~!", 3000, 3);
PlayerPlaySound(playerid,1057,0.0,0.0,0.0);
PlayerPlaySound(recieverid,1057,0.0,0.0,0.0);
format(string, sizeof(string), "# PM para %s(%i): %s", PlayerName, playerid, text);
SendClientMessage(recieverid, COLOR_CYAN, string);
format(string, sizeof(string), "# PM de %s(%i): %s", RecName, recieverid, text);
SendClientMessage(playerid, COLOR_CYAN, string);
}
}
else
{
format(string, sizeof(string), "Nгo tem nenhum player conectado com o ID %i!", recieverid);
SendClientMessage(playerid, COLOR_CYAN, string);
}
return 0;
}