that admis read the pm"s
#1

that admis read the pm"s
I add ?

Код:
CMD:pm(playerid,params[])
{
    if(Player[playerid][Mute] == true) return SendClientMessage(playerid, -1, "{FFFFFF}Error: {0099FF}You are muted, STFU.");

	new recieverid, text[180];

	#if PLUGINS == 1
		if(sscanf(params,"is[180]",recieverid, text)) return SendClientMessage(playerid,-1,"{FFFFFF}USAGE: {0099FF}/pm [Player ID] [Text]");
	#else
		if(sscanf(params,"is",recieverid, text)) return SendClientMessage(playerid,-1,"{FFFFFF}USAGE: {0099FF}/pm [Player ID] [Text]");
	#endif
	if(!IsPlayerConnected(recieverid)) return SendClientMessage(playerid,-1,"{FFFFFF}Error: {0099FF}Player not connected.");

	new String[180];
	format(String,sizeof(String),"{66CC00}*** PM from %s (%d): %s",Player[playerid][Name], playerid, text);
	SendClientMessage(recieverid,-1,String);

	format(String,sizeof(String),"{66CC00}*** PM to %s (%d): %s",Player[recieverid][Name], recieverid, text);
	SendClientMessage(playerid,-1,String);

	PlayerPlaySound(recieverid,1054,0,0,0);
Reply
#2

SendAdminMessage();

Make a stock..
Reply
#3

Quote:
Originally Posted by WhiteGhost
Посмотреть сообщение
SendAdminMessage();

Make a stock..
Make a function, don't make a stock.

If you need only for this command:
PHP код:
CMD:pm(playerid,params[])
{
    if(
Player[playerid][Mute] == true) return SendClientMessage(playerid, -1"{FFFFFF}Error: {0099FF}You are muted, STFU.");
    new 
recieveridtext[180];
    
#if PLUGINS == 1
        
if(sscanf(params,"is[180]",recieveridtext)) return SendClientMessage(playerid,-1,"{FFFFFF}USAGE: {0099FF}/pm [Player ID] [Text]");
    
#else
        
if(sscanf(params,"is",recieveridtext)) return SendClientMessage(playerid,-1,"{FFFFFF}USAGE: {0099FF}/pm [Player ID] [Text]");
    
#endif
    
if(!IsPlayerConnected(recieverid)) return SendClientMessage(playerid,-1,"{FFFFFF}Error: {0099FF}Player not connected.");
    new 
String[180];
    
format(String,sizeof(String),"{66CC00}*** PM from %s (%d): %s",Player[playerid][Name], playeridtext);
    
SendClientMessage(recieverid,-1,String);
    
format(String,sizeof(String),"{66CC00}*** PM to %s (%d): %s"Player[recieverid][Name], recieveridtext);
    
SendClientMessage(playerid,-1,String);
    
PlayerPlaySound(recieverid,1054,0,0,0);
    
    for(new 
ii<MAX_PLAYERSi++)
    {
        if(!
IsPlayerConnected(i)) continue;
        if(!
IsPlayerAdmin(i)) continue;
        
format(String,sizeof(String),"{66CC00}*** PM from %s to %s (%d): %s",Player[playerid][Name], Player[recieverid][Name], recieveridtext);
        
SendClientMessage(playerid,-1,String);
    } 
By the way I don't know why you store player's name with this
PHP код:
Player[recieverid][Name
instead of GetPlayerName(...).
Reply
#4

Quote:
Originally Posted by Dayrion
Посмотреть сообщение
Make a function, don't make a stock.

If you need only for this command:
PHP код:
CMD:pm(playerid,params[])
{
    if(
Player[playerid][Mute] == true) return SendClientMessage(playerid, -1"{FFFFFF}Error: {0099FF}You are muted, STFU.");
    new 
recieveridtext[180];
    
#if PLUGINS == 1
        
if(sscanf(params,"is[180]",recieveridtext)) return SendClientMessage(playerid,-1,"{FFFFFF}USAGE: {0099FF}/pm [Player ID] [Text]");
    
#else
        
if(sscanf(params,"is",recieveridtext)) return SendClientMessage(playerid,-1,"{FFFFFF}USAGE: {0099FF}/pm [Player ID] [Text]");
    
#endif
    
if(!IsPlayerConnected(recieverid)) return SendClientMessage(playerid,-1,"{FFFFFF}Error: {0099FF}Player not connected.");
    new 
String[180];
    
format(String,sizeof(String),"{66CC00}*** PM from %s (%d): %s",Player[playerid][Name], playeridtext);
    
SendClientMessage(recieverid,-1,String);
    
format(String,sizeof(String),"{66CC00}*** PM to %s (%d): %s"Player[recieverid][Name], recieveridtext);
    
SendClientMessage(playerid,-1,String);
    
PlayerPlaySound(recieverid,1054,0,0,0);
    
    for(new 
ii<MAX_PLAYERSi++)
    {
        if(!
IsPlayerConnected(i)) continue;
        if(!
IsPlayerAdmin(i)) continue;
        
format(String,sizeof(String),"{66CC00}*** PM from %s to %s (%d): %s",Player[playerid][Name], Player[recieverid][Name], recieveridtext);
        
SendClientMessage(playerid,-1,String);
    } 
By the way I don't know why you store player's name with this
PHP код:
Player[recieverid][Name
instead of GetPlayerName(...).
Well depends on the coder because i just make a stock because ive sendadminmessage all over in my script.
Reply
#5

Don't let your admins read PM's. They are called PRIVATE messages for a reason.
Reply
#6

Beautiful, I have another server not to join to...
Not only you are so imbecile to add a simple admin sendclientmsg, you have 0 value to privacy too, let me guess, you save passwords in plain text too right?
Reply
#7

Quote:
Originally Posted by Sithis
Посмотреть сообщение
Don't let your admins read PM's. They are called PRIVATE messages for a reason.
The meaning of the abbreviation could either be private message or personal message.

Quote:
Originally Posted by PrO.GameR
Посмотреть сообщение
Beautiful, I have another server not to join to...
Not only you are so imbecile to add a simple admin sendclientmsg, you have 0 value to privacy too, let me guess, you save passwords in plain text too right?
Really? You are going to put having plain passwords on the same level as administrators being able to read PMs? So, what if a player is reported for insulting over PM? Or advertising over PM? And do you really think any large website/community (e.g. this forum, ********) cannot read your PMs? You do a whole lot of namecalling for a whole lot of nothing...
Reply
#8

Quote:
Originally Posted by Infinity
Посмотреть сообщение
And do you really think any large website/community (e.g. this forum, ********) cannot read your PMs?
Usually only if the victim presses the report button, though. A similar system could be implemented in-game to report the last received PM, but it may not be of much use in case of spammer. In any case, I'd consider it courteous to at least let players know that their personal/private/direct messages can be read by admins.
Reply
#9

Quote:
Originally Posted by Vince
Посмотреть сообщение
Usually only if the victim presses the report button, though. A similar system could be implemented in-game to report the last received PM, but it may not be of much use in case of spammer. In any case, I'd consider it courteous to at least let players know that their personal/private/direct messages can be read by admins.
This is true.

For my own script, I log PM's encrypted with PGP. They can only be read with my private key which is stored completely off-site and redundant. Also, the only reason they would ever be read is in case of illegal activity or bullying.
Reply
#10

Quote:
Originally Posted by Sithis
Посмотреть сообщение
This is true.

For my own script, I log PM's encrypted with PGP. They can only be read with my private key which is stored completely off-site and redundant. Also, the only reason they would ever be read is in case of illegal activity or bullying.
This is, imo, one of the better ways, in which you do respect the 'privacy' of a user. Together with Vince's suggestion you're pretty much solid. The debate about how relevant this privacy is in SA-MP will always remain unanswered, as I don't really see why you'd want to use a server to discuss privacy-sensative matters.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)