Solved Thanks! :) - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Solved Thanks! :) (
/showthread.php?tid=65534)
Solved Thanks! :) -
notec100 - 13.02.2009
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
Re: A Lil Help -
harrold - 13.02.2009
What must the command exactly do?
Re: A Lil Help -
Daren_Jacobson - 13.02.2009
disable /pm's i am guessing, but for all or for one person?
Re: A Lil Help -
notec100 - 13.02.2009
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.
Re: A Lil Help -
harrold - 13.02.2009
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;
Re: A Lil Help -
ICECOLDKILLAK8 - 13.02.2009
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
Re: A Lil Help -
harrold - 13.02.2009
You have the same as me only i have made mine faster
Re: A Lil Help -
Think - 13.02.2009
or check my sig for 1 player
Re: A Lil Help -
ICECOLDKILLAK8 - 13.02.2009
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
Re: A Lil Help -
notec100 - 13.02.2009
Cool guys thank you all for you replies I appreciate it!
THANK YOU ALL!!!!