Saving problem :x
#1

Hello guys!

I made an easy carownership system but there is one little problem that i can't solve...
Here is the post:
pawn Код:
new file[128];
    new Float:x,Float:y,Float:z;
    new pName[MAX_PLAYER_NAME];
    GetPlayerName(playerid,pName,30);
    format(file,sizeof(file),"Server/Cars/%s.ini",pName);
    if(dini_Exists(file))
    {
    for(new i; i<MAX_VEHICLES; i++)
    if(i == CarOwner[playerid])
    {
    new Float:Healthh;
    Healthh = GetPlayerVehicleID(playerid);
    new Float:angl;
    GetVehiclePos(i,x,y,z);
    dini_IntSet(file,"LastID", i);
    dini_IntSet(file,"CModel", CarInfo[i][CModel]);
    dini_FloatSet(file,"PosX", x);
    dini_FloatSet(file,"PosY", y);
    dini_FloatSet(file,"PosZ", z);
    dini_IntSet(file,"Angle", GetVehicleZAngle(i,angl));
    dini_FloatSet(file,"Health", Healthh);
    CarOwner[playerid] = i;
    DestroyVehicle(i);
    }
    }
This script is added in: OnPlayerDisconnect(playerid)
and the problem is it doesn't save anything if i do GMX
- yes i also tried on OnPlayerGameModeExit
Reply


Messages In This Thread
Saving problem :x - by Kmitska - 21.02.2011, 10:13
Re: Saving problem :x - by JaTochNietDan - 21.02.2011, 10:25
AW: Saving problem :x - by Kmitska - 21.02.2011, 10:33
Re: Saving problem :x - by JaTochNietDan - 21.02.2011, 10:34
AW: Saving problem :x - by Kmitska - 21.02.2011, 10:36
Re: Saving problem :x - by JaTochNietDan - 21.02.2011, 10:38
AW: Saving problem :x - by Kmitska - 21.02.2011, 10:41
Re: Saving problem :x - by JaTochNietDan - 21.02.2011, 10:45
AW: Saving problem :x - by Kmitska - 21.02.2011, 10:48
Re: Saving problem :x - by JaTochNietDan - 21.02.2011, 10:50

Forum Jump:


Users browsing this thread: 3 Guest(s)