03.08.2012, 14:46
Just give me a PM script, I don't use ZCMD or DCMD or anykind of these unknown things xD
Just give me a PM script, I don't use ZCMD or DCMD or anykind of these unknown things xD
|
CMD:pm(playerid,params[])
{
new pid;
new message[128];
if(sscanf(params, "us[32]", pid, message))
{
return SendClientMessage(playerid, COLOR_GREY, "USAGE: /pm <playerid> <message>");
}
if(!IsPlayerConnected(pid))
return SendClientMessage(playerid, COLOR_GREY, "ERROR: Player is not connected!");
new pmsg[256];
new pname[MAX_PLAYER_NAME];
GetPlayerName(playerid,pname,sizeof(pname));
format(pmsg,sizeof(pmsg),"PM from %s(%d): %s",pname,playerid,message);
new pidmsg[256];
new pidname[MAX_PLAYER_NAME];
GetPlayerName(pid,pidname,sizeof(pidname));
format(pidmsg,sizeof(pidmsg),"PM to %s(%d): %s",pidname,pid,message);
SendClientMessage(pid, COLOR_ORANGE, pmsg);
PlayerPlaySound(pid,1057,0.0,0.0,0.0);
SendClientMessage(playerid, COLOR_ORANGE, pidmsg);
return 1;
}
F:\server\pawno\include
#include <ZCMD>