SA-MP Forums Archive
is it possible to show someone a text in a box? - 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: is it possible to show someone a text in a box? (/showthread.php?tid=645148)



is it possible to show someone a text in a box? - grymtn - 20.11.2017

Hello all. I was wondering if it was possibe to write a text into a box that appears? I mean like its a dialog box but not exactly dialog like you cant click on text and it will call ondialogresponse. I just want people to be able to read whats whithin it.


Re: is it possible to show someone a text in a box? - Erioni - 21.11.2017

You mean textdraws?

https://sampwiki.blast.hk/wiki/Textdraw


Re: is it possible to show someone a text in a box? - grymtn - 21.11.2017

without textdraw i dont like to use them because i am weak with them. I was wondering if there was a native for something like that in samp itself.


Re: is it possible to show someone a text in a box? - Gammix - 21.11.2017

GameTextForPlayer
Or learn making textdraws, use one of the editors, its easy.


Re: is it possible to show someone a text in a box? - jasperschellekens - 22.11.2017

I think this is what you mean:
I use it for /commands etc in my server.
Might be a bit messy because i lost track of it a little myself.

Код:
#define ShowErrorDialog(%1,%2) ShowPlayerDialog(%1, DIALOG_ERROR, DIALOG_STYLE_MSGBOX, "ADMIN MESSAGE", %2, "OK", "")

enum
{
	DIALOG_NONE=12345,
	DIALOG_ERROR=12346,
};
Now you can call create something with it.

For example, I created a chatbot which talks back to you in public chat if you ask him questions.
He will send a message to you if you are are flooding/spamming the bot.
Код:
ShowPlayerDialog(playerid, DIALOG_NONE, DIALOG_STYLE_MSGBOX, "Chatman", "Don't spam the mighty chatman!", "OK", "");
You can also use it like this.
Код:
CMD:help(playerid, params[])
{
	new info[1024];
	strcat(info, "/generalhelp\n", sizeof(info));
	strcat(info, "/jobhelp\n", sizeof(info));
	strcat(info, "/playerhelp \n", sizeof(info));
	strcat(info, "/chathelp \n", sizeof(info));
	strcat(info, "/passporthelp\n", sizeof(info));
	strcat(info, "/phonehelp\n", sizeof(info));
	strcat(info, "/vehiclehelp\n", sizeof(info));
	strcat(info, "/businesshelp\n", sizeof(info));
	strcat(info, "/animhelp\n", sizeof(info));
	strcat(info, "/licensehelp\n", sizeof(info));
	strcat(info, "/tradehelp\n", sizeof(info));
	strcat(info, "/bankhelp\n", sizeof(info));
	strcat(info, "/spousehelp\n", sizeof(info));
	strcat(info, "/househelp\n", sizeof(info));
	strcat(info, "/ocmds - Organization commands\n", sizeof(info));
	strcat(info, "/gps\n\n", sizeof(info));
	strcat(info, "/bodyhelp\n\n", sizeof(info));
	strcat(info, "/bribe - Bribe an officer.\n", sizeof(info));
	strcat(info, "/showlicenses - Shows your licenses to an police officer.\n", sizeof(info));
	ShowPlayerDialog(playerid, DIALOG_NONE, DIALOG_STYLE_MSGBOX, "Los Angeles Roleplay Server Help", info, "OK", "");
	return 1;
}



Re: is it possible to show someone a text in a box? - Ritzy2K - 22.11.2017

Quote:
Originally Posted by jasperschellekens
Посмотреть сообщение
I think this is what you mean:
I use it for /commands etc in my server.
Might be a bit messy because i lost track of it a little myself.

Код:
#define ShowErrorDialog(%1,%2) ShowPlayerDialog(%1, DIALOG_ERROR, DIALOG_STYLE_MSGBOX, "ADMIN MESSAGE", %2, "OK", "")

enum
{
	DIALOG_NONE=12345,
	DIALOG_ERROR=12346,
};
Now you can call create something with it.

For example, I created a chatbot which talks back to you in public chat if you ask him questions.
He will send a message to you if you are are flooding/spamming the bot.
Код:
ShowPlayerDialog(playerid, DIALOG_NONE, DIALOG_STYLE_MSGBOX, "Chatman", "Don't spam the mighty chatman!", "OK", "");
You can also use it like this.
Код:
CMD:help(playerid, params[])
{
	new info[1024];
	strcat(info, "/generalhelp\n", sizeof(info));
	strcat(info, "/jobhelp\n", sizeof(info));
	strcat(info, "/playerhelp \n", sizeof(info));
	strcat(info, "/chathelp \n", sizeof(info));
	strcat(info, "/passporthelp\n", sizeof(info));
	strcat(info, "/phonehelp\n", sizeof(info));
	strcat(info, "/vehiclehelp\n", sizeof(info));
	strcat(info, "/businesshelp\n", sizeof(info));
	strcat(info, "/animhelp\n", sizeof(info));
	strcat(info, "/licensehelp\n", sizeof(info));
	strcat(info, "/tradehelp\n", sizeof(info));
	strcat(info, "/bankhelp\n", sizeof(info));
	strcat(info, "/spousehelp\n", sizeof(info));
	strcat(info, "/househelp\n", sizeof(info));
	strcat(info, "/ocmds - Organization commands\n", sizeof(info));
	strcat(info, "/gps\n\n", sizeof(info));
	strcat(info, "/bodyhelp\n\n", sizeof(info));
	strcat(info, "/bribe - Bribe an officer.\n", sizeof(info));
	strcat(info, "/showlicenses - Shows your licenses to an police officer.\n", sizeof(info));
	ShowPlayerDialog(playerid, DIALOG_NONE, DIALOG_STYLE_MSGBOX, "Los Angeles Roleplay Server Help", info, "OK", "");
	return 1;
}
Why did you copy pasted some dialog code when he said he doesn't want dialog...


Re: is it possible to show someone a text in a box? - Lucases - 22.11.2017

There many textdraw editors which create the code for you, you just have to edit the size, style, color etc In Game.
Use them