SA-MP Forums Archive
[Pedido] Sistema de /pm - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Pedido] Sistema de /pm (/showthread.php?tid=447317)



Sistema de /pm - xxRaioxx - 29.06.2013

Olб,queria colocar o /pm . Na minha GM que estou criando do 0.
Se puderem ajudar ficarei grato!



Re: [Pedido] Sistema de /pm - PlayeR_TheReturN - 29.06.2013

pawn Код:
CMD:pm(playerid, params[])
{
    new plid, msg, string[120];
    if(sscanf(params, "us",plid, msg)) return SendClientMessage(playerid, -1, "/pm [Id] [Msg]");
    format(string, sizeof(string), "[ MENSAGEM ENVIADA ] %s (%d) : %s", gName(plid), playerid, msg);
    SendClientMessage(playerid, -1, string);
    format(string, sizeof(string), "[ MENSAGEM RECEBIDA ] %s (%d) : %s", gName(playerid), plid , msg);
    SendClientMessage(plid, -1, string);
    return 1;
}

gName(playerid)
{
    new Name[24];
    GetPlayerName(playerid,Name, 24);
    return Name;
}



Re: [Pedido] Sistema de /pm - iTzDemon - 29.06.2013

https://sampwiki.blast.hk/wiki/OnPlayerPrivmsg


PlayeR_TheReturN - xxRaioxx - 29.06.2013

Quote:
Originally Posted by PlayeR_TheReturN
Посмотреть сообщение
pawn Код:
CMD:pm(playerid, params[])
{
    new plid, msg, string[120];
    if(sscanf(params, "us",plid, msg)) return SendClientMessage(playerid, -1, "/pm [Id] [Msg]");
    format(string, sizeof(string), "[ MENSAGEM ENVIADA ] %s (%d) : %s", gName(plid), playerid, msg);
    SendClientMessage(playerid, -1, string);
    format(string, sizeof(string), "[ MENSAGEM RECEBIDA ] %s (%d) : %s", gName(playerid), plid , msg);
    SendClientMessage(plid, -1, string);
    return 1;
}

gName(playerid)
{
    new Name[24];
    GetPlayerName(playerid,Name, 24);
    return Name;
}
Muito Obrigado.Ajudou muito!