PM help
#6

pawn Код:
CMD:pm(playerid, params[])
{
    new str[128], str2[128], id;
    if(sscanf(params, "us", id, str2)) return SendClientMessage(playerid, Yellow, "Usage: /pm <playerid> <message>");
    if(!IsPlayerConnected(id)) return SendClientMessage(playerid, Red, "ERROR: Player not connected");
    if(playerid == id) return SendClientMessage(playerid, Red, "ERROR: You cannot pm yourself!");
    new iName[24], pName[24];
    GetPlayerName(id,iName,sizeof(iName));
    GetPlayerName(playerid,pName,sizeof(pName));
    format(str, sizeof(str), "PM sent to %s(ID: %d): %s", iName, id, str2);
    SendClientMessage(playerid, 0xFF0000FF, str);
    format(str, sizeof(str), "PM from %s(ID: %d): %s", pName, playerid, str2);
    SendClientMessage(id, Yellow, str);
    return 1;
}
Reply


Messages In This Thread
PM help - by xir - 27.12.2010, 18:29
Re: PM help - by iJumbo - 27.12.2010, 18:31
Re: PM help - by xir - 27.12.2010, 18:37
Re: PM help - by blackwave - 27.12.2010, 18:40
Re: PM help - by xir - 27.12.2010, 18:44
Re: PM help - by MadeMan - 27.12.2010, 20:09
Re: PM help - by xir - 27.12.2010, 20:38
Re: PM help - by _rAped - 28.12.2010, 00:30
Re: PM help - by Lorenc_ - 28.12.2010, 01:28
Re: PM help - by _rAped - 28.12.2010, 01:42

Forum Jump:


Users browsing this thread: 1 Guest(s)