'EasyData' (MySQL) Problem
#7

Alright. I'll keep your post in bookmark. Thanks.
I seem barely but.. I'm trying to do my best. x)
This code doesn't work.
PHP код:
CMD:garer(playerid)
{
    if(
pAccount[playerid][pAdmin] < SADMIN) return ErrorMsg(playerid_false);

    new 
vehicleid GetPlayerVehicleID(playerid),
        
Float:x,
        
Float:y,
        
Float:z;

    if(
vehicleid == INVALID_VEHICLE_ID) return ErrorMsg(playerid"Vous devez кtre dans un vйhicule.");

    
GetVehiclePos(vehicleidxyz);
    
DB::Fetch("Vehicle"___"`ID` = '%d'"vehicleid);
    if (
fetch_rows_count() > 0)
    {
        
AdminMessage(playerid"Changement des stats du vйhicule ID: %i."vehicleid);
        
DB::Update("ID"vStats[vehicleid][vSQLIB], 3,
                    
"x"FLOATx,
                    
"y"FLOATy,
                    
"z"FLOATz);
    }
    else
    {
        
vStats[vehicleid][vSQLIB] = fetch_row_id();

        
DB::CreateRow("Vehicle",
            
"ID"INTEGERvStats[vehicleid][vSQLIB],
             
"Model"INTEGERGetVehicleModel(vehicleid),
             
"VehicleID"INTEGERvehicleid);

        
AdminMessage(playerid"Vйhicule ID:%i en cours de crйation ..."vehicleid);
        
AdminMessage(playerid"Enregistrement des donnйes ...");

        
vStats[vehicleid][vSQLIB] = fetch_row_id();
         
vStats[vehicleid][vID] = vehicleid;
         
vStats[vehicleid][vX] = x;
         
vStats[vehicleid][vY] = y;
         
vStats[vehicleid][vZ] = z;
         
vStats[vehicleid][vColor1] = random(150);
         
vStats[vehicleid][vColor2] = random(150);
         
vStats[vehicleid][vHealth] = 1500.0;
         
vStats[vehicleid][vModel] = GetVehicleModel(vehicleid);
         
vStats[vehicleid][vRespawn] = 1800;
         
format(vStats[vehicleid][vPlate], 10GetARandomPlate());

        
AdminMessage(playerid"Donnйes enregistrйes. Attributions des nouvelles donйes au vйhicule.");

         
ChangeVehicleColor(vehicleidvStats[vehicleid][vColor1], vStats[vehicleid][vColor2]);
         
RepairVehicle(vehicleid);
         
SetVehicleHealth(vehicleidvStats[vehicleid][vHealth]);
         
SaveVehicleStats(vehicleid);

        
AdminMessage(playerid"Attributions terminйes.");
    }
    
fetcher_close();
    return 
1;

If you need english translate, say it. Sorry. '-'
Reply


Messages In This Thread
'EasyData' (MySQL) Problem - by Dayrion - 15.09.2016, 21:01
Re: 'EasyData' (MySQL) Problem - by Dayrion - 16.09.2016, 14:10
Re: 'EasyData' (MySQL) Problem - by Konstantinos - 16.09.2016, 14:17
Re: 'EasyData' (MySQL) Problem - by Gammix - 16.09.2016, 14:29
Re: 'EasyData' (MySQL) Problem - by Dayrion - 16.09.2016, 15:16
Re: 'EasyData' (MySQL) Problem - by Gammix - 16.09.2016, 15:41
Re: 'EasyData' (MySQL) Problem - by Dayrion - 16.09.2016, 16:25
Re: 'EasyData' (MySQL) Problem - by Gammix - 16.09.2016, 21:32
Re: 'EasyData' (MySQL) Problem - by Dayrion - 17.09.2016, 09:37

Forum Jump:


Users browsing this thread: 2 Guest(s)