how to make pm cmd with something
#9

Quote:
Originally Posted by RedFusion
Посмотреть сообщение
pawn Код:
CMD:pm(playerid, params[])
{
    new id, msg[100];
    if(sscanf(params, "is", id, msg))
        return SendClientMessage(playerid, 0xFF0000FF, "USAGE: /Pm <playerid> <message>");

    if(!IsPlayerConnected(id))
        return SendClientMessage(playerid, 0xFF0000FF, "ERROR: This player is not connected!");

    if(id == playerid)
        return SendClientMessage(playerid, 0xFF0000FF, "ERROR: You cannot use this on yourself!");

    new pname[MAX_PLAYER_NAME+1], string[128];
    GetPlayerName(playerid, pname, sizeof(pname));
    format(string, sizeof(string), "PM from %s (ID: %i): %s", pname, playerid, msg);
    SendClientMessage(id, 0x00FF00FF, string);

    GetPlayerName(id, pname, sizeof(pname));
    format(string, sizeof(string), "PM to %s (ID: %i): %s", pname, id, msg);
    SendClientMessage(playerid, 0x00FF00FF, string);
    return 1;
}
Renamed the variable used for storing names
Wow you look a guy who like to help, Worst thing to do is give him a cmd of PM ready.
He can create by his own if he reads some tutorials.
Reply


Messages In This Thread
how to make pm cmd with something - by ReD_DeVi - 26.06.2014, 17:10
Re: how to make pm cmd with something - by RedFusion - 26.06.2014, 17:19
Re: how to make pm cmd with something - by ReD_DeVi - 26.06.2014, 17:23
Re: how to make pm cmd with something - by RedFusion - 26.06.2014, 17:27
Re: how to make pm cmd with something - by Guest4390857394857 - 26.06.2014, 17:30
Re: how to make pm cmd with something - by ReD_DeVi - 26.06.2014, 17:33
Re: how to make pm cmd with something - by Stinged - 26.06.2014, 17:43
Re: how to make pm cmd with something - by RedFusion - 26.06.2014, 17:45
Re : Re: how to make pm cmd with something - by Clad - 26.06.2014, 17:51
Re: how to make pm cmd with something - by RedFusion - 26.06.2014, 17:53

Forum Jump:


Users browsing this thread: 1 Guest(s)