27.02.2013, 21:40
When you PM a player offline, it still sends the PM.
How do I fix this?
How do I fix this?
pawn Код:
CMD:pm(playerid, params[])
{
new str[128],str2[128],message[100],id;
if(sscanf(params,"is",id,message)) SendClientMessage(playerid,COLOR_GRAY,"USAGE: /pm [ID] [message]");
if(!IsPlayerConnected(id)) SendClientMessage(playerid,COLOR_RED,"Invalid player ID!");
if(id!=playerid){
format(str,sizeof(str),"(( PM to [%i] %s: %s ))",id,GetName(id),message);
format(str2,sizeof(str2),"(( PM from [%i] %s: %s ))",id,GetName(id),message);
SendClientMessage(playerid,0xBF4C00AA,str);
SendClientMessage(id,COLOR_ORANGE,str2);
PlayerPlaySound(id,1058,0,0,0);
}
return 1;
}