Command will always show number 1 when it has to raise
#2

Try something like this:

Not Tested.
pawn Код:
//somewhere at top of script
new Convoy = 0;

//Your command
COMMAND:createconvoy(playerid, params[])
{
    new string[64], text[128], number[25];
    new File:convoys = fopen("ConvoyIDs.txt", io_read);
    if(convoys)
    {
        Convoy++; //adds 1 each time
        fread(convoys, string);
        format(number, sizeof(number), "%d", Convoy);
        fwrite(convoys, number);
       
        PlayerInfo[playerid][pConvoy] = Convoy;
       
        fclose(convoys);
       
        format(text, sizeof(text), "Convoy with ID %d has been created", Convoy);
       
        print(text);
       

    }
    return 1;
}
Reply


Messages In This Thread
Command will always show number 1 when it has to raise - by Private200 - 22.03.2014, 01:05
Re: Command will always show number 1 when it has to raise - by Aerotactics - 22.03.2014, 02:13
Re: Command will always show number 1 when it has to raise - by Private200 - 22.03.2014, 09:09

Forum Jump:


Users browsing this thread: 3 Guest(s)