Bug with saving
#1

PHP код:
case DIALOG_IZMENIVOZILO:
        {
            if(
response)
            {
                if(
listitem == 0)
                {
                    new 
vid GetPlayerVehicleID(playerid);
                    new 
Float:vpos[4];
                    new 
q[125];
                    
                    if(
IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
                    {
                        
GetVehiclePos(vidvpos[0], vpos[1], vpos[2]);
                        
vInfo[vid][vehX] = vpos[0];
                        
vInfo[vid][vehY] = vpos[1];
                        
vInfo[vid][vehZ] = vpos[2];
                        
GetVehicleZAngle(vidvpos[3]);
                        
SetVehiclePos(vidvpos[0], vpos[1], vpos[2]);
                        
SetVehicleZAngle(vidvpos[3]);
            
                        
mysql_format(g_SQLqsizeof(q), "UPDATE `vehicles` SET `vehX` = %f, `vehY` = %f, `vehZ` = %f, `vehA` = %f WHERE `vehID` = %d"vInfo[vid][vehX], vInfo[vid][vehY], vInfo[vid][vehZ], vInfo[vid][vehA], vInfo[vid][vehID]);
                        
mysql_tquery(g_SQLq);
                        
                    }
                    else 
SEM(playerid"Niste u vozilu. Na mestu vozaca.");
                } 
but when it need to respawn, it will respawn on old spawn, old positions and mysql dont update it. Btw, system is working with iterators, so, i think im wrong there
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)