[HELP] How to..
#2

pawn Код:
format(string, sizeof(string), "/users/%s.ini", playername);
    printf("%s", string); // debug
    if(fexist(string))
    {
        gPlayerAccount[playerid] = 1;
        return 1;
    }
    else
    {
        gPlayerAccount[playerid] = 0;
    }
    format(string, sizeof(string), "/Vehicles/Players/%s.cfg", playername);
    printf("%s", string); // debug
    if(dini_Exists(string))
    {
        strmid(PlayerVehicle[playerid][pVeh1], dini_Get(string, "Vehicle1"), 0, strlen(dini_Get(string, "Vehicle1")), 255);
        strmid(PlayerVehicle[playerid][pVeh2], dini_Get(string, "Vehicle2"), 0, strlen(dini_Get(string, "Vehicle2")), 255);
        strmid(PlayerVehicle[playerid][pVeh3], dini_Get(string, "Vehicle3"), 0, strlen(dini_Get(string, "Vehicle3")), 255);
        strmid(PlayerVehicle[playerid][pVeh4], dini_Get(string, "Vehicle4"), 0, strlen(dini_Get(string, "Vehicle4")), 255);
        strmid(PlayerVehicle[playerid][pVeh5], dini_Get(string, "Vehicle5"), 0, strlen(dini_Get(string, "Vehicle5")), 255);
        return 1;
    }
    else
    {
        dini_Create(string);
        strmid(PlayerVehicle[playerid][pVeh1], "None", 0, strlen("None"), 255);
        strmid(PlayerVehicle[playerid][pVeh2], "None", 0, strlen("None"), 255);
        strmid(PlayerVehicle[playerid][pVeh3], "None", 0, strlen("None"), 255);
        strmid(PlayerVehicle[playerid][pVeh4], "None", 0, strlen("None"), 255);
        strmid(PlayerVehicle[playerid][pVeh5], "None", 0, strlen("None"), 255);
        //return 1;
    }
Try that, I am not sure if it will work..
Reply


Messages In This Thread
[HELP] Problem with format - by MartinDee - 03.08.2010, 23:27
Re: [HELP] How to.. - by Luis_Leone - 04.08.2010, 01:22
Re: [HELP] How to.. - by MartinDee - 04.08.2010, 09:38

Forum Jump:


Users browsing this thread: 1 Guest(s)