Doubt
#1

I'm creating a settings panel for players, where they can toggle options on/off.

Lemme take an example:

I've added the option to toggle on/off join messages (The ones like Test has joined the server).

Now i have this code which shows join messages to everyone:

pawn Код:
new string[70];
                switch (Player[playerid][AccountLevel])
                {
                    case 0:
                {
                    format(string, sizeof(string), "* %s %s has joined Los Santos Stories.", JobName(playerid), ReturnName(playerid, 0));
                    SCMTA(COLOR_SILVER, string);
                }

                    case 1 .. 5:
                {
                    format(string, sizeof(string), "* %s %s has joined Los Santos Stories. IP: %s", JobName(playerid), ReturnName(playerid, 0), ReturnPlayerIp(playerid));
                    SendMessageToAdmins(string, COLOR_SILVER);
                }

                }
My question is:

How would you edit it to make this message shows just at who have "JoinMsg" setting enabled?

Player[playerid][JoinMsg] = 1; //Enabled, so they can see join message.

In short words, if a player has JoinMsg enabled and someone connects, he will see the connect message, otherwise not.

Tips are appreciated, thanks.
Reply


Messages In This Thread
Doubt - by KinderClans - 24.10.2018, 20:42
Re: Doubt - by Infin1ty - 24.10.2018, 20:59
Re: Doubt - by KinderClans - 24.10.2018, 21:06
Re: Doubt - by ReD_HunTeR - 24.10.2018, 21:18

Forum Jump:


Users browsing this thread: 1 Guest(s)