SA-MP Forums Archive
SA-MP inputtext - 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: SA-MP inputtext (/showthread.php?tid=332146)



SA-MP inputtext - DannySnoopy - 07.04.2012

Hello, i have a problem with an inputtext, the problem is, i'v made a command /setrank [playerid] [rankname]
it works fine, but it doesn't save in the account file since my account saving file holds only numbers.
So what i want is, to know how to save the /setrank [rankname] INI.

If the command needed i'll post! +1 rep!


Re: SA-MP inputtext - Marco_Valentine - 07.04.2012

post the command and the rank function


Re: SA-MP inputtext - TzAkS. - 07.04.2012

INI_WriteString

https://sampforum.blast.hk/showthread.php?tid=175565


Re: SA-MP inputtext - Harish - 07.04.2012

pawn Код:
//on Command
dcmd(setrank, 7, cmdtext);

dcmd_setrank(playerid, params[])
{
        new rankname[32];
    if (strlen(params))
    {
        sscanf(params, "s", rankname)
        if (IsPlayerConnected(id))
        {
            new File:ftw=fopen("ranks.txt", io_write);
                        fwrite(ftw, rankname);
                        fclose(ftw);
        }
        else
        {
            SendClientMessage(playerid, 0xFF0000AA, "Player not found");
        }
    }
    else
    {
        SendClientMessage(playerid, 0xFF0000AA, "Usage: \"/heal <playerid>\"");
    }
    return 1;
}
bump late post..Thanks too


Re: SA-MP inputtext - DannySnoopy - 07.04.2012

thanks guys but i solved it!