PM TAB
#1

Hello
I have a question
How can I make when I hit tab and select one player to protect bar and write it to write /PM [NO PLAYER] or what have you and more than just have to write me a message
I know this thing was made specifically for SA-MP 0.3 but have not seen it yet on any server
Reply
#2

Quote:
Originally Posted by yopuya
Hello
I have a question
How can I make when I hit tab and select one player to protect bar and write it to write /PM [NO PLAYER] or what have you and more than just have to write me a message
I know this thing was made specifically for SA-MP 0.3 but have not seen it yet on any server
its in the basefs of standard samp server download
Reply
#3

they like`s the OnPlayerClickNick or Are Not Know xd
Reply
#4

https://sampwiki.blast.hk/wiki/OnPlayerClickPlayer
Reply
#5

I think he means .. when you click on the player in the tab list, it will open up the cmd line with "/pm [idyouclickedon]" like it did in 0.3 beta testing, remember?
Reply
#6

That was beta testing. If you want to do that now use OnPlayerClickPlayer and then use a Dialog.
Reply
#7

on top of your script, put
Код:
new gPMDestinationID[MAX_PLAYERS];
Код:
public OnPlayerClickPlayer(playerid,clickedplayerid,source)
//---------------------------------------------------------
{
	new PMName[32];
	GetPlayerName(clickedplayerid,PMName[0],32);
	gPMDestinationID[playerid]=clickedplayerid;
	ShowPlayerDialog(playerid,1234,DIALOG_STYLE_INPUT,"Send PM to",PMName[0],"Send PM","Cancel");
	return 1;
}
Код:
public OnDialogResponse(playerid,dialogid,response,listitem,inputtext[])
{
  if(dialogid == 1234)
  {
    if(!response)
		{
			SendClientMessage(playerid,0xff5555ff,"PM canceled");
			return 1;
		}
		new PMName[32];
		GetPlayerName(playerid,PMName[0],32);
		new message[196];
		format(message,sizeof(message),"%s:\n%s",PMName[0],inputtext);
		SendClientMessage(gPMDestinationID[playerid],0xaaffaaff,message);
		return 1;
	}
	return 0;
}
now its upon you to check for sending the PM or not (if sender == receiver, or sizeof(PM) == 0).
Reply
#8

Quote:
Originally Posted by V1ceC1ty
That was beta testing. If you want to do that now use OnPlayerClickPlayer and then use a Dialog.
No shit. Beta used OnPlayerClickPlayer also.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)