SA-MP Forums Archive
Format and Send Client Message - 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: Format and Send Client Message (/showthread.php?tid=587296)



Format and Send Client Message - Jigsaw123 - 29.08.2015

Hey guys.. I've done this:

Код:
			new str[256];
			format(str,sizeof(str),"%s: %s (( /takeerrand ))",qs_npc_names[npc],qs_intro_text[npc]);
			SendClientMessage(playerid, COLOR_WHITE, str);
However, when I'm IG and I do the command, none of the text appears :[

Anyone know how to fix it?


Re: Format and Send Client Message - Logofero - 29.08.2015

Quote:
Originally Posted by Jigsaw123
Посмотреть сообщение
Hey guys.. I've done this:

Код:
			new str[256];
			format(str,sizeof(str),"%s: %s (( /takeerrand ))",qs_npc_names[npc],qs_intro_text[npc]);
			SendClientMessage(playerid, COLOR_WHITE, str);
However, when I'm IG and I do the command, none of the text appears :[

Anyone know how to fix it?
Why did you decide that a mistake in the text? Formatting is correct. See the error above


Re: Format and Send Client Message - Jigsaw123 - 29.08.2015

Huh? What error above?


Re: Format and Send Client Message - Logofero - 29.08.2015

Quote:
Originally Posted by Jigsaw123
Посмотреть сообщение
Huh? What error above?
This code is valid:
Код:
			new str[256];
			format(str,sizeof(str),"%s: %s (( /takeerrand ))",qs_npc_names[npc],qs_intro_text[npc]);
			SendClientMessage(playerid, COLOR_WHITE, str);
Him nothing says. If you want to help you lay out more code.


Re: Format and Send Client Message - Jigsaw123 - 29.08.2015

The qs_intro_text is this:

Код:
new qs_intro_text[MAX_QUESTS][232] = {
	"Dude, these Gas Sations in Las Venturas are killing our customer numbers.. Say.. Could you take this and... Deal.. With them?",
	"Hey, whats going on? Anyway.. I got a.. Friend.. Who needs to be taught the meaning of the word dangerous.. Wanna take care of this for me?",
	"Hey.. HEY! Dude.. Can you do me a favour.. I have something that needs to be disposed of.. Can you just dump these packages off in Ocean Docks for me?",
	"Could you do me a favour deary.. I need some milk.. Here is $10 can you just pop down to the store and grab some for me?"
};
This is the one that doesn't seem to work..
What do you think the problem with it is?


Re: Format and Send Client Message - Logofero - 29.08.2015

Quote:
Originally Posted by Jigsaw123
Посмотреть сообщение
The qs_intro_text is this:

Код:
new qs_intro_text[MAX_QUESTS][232] = {
	"Dude, these Gas Sations in Las Venturas are killing our customer numbers.. Say.. Could you take this and... Deal.. With them?",
	"Hey, whats going on? Anyway.. I got a.. Friend.. Who needs to be taught the meaning of the word dangerous.. Wanna take care of this for me?",
	"Hey.. HEY! Dude.. Can you do me a favour.. I have something that needs to be disposed of.. Can you just dump these packages off in Ocean Docks for me?",
	"Could you do me a favour deary.. I need some milk.. Here is $10 can you just pop down to the store and grab some for me?"
};
This is the one that doesn't seem to work..
What do you think the problem with it is?
new qs_intro_text[MAX_QUESTS][232]

Why 232?

Why increase 232 to 256 or 512, if you have concerns that the length of the line is not enough. Because when there is no length of time can not withdraw the text chat, or you transfer the chat more than 128 characters


Re: Format and Send Client Message - Logofero - 29.08.2015

Note: Do not show too long text chat player or they may not be displayed! Limit 128 characters