strins() being weird
#1

Function:

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
Code:

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


Messages In This Thread
strins() being weird - by MP2 - 18.01.2012, 17:29
Re: strins() being weird - by CmZxC - 18.01.2012, 17:32
Re: strins() being weird - by RyDeR` - 18.01.2012, 17:32
Re: strins() being weird - by MP2 - 18.01.2012, 17:43
Re: strins() being weird - by RyDeR` - 18.01.2012, 17:51
Re: strins() being weird - by MP2 - 18.01.2012, 18:34
Re: strins() being weird - by RyDeR` - 18.01.2012, 19:14
Re: strins() being weird - by MP2 - 18.01.2012, 20:34
Re: strins() being weird - by RyDeR` - 18.01.2012, 20:48

Forum Jump:


Users browsing this thread: 3 Guest(s)