12.08.2012, 06:56
pawn Код:
dcmd_pm(playerid,params[])
{
new playerid2;
new string2[256];
if(sscanf(params,"us[256]",playerid2,string2)) return SendClientMessage(playerid,COLOR_RED,"USAGE:/pm [ID] [Message]");
if(!(IsPlayerConnected(playerid2))) return SendClientMessage(playerid,COLOR_RED,"Invalid ID");
new string[256];
new pName[MAX_PLAYER_NAME];
GetPlayerName(playerid,pName,sizeof(pName));
format(string,sizeof(string),"PM from %s(%d):%s",pName,playerid,string2);
SendClientMessage(playerid,COLOR_YELLOW,string);
PlayerPlaySound(playerid2,1054,0,0,0);
return 1;
}
pawn Код:
dcmd(pm,2,cmdtext);