SA-MP Forums Archive
What's Wrong In This Code - 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: What's Wrong In This Code (/showthread.php?tid=610197)



What's Wrong In This Code - CarRamper - 21.06.2016

Hello Guys I Want That When A Player Registers Succesfully It Shows That Player a Textdraw but the textdraw is shown along the register dialog i what it to be shows after the player type password of registration and hit register

here is my code What's wrong in it
Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    switch( dialogid )
    {
        case DIALOG_REGISTER:
        {
            if (!response) return Kick(playerid);
            if(response)
            {
                if(!strlen(inputtext)) return ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT, "Registering...","{FF0000}You have entered an invalid password.\n""Type your password below to register a new account.","Register","Quit");
				new INI:File = INI_Open(UserPath(playerid));
                INI_SetTag(File,"data");
                INI_WriteInt(File,"Password",udb_hash(inputtext));
                INI_WriteInt(File,"Cash",0);
                INI_WriteInt(File,"Admin",0);
                INI_WriteInt(File,"Kills",0);
                INI_WriteInt(File,"Deaths",0);
                INI_WriteInt(File,"WantedLevel",0);
                INI_WriteInt(File,"Vip",0);
                INI_WriteInt(File,"Score",0);
                INI_WriteInt(File,"Condoms",0);
                INI_WriteInt(File,"Banned",0);
                INI_WriteInt(File,"Jailed",0);
                INI_WriteInt(File,"Drugs",0);
                INI_WriteInt(File,"Nopm",0);
                INI_WriteInt(File,"Bank",0);
                INI_WriteInt(File,"Sausages",0);
                INI_WriteInt(File,"PassChange",0);
                INI_WriteInt(File,"Mute",0);
                INI_Close(File);
                INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
                TextDrawShowForPlayer(playerid,Textdraw1);
                TextDrawShowForPlayer(playerid,TB1);
			}
        }



Re: What's Wrong In This Code - MotherDucker - 21.06.2016

Are you able to show a screenshot?


Re: What's Wrong In This Code - CarRamper - 21.06.2016

yes the textdraw is comming but i want it to be shown after succesfull registeration


Re: What's Wrong In This Code - CarRamper - 21.06.2016

Got The Error