Writing to file problem
#2

pawn Код:
if(strcmp(cmd, "/regplate", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            new plate[128];
            plate = strtok(cmdtext, idx);

            if(strlen(plate) == 0) return SendClientMessage(playerid, 0xFFFFFFFF, "USAGE: /regplate [SF-XXX-XXX]");
           
            new vehicleid;
            new file[256];
            vehicleid = GetPlayerVehicleID(playerid);
            if(vehicleid > 183)
            {
                CarInfo[vehicleid][cLicense] = strval(plate);
                OnPropUpdate();
                OnPlayerUpdate(playerid);
                format(file,sizeof(file),"/file/cars.cfg");
                dini_Set(file,"plate",plate);
                format(string, sizeof(string), "* You've registered the car with this plate: %s. The ID of the car is: %d", plate, vehicleid);
                SendClientMessage(playerid, COLOR_WHITE, string);
            }
            return 1;
        }
        return 1;
    }
Reply


Messages In This Thread
Writing to file problem - by roadless - 03.08.2010, 21:19
Re: Writing to file problem - by cofy1 - 03.08.2010, 21:31
Re: Writing to file problem - by roadless - 03.08.2010, 21:42
Re: Writing to file problem - by cofy1 - 04.08.2010, 01:18

Forum Jump:


Users browsing this thread: 1 Guest(s)