SA-MP inputtext
#1

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!
Reply
#2

post the command and the rank function
Reply
#3

INI_WriteString

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

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
Reply
#5

thanks guys but i solved it!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)