Solved Thanks! :)
#1

I was just wondering how I could go about making a /nopm command. I am not sure how to go about this so if anyone can help me with this I would appreciate it thank you
Reply
#2

What must the command exactly do?
Reply
#3

disable /pm's i am guessing, but for all or for one person?
Reply
#4

Quote:
Originally Posted by harrold
What must the command exactly do?
Just when a player types /nopm then they will not receive PMs, and if a player tries to send a PM to a player who is not accepting pms then they would get a message saying "That player is not accepting PMs".
Then if a player is not accepting PMs and they type /nopm again then they will start to receive PMs again.

Quote:
Originally Posted by Daren_Jacobson
disable /pm's i am guessing, but for all or for one person?
Just for the player who types /nopm and then when they type it again they will be able to receive PMs. Just want to use it to block out PMs whenever people just /pm and "talk shit" it's very immature and I feel the /nopm cmd would help a little.
Reply
#5

ok at the top of your script: new DisPm[MAX_PLAYERS];
in OnPlayerCommandText:
pawn Код:
if(!strcmp("/lsairport", cmdtext, true))
    {
        DisPm[playerid]=1;
        // maby here a message: SendClientMessage
        return 1;
    }
then in PrivMsg:

pawn Код:
if(DisPm[recieverid]==1) return SendClientMessage(playerid,COLOR,"This player has disabled his PM"),0;
Reply
#6

pawn Код:
// At the top of your script somewhere
new NoPM[MAX_PLAYERS];
// In OnPlayerConnect
NoPM[playerid] == 0;
// In OnPlayerCommandText
if(strcmp("/nopm", cmdtext, true) == 0)
{
  if(NoPM[playerid] == 1)
  {
    SendClientMessage(playerid, COLOR_GREY, "No PM is now off");
    NoPM[playerid] == 0;
    return 1;
  }
  else if(NoPM[playerid] == 0)
  {
    SendClientMessage(playerid, COLOR_GREY, "No PM is now on");
    return 1;
   }
   return 1;
}
// At the bottom of your script somewhere
public OnPlayerPrivmsg(playerid, recieverid, text[])
{
  if(NoPM[recieverid] == 1)
  {
    SendClientMessage(playerid, COLOR_GREY, "This player has NO PM turned on, Try again later");
    return 1;
  }
  return 0;
}
PS: Harold wtf is dat lol
Reply
#7

You have the same as me only i have made mine faster
Reply
#8

or check my sig for 1 player
Reply
#9

Quote:
Originally Posted by harrold
You have the same as me only i have made mine faster
The difference is i know how to make a command, You have just copy and pasted from somthing else
Reply
#10

Cool guys thank you all for you replies I appreciate it!

THANK YOU ALL!!!!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)