Dialog
#1

Hello!

I wonder how to make a /stats dialog that reads from your user file and shows it for you?
Reply
#2

Make a huge string and format with all the info. Just how you display a normal stats function.
Reply
#3

Quote:
Originally Posted by Steven82
Посмотреть сообщение
Make a huge string and format with all the info. Just how you display a normal stats function.
Im not so familiar with stuffs like strings and dialogs etc thats needed for this, and i don't have any kind of stats at all, so "Just how you display a normal stats" doesn't say me so much.

Maybe an example could help me better.
Reply
#4

Stop trying to get others to do the coding for you. If you don't know about strings and variables, learn. Don't just edit scripts, actually learn pawn.
Reply
#5

Quote:
Originally Posted by Ensconce
Посмотреть сообщение
Stop trying to get others to do the coding for you. If you don't know about strings and variables, learn. Don't just edit scripts, actually learn pawn.
If you learn to read..i said an "example" -_-
Reply
#6

An dini example from reading it from a userfile using dcmd for the command would be something like:

pawn Код:
dcmd_stats(playerid,params[])
{
    new string[128];
   
    new level = PlayerInfo[playerid][Level]; // admin level

    format(string,128,"Admin Level:  %d",level); // %d represents the level variable we created, which substitutes PlayerInfo[playerid][Level]
    SendClientMessage(playerid,-1,string);
   
    return 1;
}
This will not work for you unless you actually had those variables, enumerations and the command processor (DCMD). Though this is an example like I said
Reply
#7

heres a part of a config dialog. replace the DIALOG_STYLE_LIST by DIALOG_STYLE_MSGBOX
Код:
	new StringMenu[1024];
	format(StringMenu,sizeof(StringMenu),"%d\t{33cc33}MODE_EXIT\n",GetPVarInt(playerid,"OE_MODE_EXIT"));
	format(StringMenu,sizeof(StringMenu),"%s%d\t{33cc33}MODE_SWITCH\n",StringMenu,GetPVarInt(playerid,"OE_MODE_SWITCH"));
	format(StringMenu,sizeof(StringMenu),"%s%d\t{33cc33}MOVE_X_POS\n",StringMenu,GetPVarInt(playerid,"OE_MOVE_X_POS"));
	format(StringMenu,sizeof(StringMenu),"%s%d\t{33cc33}MOVE_X_NEG\n",StringMenu,GetPVarInt(playerid,"OE_MOVE_X_NEG"));
	format(StringMenu,sizeof(StringMenu),"%s%d\t{33cc33}MOVE_Y_POS\n",StringMenu,GetPVarInt(playerid,"OE_MOVE_Y_POS"));
	format(StringMenu,sizeof(StringMenu),"%s%d\t{33cc33}MOVE_Y_NEG\n",StringMenu,GetPVarInt(playerid,"OE_MOVE_Y_NEG"));
	format(StringMenu,sizeof(StringMenu),"%s%d\t{33cc33}MOVE_Z_POS\n",StringMenu,GetPVarInt(playerid,"OE_MOVE_Z_POS"));
	format(StringMenu,sizeof(StringMenu),"%s%d\t{33cc33}MOVE_Z_NEG\n",StringMenu,GetPVarInt(playerid,"OE_MOVE_Z_NEG"));
	format(StringMenu,sizeof(StringMenu),"%s%d\t{cccc33}RESET\n",StringMenu,GetPVarInt(playerid,"OE_RESET"));
	format(StringMenu,sizeof(StringMenu),"%s%d\t{cccc33}ALIGN\n",StringMenu,GetPVarInt(playerid,"OE_ALIGN"));
	ShowPlayerDialog(playerid,MenuConfig,DIALOG_STYLE_LIST,"Select Key to assign",StringMenu,"Select","Cancel");
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)