need a little help here :( cmd /ask didn't work good
#1

Hi, i have made an script with function to ask something about server. The command would be :

Code:
CMD:askadmin(playerid, params[])
{
	new text[1080], string[1080], name[MAX_PLAYER_NAME];
	if(sscanf(params, "s", text)) return SendClientMessage(playerid,COLOR_WHITE, "USAGE: /askadmin [text]");
	GetPlayerName(playerid, name, sizeof(name));
	format(string ,5000 ,"%s(Id:%d) has asked: %s [/apm]" ,name, playerid, text);
	SendMessageToAdmins(COLOR_RED, string);
	format(string, sizeof(string), "You asked admin: %s", text);
	SendClientMessage(playerid, COLOR_RED, string);
	printf("%s, has asked Admins: %s.",name, text);
	return 1;
}
The problem is when player ask something in many words, then only show a little bit on mainchat. For example when i aksed " admin, how to buy a house in this server ?" the will show on mainchat only "admin, how to buy a house in th". Idk why this happening, if someone know the solution then please tell me bellow, Thanks
Reply
#2

Increase string sizes. Also "SendMessageToAdmins".
Reply
#3

Code:
if(sscanf(params, "s[1080]", text)) return SendClientMessage(playerid,COLOR_WHITE, "USAGE: /askadmin [text]");

format(string, sizeof(string), "%s(Id:%d) has asked: %s [/apm]", name, playerid, text);
SendMessageToAdmins(COLOR_RED, string);
Try that, and by the way, you don't need to have the string that big of a size.
Reply
#4

ok, i"ll try it...sorry i use that string too big cuz maybe it can show more text xD
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)