SA-MP Forums Archive
Problem with TOGPM command - 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: Problem with TOGPM command (/showthread.php?tid=402116)



Problem with TOGPM command - FL3GM4 - 25.12.2012

how to make that I don't need relog to access Private Messages ...

enum
Код:
NoPM
Код:
CMD:togpm(playerid, params[])
{
        if(PlayerInfo[playerid][VIP] == 1)
        {
            PlayerInfo[playerid][NoPM] = 1;
            SendClientMessage(playerid, COLOR_GREEN, "[SERVER]You are no longer accepting private messages");
        }
        else
        {
            PlayerInfo[playerid][NoPM] = 0;
            SendClientMessage(playerid, COLOR_GREEN, "[SERVER]You are now accepting private messages");
        }
        return 1;
}



Re: Problem with TOGPM command - Typhome - 25.12.2012

Show /pm command


Re: Problem with TOGPM command - FL3GM4 - 25.12.2012

Код:
CMD:pm(playerid, params[])
{
    new id, text[128], string[128];
    if(sscanf(params, "us", id, text)) return SendClientMessage(playerid, COLOR_RED, "[USAGE] /pm <playerid/part of name> <message>");
    if(!IsPlayerConnected(id)) return SendClientMessage(playerid, COLOR_RED, "Player is not connected.");
    if(id == playerid) return SendClientMessage(playerid, COLOR_RED, "You cannot PM yourself.");
    format(string, sizeof(string), "%s (%d) is not accepting private messages at the moment.", PlayerName(id), id);
    if(PlayerInfo[id][NoPM] == 1) return SendClientMessage(playerid, COLOR_RED, string);
    format(string, sizeof(string), "PM to %s: %s", PlayerName(id), text);
    SendClientMessage(playerid, COLOR_YELLOW, string);
    format(string, sizeof(string), "PM from %s: %s", PlayerName(playerid), text);
    SendClientMessage(id, COLOR_WHITE, string);
    format(string, sizeof(string), "PM | %s (%d) => %s (%d): %s", PlayerName(playerid), playerid, PlayerName(id), id, text);
	SendAdminMessage(1, COLOR_BLUE, string);
    return 1;
}



Re: Problem with TOGPM command - Typhome - 25.12.2012

Код:
CMD:togpm(playerid, params[])
{
        if(PlayerInfo[playerid][VIP] == 1)
        {
		if(PlayerInfo[playerid][NoPM] == 0)
        	{
            		PlayerInfo[playerid][NoPM] = 1;
            		SendClientMessage(playerid, COLOR_GREEN, "[SERVER]You are no longer accepting private messages");
		} else {
            		PlayerInfo[playerid][NoPM] = 0;
            		SendClientMessage(playerid, COLOR_GREEN, "[SERVER]You are now accepting private messages");
        	}
	} else {
		SendClientMessage(playerid, COLOR_GREEN, "You aren't VIP!");
	}
        return 1;
}