View Single Post
Old 23/06/2013, 07:15 PM   #15
Scenario
Godfather
 
Scenario's Avatar
 
Join Date: Feb 2010
Location: Heaven
Posts: 8,105
Reputation: 701
Default Re: Script Request Thread #6

You could of done this yourself quite easily...

pawn Code:
ShowPlayerDialog(playerid, 2818, DIALOG_STYLE_INPUT, "Admin Name - Create", "Please enter your desired admin name in the box below.", "Submit", ""); // this needs to go in the admin command when you set their level

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    switch(response)
    {
        case 2818:
        {
            if(!response) ShowPlayerDialog(playerid, 2818, DIALOG_STYLE_INPUT, "Admin Name - Create", "Please enter your desired admin name in the box below.", "Submit", "");
            else
            {
                new
                    szString[100];
           
                if(isnull(inputtext))
                    return ShowPlayerDialog(playerid, 2818, DIALOG_STYLE_INPUT, "Admin Name - Create", "Please enter your desired admin name in the box below.", "Submit", "");
               
                format(PlayerInfo[playerid][pAdminName], sizeof(pAdminName), "%s", inputtext);
                format(szString, sizeof(szString), "You have set your admin name to %s.", PlayerInfo[playerid][pAdminName]);
                SendClientMessage(playerid, -1, szString);
            }
        }
    }
    return 0;
}
Scenario is offline   Reply With Quote