Don't save a bike [+1 Rep]
#1

When I buy a motorcycle and get out to the server, again enter the Server but the bike can not preserve.

pawn Код:
forward SaveBike(motorid);
public SaveBike(motorid)
{
    new car[32];
    format(car, 32, "/Motori/%d.ini", motorid);
    if(fexist(car))
    {
        djSetInt(car, "Model", MotorInfo[motorid][mModel]);
        djSetFloat(car, "LocX", MotorInfo[motorid][LocX]);
        djSetFloat(car, "LocY", MotorInfo[motorid][LocY]);
        djSetFloat(car, "LocZ", MotorInfo[motorid][LocZ]);
        djSetFloat(car, "Kut", MotorInfo[motorid][Kut]);
        djSetInt(car, "Boja1", MotorInfo[motorid][mBoja1]);
        djSetInt(car, "Boja2", MotorInfo[motorid][mBoja2]);
        djSet(car, "Vlasnik", MotorInfo[motorid][mVlasnik]);
        djSetInt(car, "Cena", MotorInfo[motorid][mCena]);
        djSetInt(car, "ImaVlasnika", MotorInfo[motorid][mKupljeno]);
        djSetInt(car, "Lock", MotorInfo[motorid][mZakljucano]);
        djSetInt(car, "Prodano", MotorInfo[motorid][mProdano]);
    }
    return 1;
}
pawn Код:
stock ReloadBike(motorid)
{
    new car[32];
    format(car, 32, "/Motori/%d.ini", motorid);
    if(fexist(car))
    {
        MotorInfo[motorid][mModel] = djInt(car, "Model");
        MotorInfo[motorid][LocX] = djInt(car, "LocX");
        MotorInfo[motorid][LocY] = djInt(car, "LocY");
        MotorInfo[motorid][LocZ] = djInt(car, "LocZ");
        MotorInfo[motorid][Kut] = djInt(car, "Kut");
        MotorInfo[motorid][mBoja1] = djInt(car, "Boja1");
        MotorInfo[motorid][mBoja2] = djInt(car, "Boja2");
        format(MotorInfo[motorid][mVlasnik], MAX_PLAYER_NAME, "%s", dj(car, "Vlasnik"));
        MotorInfo[motorid][mCena] = djInt(car, "Cena");
        MotorInfo[motorid][mKupljeno] = djInt(car, "ImaVlasnika");
        MotorInfo[motorid][mZakljucano] = djInt(car, "Lock");
        MotorInfo[motorid][mProdano] = djInt(car, "Prodano");
        new motor = AddStaticVehicleEx(MotorInfo[motorid][mModel],MotorInfo[motorid][LocX],MotorInfo[motorid][LocY],MotorInfo[motorid][LocZ]+1.0,MotorInfo[motorid][Kut],MotorInfo[motorid][mBoja1],MotorInfo[motorid][mBoja2], 1200000);
        Cmotor[motor] = 1;
    }
    return 1;
}
What's wrong?
Reply


Messages In This Thread
Don't save a bike [+1 Rep] - by ZmaXy - 29.12.2011, 22:12
Re: Don't save a bike [+1 Rep] - by coole210 - 29.12.2011, 22:17
Re: Don't save a bike [+1 Rep] - by PowerPC603 - 29.12.2011, 22:26

Forum Jump:


Users browsing this thread: 1 Guest(s)