Command problem
#1

Won't show me the dialog when I test it out IG

Код:
TLDCMD:help(playerid, params[]){
	new cmdstring[1000];
    strcat(cmdstring,"{99CC00}/sharexp - Give a player xp\n/vip - Check our Donation features!\n/rules - List of server rules\n\
	/help - Obvious\n/pay - Give a player money\n");
	strcat(cmdstring,"{99CC00}/attachments \n/kill - Kill yourself\n/pm - Personal Message\n/blockpm - Block people to PM you\n/unblockpm - Obvious\n/ss - Save stats\n/stats - Check your stats\n");
	strcat(cmdstring,"{99CC00}/shop - Obvious\n/factions - official factions/organizations\n/ec - to eat a cookie\n/getcookies - donate xp to get cookies\n/report - Reports a player to the administrators\n");
	strcat(cmdstring,"{99CC00}/n - Asks a question in the newbie chat\n/w - Whispers to a player\n/o - Speaks in the Global OOC Chat\n/g - Speaks in the General OOC Chat\n/animlist - Lists animations\n/inventory - Shows inventory\n");
	strcat(cmdstring,"{99CC00}/s - Shouts a message to players far away\n/l - Speaks quietly to nearby players\n/b - Speaks in the Local OOC chat\n/me - Uses words to explain your action in a RP way\n/stats - Shows Statistics\n");
	strcat(cmdstring,"{99CC00}/do - Similar to /me\n/charity - Donates money(Simply just to waste money :P)\n/id - Gets some information from a player\n/t1 - Tells a player nearby that you are friendly.\n");
	strcat(cmdstring,"{99CC00}/t2 - Tells a player nearby to drop his weapons\n");

    ShowPlayerDialog(playerid,DIALOG_CMDS,DIALOG_STYLE_MSGBOX,""MENU"Server Commands",cmdstring,"Close","");
    return 1;
}
Reply
#2

Debug it, is the cmd being called ? also compile the script with -d3 flag .
Reply
#3

Quote:
Originally Posted by iLearner
Посмотреть сообщение
also compile the script with -d3 flag .
How do you do that?
Reply
#4

Tried debugging. Everything seems to work normal.
Reply
#5

You have joined multiple strings but have not formatted it
Код:
TLDCMD:help(playerid, params[]){
	new cmdstring[1000];
    strcat(cmdstring,"{99CC00}/sharexp - Give a player xp\n/vip - Check our Donation features!\n/rules - List of server rules\n\
	/help - Obvious\n/pay - Give a player money\n");
	strcat(cmdstring,"{99CC00}/attachments \n/kill - Kill yourself\n/pm - Personal Message\n/blockpm - Block people to PM you\n/unblockpm - Obvious\n/ss - Save stats\n/stats - Check your stats\n");
	strcat(cmdstring,"{99CC00}/shop - Obvious\n/factions - official factions/organizations\n/ec - to eat a cookie\n/getcookies - donate xp to get cookies\n/report - Reports a player to the administrators\n");
	strcat(cmdstring,"{99CC00}/n - Asks a question in the newbie chat\n/w - Whispers to a player\n/o - Speaks in the Global OOC Chat\n/g - Speaks in the General OOC Chat\n/animlist - Lists animations\n/inventory - Shows inventory\n");
	strcat(cmdstring,"{99CC00}/s - Shouts a message to players far away\n/l - Speaks quietly to nearby players\n/b - Speaks in the Local OOC chat\n/me - Uses words to explain your action in a RP way\n/stats - Shows Statistics\n");
	strcat(cmdstring,"{99CC00}/do - Similar to /me\n/charity - Donates money(Simply just to waste money :P)\n/id - Gets some information from a player\n/t1 - Tells a player nearby that you are friendly.\n");
	format(cmdstring, sizeof(cmdstring),"%s{99CC00}/t2 - Tells a player nearby to drop his weapons\n",cmdstring);

    ShowPlayerDialog(playerid,DIALOG_CMDS,DIALOG_STYLE_MSGBOX,""MENU"Server Commands",cmdstring,"Close","");
    return 1;
}
Reply
#6

Quote:
Originally Posted by gurmani11
Посмотреть сообщение
You have joined multiple strings but have not formatted it
Код:
TLDCMD:help(playerid, params[]){
	new cmdstring[1000];
    strcat(cmdstring,"{99CC00}/sharexp - Give a player xp\n/vip - Check our Donation features!\n/rules - List of server rules\n\
	/help - Obvious\n/pay - Give a player money\n");
	strcat(cmdstring,"{99CC00}/attachments \n/kill - Kill yourself\n/pm - Personal Message\n/blockpm - Block people to PM you\n/unblockpm - Obvious\n/ss - Save stats\n/stats - Check your stats\n");
	strcat(cmdstring,"{99CC00}/shop - Obvious\n/factions - official factions/organizations\n/ec - to eat a cookie\n/getcookies - donate xp to get cookies\n/report - Reports a player to the administrators\n");
	strcat(cmdstring,"{99CC00}/n - Asks a question in the newbie chat\n/w - Whispers to a player\n/o - Speaks in the Global OOC Chat\n/g - Speaks in the General OOC Chat\n/animlist - Lists animations\n/inventory - Shows inventory\n");
	strcat(cmdstring,"{99CC00}/s - Shouts a message to players far away\n/l - Speaks quietly to nearby players\n/b - Speaks in the Local OOC chat\n/me - Uses words to explain your action in a RP way\n/stats - Shows Statistics\n");
	strcat(cmdstring,"{99CC00}/do - Similar to /me\n/charity - Donates money(Simply just to waste money :P)\n/id - Gets some information from a player\n/t1 - Tells a player nearby that you are friendly.\n");
	format(cmdstring, sizeof(cmdstring),"%s{99CC00}/t2 - Tells a player nearby to drop his weapons\n",cmdstring);

    ShowPlayerDialog(playerid,DIALOG_CMDS,DIALOG_STYLE_MSGBOX,""MENU"Server Commands",cmdstring,"Close","");
    return 1;
}
Added what you told me
Код:
format(cmdstring, sizeof(cmdstring),"%s{99CC00}/t2 - Tells a player nearby to drop his weapons\n",cmdstring);
Same problem
Reply
#7

use crashdetect to determine whether the problem is coming from any include. I suppose your command processor is the one causing problem.
Reply
#8

Quote:
Originally Posted by gurmani11
Посмотреть сообщение
use crashdetect to determine whether the problem is coming from any include. I suppose your command processor is the one causing problem.
I'm using crashdetect and there's nothing it sends that is an error. I just defined my command processor. It's a custom one.
PHP код:
#define TLDCMD:%1(%2) \
            
CMD:%1(%2
Reply
#9

Код:
#define DIALOG_CMDS 0000 <-- Not more than 4 zeros
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)