SA-MP Forums Archive
Dialog - 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: Dialog (/showthread.php?tid=292160)



Dialog - cruising - 22.10.2011

Hello!

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


Re: Dialog - Steven82 - 22.10.2011

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


Re: Dialog - cruising - 22.10.2011

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.


Re: Dialog - Ensconce - 22.10.2011

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.


Re: Dialog - cruising - 22.10.2011

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" -_-


Re: Dialog - grand.Theft.Otto - 22.10.2011

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


Re: Dialog - Babul - 22.10.2011

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");