24.07.2009, 03:32
How can I stop private messages from being sent using /pm or /msg? I can't seem to get this working.
Thx.
Thx.
return false;
return 0;
Originally Posted by r3gan
Tried that, it doesn't work.
|
new pm; |
if(strcmp(cmd, "/pmoff", true) == 0) { pm = 1; SendClientMessage(playerid, COLOR_GREY, "PM's toggled off!"); } return 1; } if(strcmp(cmd, "/pmon", true) == 0) { pm = 0; SendClientMessage(playerid, COLOR_GREY, "PM's toggled on!"); } return 1; } |
if(pm == 1) { SendClientMessage(playerid, COLOR_GREY, "Admin disabled PM's!"); return 1; } else if(pm == 0) { |
Originally Posted by -eXo
Quote:
Quote:
Quote:
|
Originally Posted by r3gan
I'm trying to disable them in the OnPlayerPrivmsg() call back. Reason for this is that I have a /mute command to mute players, and when a player is muted I want to be able to stop him from sending private messages. I've tried return 0, return 1, return false, etc., etc. from within the OnPlayerPrivmsg() callback, nothing works.
|
public OnPlayerPrivMsg(etc..)
{
if(muted function here == 1)) //checks if the player is muted
{
//the block message here
}
return 1;
}
Originally Posted by Karlip
pawn Код:
|
//the block message here