saving text
#1

Hey guys, i'v been wondering how i could go about saving text(username) into something like a variable or so to save for use in the next dialog that appears.

pawn Код:
if(dialogid == CONSOLEBAN)
    {
        new Query[120],string[100],Year, Month, Day;
        getdate(Year, Month, Day);;
        format(string,sizeof(string),"[USER BANNED]You have banned the player %s. Date: %02d/%02d/%d",inputtext,Day,Month,Year);
        SendClientMessage(playerid, COLOR_WHITE,string);
        format(Query, sizeof(Query), "UPDATE `users` SET  `ban` = 1 WHERE `username` = '%s'", Banname);
        mysql_query(Query);
    }
        //the player enters the username that they want to ban.
    if(dialogid == CONSOLEBANREASON)
    {
        format(Query, sizeof(Query), "UPDATE `users` SET `ban_reason` = '%s' WHERE `username` = '%s'", inputtext);
        mysql_query(Query);
    }
//the admin enters the reason for there banning which needs to be saved to there account and the username needs to be transferred across from the first dialog box.
Cheers and thanks in advance.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)