is it possible to show someone a text in a box?
#1

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.
Reply
#2

You mean textdraws?

https://sampwiki.blast.hk/wiki/Textdraw
Reply
#3

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.
Reply
#4

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

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;
}
Reply
#6

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...
Reply
#7

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


Forum Jump:


Users browsing this thread: 1 Guest(s)