SA-MP Forums Archive
[HELP]XtremeAdmin2 Admin Private Message!!! 0.3a - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [HELP]XtremeAdmin2 Admin Private Message!!! 0.3a (/showthread.php?tid=112992)



[HELP]XtremeAdmin2 Admin Private Message!!! 0.3a - BlackSkull - 11.12.2009

I'm using XtremeAdmin2 just not getting updates to the system that PM, see below:

//================================================== ================
public OnPlayerPrivmsg(playerid, recieverid, text[]) {
if(!IsPlayerConnected(playerid)||!IsPlayerConnecte d(recieverid)) return 1;
new string[256], ToName[24], Name[24]; GetPlayerName(playerid,Name,24);
if(Config[ExposePMS]) {
GetPlayerName(recieverid,ToName,24);
format(string,256,"PM: %s [%d] -> %s [%d]: %s",Name,playerid,ToName,recieverid,text);
SendMessageToAdmins(string);
}
if(Config[WireWithPM] && Variables[playerid][Wired]) {
Variables[playerid][WiredWarnings]--;
if(Variables[playerid][WiredWarnings]) {
format(string,256,"You have been wired thus preventing you from talking and PMing. [Warnings: %d/%d]",Variables[playerid][WiredWarnings],Config[WiredWarnings]);
SendClientMessage(playerid,white,string); return 0;
}
else {
format(string,256,"%s has been kicked from the server. [REASON: Wired]",Name);
SendClientMessageToAll(yellow,string); SetUserInt(playerid,"Wired",0);
Kick(playerid); return 0;
}
}
return 1;
}
//================================================== ==========================

How do I upgrade it to version 0.3a, the "/ pm" I'm using base.pwn, so that messages appear not private, anyone can help me to and updates the system of private messaging xtremeadmin order to display the "pms" of players! Thanks ...


Re: [HELP]XtremeAdmin2 Admin Private Message!!! 0.3a - FlatMaN - 11.12.2009

Код:
forward OnPlayerPrivmsg(playerid, recieverid, text[]);



Re: [HELP]XtremeAdmin2 Admin Private Message!!! 0.3a - Correlli - 11.12.2009

Quote:
Originally Posted by FlatMaN
Код:
forward OnPlayerPrivmsg(playerid, recieverid, text[]);
That's not the solution. OnPlayerPrivmsg is removed in 0.3 version.


Re: [HELP]XtremeAdmin2 Admin Private Message!!! 0.3a - MenaceX^ - 11.12.2009

Quote:
Originally Posted by Don Correlli
Quote:
Originally Posted by FlatMaN
Код:
forward OnPlayerPrivmsg(playerid, recieverid, text[]);
That's not the solution. OnPlayerPrivmsg is removed in 0.3 version.
It may be.


You can forward it and make a command and its parameters will be playerid/name and text, then you can call it (though it can be a stock).


Re: [HELP]XtremeAdmin2 Admin Private Message!!! 0.3a - BlackSkull - 12.12.2009

AFF do not run it to and face forward OnPlayerPrivmsg (playerid, recieverid, text []), the error left over still not get the private pm.Alguem could get me a command to be able to read the Pm player in version 0.3a? Thanks

command to be changed 0.3 someone help me:
Код:
public OnPlayerPrivmsg(playerid, recieverid, text[]) {
	if(!IsPlayerConnected(playerid)||!IsPlayerConnected(recieverid)) return 1;
	new string[256], ToName[24], Name[24]; GetPlayerName(playerid,Name,24);
	if(Config[ExposePMS]) {
	  GetPlayerName(recieverid,ToName,24);
	  format(string,256,"PM: %s [%d] -> %s [%d]: %s",Name,playerid,ToName,recieverid,text);
	  SendMessageToAdmins(string);
	}
  if(Config[WireWithPM] && Variables[playerid][Wired]) {
	  Variables[playerid][WiredWarnings]--;
	  if(Variables[playerid][WiredWarnings]) {
	    format(string,256,"You have been wired thus preventing you from talking and PMing. [Warnings: %d/%d]",Variables[playerid][WiredWarnings],Config[WiredWarnings]);
			SendClientMessage(playerid,white,string); return 0;
		}
		else {
 			format(string,256,"%s has been kicked from the server. [REASON: Wired]",Name);
		  SendClientMessageToAll(yellow,string); SetUserInt(playerid,"Wired",0);
		  Kick(playerid); return 0;
		}
	}
	return 1;
}
Image:



Re: [HELP]XtremeAdmin2 Admin Private Message!!! 0.3a - xomka - 12.12.2009

You could forward OnPlayerPrivmsg in all your scripts and add to the base.pwn
pawn Код:
CallRemoteFunction("OnPlayerPrivmsg", "dds", playerid, id, gMessage);
then it should work as 0.2.


Re: [HELP]XtremeAdmin2 Admin Private Message!!! 0.3a - MenaceX^ - 12.12.2009

pawn Код:
ZCMD:pm(playerid,params[])
{
  new
    id;
  if(sscanf(params,"us",id,params)) return SendClientMessage(playerid,color,"Usage: /pm [playerid/name] [text]");
  OnPlayerPrivmsg(playerid,id,params);
  return 1;
}



Re: [HELP]XtremeAdmin2 Admin Private Message!!! 0.3a - BlackSkull - 12.12.2009

Thanks, I got