24.07.2012, 17:18
pawn Код:
dcmd_pm(playerid,params[])
{
new id,string[256],pName[MAX_PLAYER_NAME],pName2[MAX_PLAYER_NAME];
id = strval(params);
if(strlen(params) == 0)
{
SendClientMessage(playerid, COLOR_ERROR,"ERROR: /pm [id][message]");
PlayerPlaySound(playerid, 1053, 0.0, 0.0, 0.0);
}
if(GetPVarInt(id,"NoPM") == 1)
{
SendClientMessage(playerid, COLOR_ERROR,"ERROR: Currently, that player's PM is set to: OFF!");
PlayerPlaySound(playerid, 1053, 0.0, 0.0, 0.0);
}
GetPlayerName(playerid,pName,sizeof(pName));
GetPlayerName(id,pName2,sizeof(pName2));
format(string,sizeof(string),"PM from %s: %s",pName,params);
SendClientMessage(id,0xFFFF00FF,string);
PlayerPlaySound(playerid,1085,0.0,0.0,0.0);
format(string,sizeof(string),"PM sent to %s: %s",pName2,params);
SendClientMessage(playerid,0xF2A337FF,string);
SetPVarInt(id,"LastID",playerid);
return 1;
}
PM sent to (_AcE_): 0 hey what's up
Like it prints the player's id.. please help me, I dont want it to print the ID in the message.