PM error player is in DND MODE
#1

Код:
CMD:pm(playerid, params[])
{
   new str[128], str2[128], id;
   if(sscanf(params,"ds[128]", id, str2)) return SendClientMessage(playerid, red,"USAGE: /pm [id] [message]");
   if(IsPlayerConnected(id))
   {
       if(id != playerid)
	   {
		   if(DND[id] == 0)
		   {
               if(notREPLY[id] == 0)
			   {
		   		format(str, sizeof(str),"PM to %s[%d]: %s", PlayerName2(id), id, str2);
		   		SendClientMessage(playerid, yellow, str);
		   		format(str, sizeof(str),"PM from %s[%d]: %s",  PlayerName2(playerid), playerid, str2);
		   		SendClientMessage(id, yellow, str);
		   		SendClientMessage(id, -1,"Use /reply [message] to reply to this PM, If you want to block incoming PM's use /dnd");
				PlayerPlaySound(id,1057,0.0,0.0,0.0);
		   		LastPm[id] = playerid;
		   		notREPLY[id] = 1;
     }

		    else if(notREPLY[playerid] == 1)
   {
	            format(str, sizeof(str),"PM to %s[%d]: %s", PlayerName2(id), id, str2);
		   		SendClientMessage(playerid, yellow, str);
		   		format(str, sizeof(str),"PM from %s[%d]: %s",  PlayerName2(playerid), playerid, str2);
		   		SendClientMessage(id, yellow, str);
				PlayerPlaySound(id,1057,0.0,0.0,0.0);
		   		LastPm[id] = playerid;
   }
		   else return SendClientMessage(playerid, red,"That player is in do not disturb mode!");
	   }
	   else return SendClientMessage(playerid, red,"You cannot PM yourself");
   }
   else return SendClientMessage(playerid, red,"Player is not connected");
   }
   return 1;
}
so I've made a message that says "Use /reply [message] to reply to this PM, If you want to block incoming PM's use /dnd" on their first pm recieve. then the second one, they wont receive it, but it says their in Do not disturb mode, how do i fix it? Thanks
Reply


Messages In This Thread
PM error player is in DND MODE - by Superhot - 21.10.2013, 13:01
Re: PM error player is in DND MODE - by Voxel - 21.10.2013, 13:11
Re: PM error player is in DND MODE - by Superhot - 22.10.2013, 02:28

Forum Jump:


Users browsing this thread: 1 Guest(s)