14.12.2014, 21:41
The thing is its in Latvian language.
I will try to explain every thing.
This sets the info into MySQL database:
This is where the Pvar CREVEH is made:
the ccolors:
Ugh i guess there are tons of things to copy.
Heres the whole gamemode. If theres anything i need to translate or if theres anything in the script that you dont know what its ment for, il explain it. http://www.mediafire.com/view/sd6esp...d0/newmode.pwn
I will try to explain every thing.
This sets the info into MySQL database:
PHP код:
stock SetCarsStr(idx, stolb[], znach[])
{
new Query[128];
format(Query, sizeof(Query), "UPDATE "TABLE_CARS" SET %s = '%s' WHERE id = '%d' LIMIT 1", stolb, znach, idx);
return mysql_query(Query);
}
PHP код:
stock LoadMyCar(playerid)
{
if(GetPlayerHouse(playerid) == 0) return 1;
if(GetPlayerCar(playerid) == 0) return 1;
new c = GetPVarInt(playerid, "PlayerCars");
new carid = CreateVehicle(CarInfo[c][cModel], CarInfo[c][cX], CarInfo[c][cY], CarInfo[c][cZ], CarInfo[c][cFa], CarInfo[c][cColor][0], CarInfo[c][cColor][1], 90000);
CarDoors(carid, CarInfo[c][cLock]);
Fuel[carid] = CarInfo[c][cFuel];
SetVehicleHealth(carid, CarInfo[c][cHeal]);
Engine[carid] = false;
Lights[carid] = false;
switch(CarInfo[c][cLock])
{
case 0: IsLocked[carid] = false;
case 1: IsLocked[carid] = true;
}
SetPVarInt(playerid,"CREVEH",carid);
if(CarInfo[c][cVehcoms][0]!=0) AddVehicleComponent(carid, CarInfo[c][cVehcoms][0]);
if(CarInfo[c][cVehcoms][1]!=0) AddVehicleComponent(carid, CarInfo[c][cVehcoms][1]);
if(CarInfo[c][cVehcoms][2]!=0) AddVehicleComponent(carid, CarInfo[c][cVehcoms][2]);
if(CarInfo[c][cVehcoms][3]!=0) AddVehicleComponent(carid, CarInfo[c][cVehcoms][3]);
if(CarInfo[c][cVehcoms][4]!=0) AddVehicleComponent(carid, CarInfo[c][cVehcoms][4]);
if(CarInfo[c][cVehcoms][5]!=0) AddVehicleComponent(carid, CarInfo[c][cVehcoms][5]);
if(CarInfo[c][cVehcoms][6]!=0) AddVehicleComponent(carid, CarInfo[c][cVehcoms][6]);
if(CarInfo[c][cVehcoms][7]!=0) AddVehicleComponent(carid, CarInfo[c][cVehcoms][7]);
if(CarInfo[c][cVehcoms][8]!=0) AddVehicleComponent(carid, CarInfo[c][cVehcoms][8]);
if(CarInfo[c][cVehcoms][9]!=0) AddVehicleComponent(carid, CarInfo[c][cVehcoms][9]);
if(CarInfo[c][cVehcoms][10]!=0) AddVehicleComponent(carid, CarInfo[c][cVehcoms][10]);
if(CarInfo[c][cVehcoms][11]!=0) AddVehicleComponent(carid, CarInfo[c][cVehcoms][11]);
if(CarInfo[c][cVehcoms][12]!=0) AddVehicleComponent(carid, CarInfo[c][cVehcoms][12]);
if(CarInfo[c][cVehcoms][13]!=0) AddVehicleComponent(carid,CarInfo[c][cVehcoms][13]);
if(CarInfo[c][cPaintjob]!=0) ChangeVehiclePaintjob(carid, CarInfo[c][cPaintjob]);
return true;
}
PHP код:
enum cInfo
{
id,
cModel,
Float:cX,
Float:cY,
Float:cZ,
Float:cFa,
Float:cHeal,
cFuel,
cColors[16],
cColor[2],
cOwner[MAX_PLAYER_NAME],
cLock,
cCost,
cVehcom[127],
cVehcoms[14],
cPaintjob
};
Heres the whole gamemode. If theres anything i need to translate or if theres anything in the script that you dont know what its ment for, il explain it. http://www.mediafire.com/view/sd6esp...d0/newmode.pwn