18.01.2012, 17:29
Function:
Code:
The purpose of this is to add the embedded colors to 'caption' and 'info' automatically, so they can easily be changed. I will also be adding more stuff to the my_ShowPlayerDialog function later on, so it IS needed.
Result: http://www.imagebam.com/image/0f41e8170467716
Question: Why are the buttons weird?
pawn Код:
stock my_ShowPlayerDialog(playerid, dialogid, style, caption[], info[], button1[], button2[])
{
strins(caption, "{B800C6}", 0, 8);
strins(info, "{FFFFFF}", 0, 8);
ShowPlayerDialog(playerid, dialogid, style, caption, info, button1, button2);
return 1;
}
#if defined _ALS_ShowPlayerDialog
#undef ShowPlayerDialog
#else
#define _ALS_ShowPlayerDialog
#endif
#define ShowPlayerDialog my_ShowPlayerDialog
pawn Код:
new lstring[256];
format(lstring, sizeof(lstring), "This name ({FFFF82}%s{FFFFFF}) is registered. You must login to continue.\nIf this is your account, please enter the password you chose when registering below.\nIf not, please quit and reconnect with a different name.", pName[playerid]);
ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT, "Login", lstring, "Login", "Quit");
Result: http://www.imagebam.com/image/0f41e8170467716
Question: Why are the buttons weird?