At the top of your script create a new variable
Код:
new ReplyNotification[MAX_PLAYERS]; //Every player now has a "ReplyNotification" variable available
Then you will need to give this variable a default value. Under
OnPlayerConnect, set
ReplyNotificatio equal to 1 (this will be the default)
Код:
Public OnPlayerConnect(playerid){
ReplyNotification[playerid] = 1; // Defaults set to 1
return 1;
}
Now you can use this variable inside your PM code. So, this would proabbly be at a PM command?
The code which says "use /r for quick response" needs to be wrapped in an
If Statment, checking against the ReplyNotification.... see the code below
Код:
CMD:pm(playerid, params[]){
//CODE GOES HERE WHICH DOES PM STUFF
if(ReplyNotification[targetid] == 1){
ReplyNotification[targetid] = 0; // Sets to 0, this will prevent this message being sent in the future
SendClientMessage(targetid, COLOR, "Did you know? That you can use /r to reply quickly to PMs");
}
return 1;
}
And thats it.
Ive used
targetid instead of
playerid as it would probably be the player that your sending the PM to, which is told to use /r rather than the player who sends the first message.
Hope that makes sense?