SA-MP Forums Archive
[Help] Disable Reading pms - 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)
+--- Thread: [Help] Disable Reading pms (/showthread.php?tid=552390)



[Help] Disable Reading pms - Arxalan - 24.12.2014

Following command in for admin . They can read users command but i want to add a command to turn the /readpms off . So admin won't get user's pm anymore . How to do that . Give me the command please.


PHP Code:
CMD:readpms(playeridparams[])
{
        if (
IsPlayerAdmin(playerid))
        {
                
pInfo[playerid][readpm] = 1;
                
SendClientMessage(playeridCOLOR_DARK_GREEN"Congratz your a PM Admin xD");
        } 



Re: [Help] Disable Reading pms - JuanStone - 24.12.2014

To turn on and off with the same command.

pawn Code:
CMD:readpms(playerid, params[])
{
    #pragma unused params
    if(IsPlayerAdmin(playerid))
    {
        if(pInfo[playerid][readpm] == 0)
        {
            SenClientMessage(playerid, -1, "Congratz you a pm admin xD.");
            pInfo[playerid][readpm] = 1;
        }
        else if(pInfo[playerid][readpm] == 1)
        {
            SendClientMessage(playerid, -1, "Now you won't see pm's.");
            pInfo[playerid][readpm]  = 0;
        }
    }
    else
    {
        SendClientMessage(playerid, -1, "Not are you administrator.");
    }
    return true;
}



Re: [Help] Disable Reading pms - Arxalan - 24.12.2014

Thanks