Код:
forward LoadVehicleData();
public LoadVehicleData()
{
AntiDeAMX();
for(new vehicleid = 1;vehicleid<100;vehicleid++)
{
cache_get_field_content(0, "Fullname", VehicleData[vehicleid][Fullname], Mysql_users, 129);
cache_get_field_content(0, "Number", VehicleData[vehicleid][Number], Mysql_users, 126);
VehicleData[vehicleid][Model] = cache_get_field_content_int(0, "Model", Mysql_users);
VehicleData[vehicleid][PositionX] = cache_get_field_content_float(0, "PositionX", Mysql_users);
VehicleData[vehicleid][PositionY] = cache_get_field_content_float(0, "PositionY", Mysql_users);
VehicleData[vehicleid][PositionZ] = cache_get_field_content_float(0, "PositionZ", Mysql_users);
VehicleData[vehicleid][PositionA] = cache_get_field_content_float(0, "PositionA", Mysql_users);
VehicleData[vehicleid][Health] = cache_get_field_content_float(0, "Health", Mysql_users);
VehicleData[vehicleid][Color1] = cache_get_field_content_int(0, "Color1", Mysql_users);
VehicleData[vehicleid][Color2] = cache_get_field_content_int(0, "Color2", Mysql_users);
VehicleData[vehicleid][Mod1] = cache_get_field_content_int(0, "Mod1", Mysql_users);
VehicleData[vehicleid][Mod2] = cache_get_field_content_int(0, "Mod2", Mysql_users);
VehicleData[vehicleid][Mod3] = cache_get_field_content_int(0, "Mod3", Mysql_users);
VehicleData[vehicleid][Mod4] = cache_get_field_content_int(0, "Mod4", Mysql_users);
VehicleData[vehicleid][Mod5] = cache_get_field_content_int(0, "Mod5", Mysql_users);
VehicleData[vehicleid][Mod6] = cache_get_field_content_int(0, "Mod6", Mysql_users);
VehicleData[vehicleid][Mod7] = cache_get_field_content_int(0, "Mod7", Mysql_users);
VehicleData[vehicleid][Mod8] = cache_get_field_content_int(0, "Mod8", Mysql_users);
VehicleData[vehicleid][Mod9] = cache_get_field_content_int(0, "Mod9", Mysql_users);
VehicleData[vehicleid][Mod10] = cache_get_field_content_int(0, "Mod10", Mysql_users);
VehicleData[vehicleid][Mod11] = cache_get_field_content_int(0, "Mod11", Mysql_users);
VehicleData[vehicleid][Mod12] = cache_get_field_content_int(0, "Mod12", Mysql_users);
VehicleData[vehicleid][Mod13] = cache_get_field_content_int(0, "Mod13", Mysql_users);
VehicleData[vehicleid][Mod14] = cache_get_field_content_int(0, "Mod14", Mysql_users);
VehicleData[vehicleid][Mod15] = cache_get_field_content_int(0, "Mod15", Mysql_users);
VehicleData[vehicleid][Mod16] = cache_get_field_content_int(0, "Mod16", Mysql_users);
VehicleData[vehicleid][Mod17] = cache_get_field_content_int(0, "Mod17", Mysql_users);
VehicleData[vehicleid][Trunk] = cache_get_field_content_int(0, "Trunk", Mysql_users);
VehicleData[vehicleid][DoorLock] = cache_get_field_content_int(0, "DoorLock", Mysql_users);
VehicleData[vehicleid][Bonnet] = cache_get_field_content_int(0, "Bonnet", Mysql_users);
VehicleData[vehicleid][Engine] = cache_get_field_content_int(0, "Engine", Mysql_users);
VehicleData[vehicleid][Lights] = cache_get_field_content_int(0, "Lights", Mysql_users);
VehicleData[vehicleid][Alarm] = cache_get_field_content_int(0, "Alarm", Mysql_users);
AddVehicleComponent(vehicleid, VehicleData[vehicleid][Mod1]);
AddVehicleComponent(vehicleid, VehicleData[vehicleid][Mod2]);
AddVehicleComponent(vehicleid, VehicleData[vehicleid][Mod3]);
AddVehicleComponent(vehicleid, VehicleData[vehicleid][Mod4]);
AddVehicleComponent(vehicleid, VehicleData[vehicleid][Mod5]);
AddVehicleComponent(vehicleid, VehicleData[vehicleid][Mod6]);
AddVehicleComponent(vehicleid, VehicleData[vehicleid][Mod7]);
AddVehicleComponent(vehicleid, VehicleData[vehicleid][Mod8]);
AddVehicleComponent(vehicleid, VehicleData[vehicleid][Mod9]);
AddVehicleComponent(vehicleid, VehicleData[vehicleid][Mod10]);
AddVehicleComponent(vehicleid, VehicleData[vehicleid][Mod11]);
AddVehicleComponent(vehicleid, VehicleData[vehicleid][Mod12]);
AddVehicleComponent(vehicleid, VehicleData[vehicleid][Mod13]);
AddVehicleComponent(vehicleid, VehicleData[vehicleid][Mod14]);
AddVehicleComponent(vehicleid, VehicleData[vehicleid][Mod15]);
AddVehicleComponent(vehicleid, VehicleData[vehicleid][Mod16]);
AddVehicleComponent(vehicleid, VehicleData[vehicleid][Mod17]);
SetVehicleHealth(vehicleid, VehicleData[vehicleid][Health]);
SetVehicleNumberPlate(vehicleid, VehicleData[vehicleid][Number]);
CreateVehicle(VehicleData[vehicleid][Model], VehicleData[vehicleid][PositionX], VehicleData[vehicleid][PositionY], VehicleData[vehicleid][PositionZ], VehicleData[vehicleid][PositionA], VehicleData[vehicleid][Color1], VehicleData[vehicleid][Color2], 1000);
SetVehicleParamsEx(VehicleData[vehicleid][Model], VehicleData[vehicleid][Engine], VehicleData[vehicleid][Lights], VehicleData[vehicleid][Alarm], VehicleData[vehicleid][DoorLock], VehicleData[vehicleid][Bonnet], VehicleData[vehicleid][Trunk], 0);
}
return 1;
}
forward SaveVehicleData();
public SaveVehicleData()
{
AntiDeAMX();
for(new vehicleid = 1;vehicleid<500;vehicleid++)
{
new objective;
GetVehiclePos(vehicleid, VehicleData[vehicleid][PositionX],VehicleData[vehicleid][PositionY],VehicleData[vehicleid][PositionZ]);
GetVehicleZAngle(vehicleid,VehicleData[vehicleid][PositionA]);
GetVehicleHealth(vehicleid, VehicleData[vehicleid][Health]);
GetVehicleParamsEx(VehicleData[vehicleid][Model], VehicleData[vehicleid][Engine], VehicleData[vehicleid][Lights], VehicleData[vehicleid][Alarm], VehicleData[vehicleid][DoorLock], VehicleData[vehicleid][Bonnet], VehicleData[vehicleid][Trunk], objective);
GetVehicleComponentInSlot(vehicleid, VehicleData[vehicleid][Mod1]);
GetVehicleComponentInSlot(vehicleid, VehicleData[vehicleid][Mod2]);
GetVehicleComponentInSlot(vehicleid, VehicleData[vehicleid][Mod3]);
GetVehicleComponentInSlot(vehicleid, VehicleData[vehicleid][Mod4]);
GetVehicleComponentInSlot(vehicleid, VehicleData[vehicleid][Mod5]);
GetVehicleComponentInSlot(vehicleid, VehicleData[vehicleid][Mod6]);
GetVehicleComponentInSlot(vehicleid, VehicleData[vehicleid][Mod7]);
GetVehicleComponentInSlot(vehicleid, VehicleData[vehicleid][Mod8]);
GetVehicleComponentInSlot(vehicleid, VehicleData[vehicleid][Mod9]);
GetVehicleComponentInSlot(vehicleid, VehicleData[vehicleid][Mod10]);
GetVehicleComponentInSlot(vehicleid, VehicleData[vehicleid][Mod11]);
GetVehicleComponentInSlot(vehicleid, VehicleData[vehicleid][Mod12]);
GetVehicleComponentInSlot(vehicleid, VehicleData[vehicleid][Mod13]);
GetVehicleComponentInSlot(vehicleid, VehicleData[vehicleid][Mod14]);
GetVehicleComponentInSlot(vehicleid, VehicleData[vehicleid][Mod15]);
GetVehicleComponentInSlot(vehicleid, VehicleData[vehicleid][Mod16]);
GetVehicleComponentInSlot(vehicleid, VehicleData[vehicleid][Mod17]);
mysql_format(Mysql_users, query, sizeof(query), "UPDATE `"MASINU_LENTELE"` SET Fullname='%e', Number='%e', Model='%d', PositionX='%f', PositionY='%f', PositionZ='%f', PositionA='%f', Health='%f', Color1='%d', Color2='%d', Mod1='%d', Mod2='%d', Mod3='%d', Mod4='%d', Mod5='%d', Mod6='%d', Mod7='%d'",\
VehicleData[vehicleid][Fullname],
VehicleData[vehicleid][Number],
VehicleData[vehicleid][Model],
VehicleData[vehicleid][PositionX],
VehicleData[vehicleid][PositionY],
VehicleData[vehicleid][PositionZ],
VehicleData[vehicleid][PositionA],
VehicleData[vehicleid][Health],
VehicleData[vehicleid][Color1],
VehicleData[vehicleid][Color2],
VehicleData[vehicleid][Mod1],
VehicleData[vehicleid][Mod2],
VehicleData[vehicleid][Mod3],
VehicleData[vehicleid][Mod4],
VehicleData[vehicleid][Mod5],
VehicleData[vehicleid][Mod6],
VehicleData[vehicleid][Mod7]);
mysql_format(Mysql_users, query, sizeof(query), "%s, Mod8='%d', Mod9='%d', Mod10='%d', Mod11='%d', Mod12='%d', Mod13='%d', Mod14='%d', Mod15='%d', Mod16='%d', Mod17='%d', Trunk='%d', DoorLock='%d', Bonnet='%d', Engine='%d', Lights='%d', Alarm='%d' WHERE Fullname='%e'",\
query,
VehicleData[vehicleid][Mod8],
VehicleData[vehicleid][Mod9],
VehicleData[vehicleid][Mod10],
VehicleData[vehicleid][Mod11],
VehicleData[vehicleid][Mod12],
VehicleData[vehicleid][Mod13],
VehicleData[vehicleid][Mod14],
VehicleData[vehicleid][Mod15],
VehicleData[vehicleid][Mod16],
VehicleData[vehicleid][Mod17],
VehicleData[vehicleid][Trunk],
VehicleData[vehicleid][Lights],
VehicleData[vehicleid][Bonnet],
VehicleData[vehicleid][Engine],
VehicleData[vehicleid][Alarm],
VehicleData[vehicleid][Fullname]);
mysql_tquery(Mysql_users, query, "", "");
}
}
Код:
...
[21:36:26] [DEBUG] cache_get_field_content - row: 0, field_name: "Fullname", connection: 1, max_len: 129
[21:36:26] [WARNING] cache_get_field_content - no active cache
[21:36:26] [DEBUG] cache_get_field_content - row: 0, field_name: "Number", connection: 1, max_len: 126
[21:36:26] [WARNING] cache_get_field_content - no active cache
[21:36:26] [DEBUG] cache_get_field_content_int - row: 0, field_name: "Model", connection: 1
[21:36:26] [WARNING] cache_get_field_content_int - no active cache
[21:36:26] [DEBUG] cache_get_field_content_float - row: 0, field_name: "PositionX", connection: 1
[21:36:26] [WARNING] cache_get_field_content_float - no active cache
[21:36:26] [DEBUG] cache_get_field_content_float - row: 0, field_name: "PositionY", connection: 1
[21:36:26] [WARNING] cache_get_field_content_float - no active cache
[21:36:26] [DEBUG] cache_get_field_content_float - row: 0, field_name: "PositionZ", connection: 1
[21:36:26] [WARNING] cache_get_field_content_float - no active cache
[21:36:26] [DEBUG] cache_get_field_content_float - row: 0, field_name: "PositionA", connection: 1
[21:36:26] [WARNING] cache_get_field_content_float - no active cache
[21:36:26] [DEBUG] cache_get_field_content_float - row: 0, field_name: "Health", connection: 1
[21:36:26] [WARNING] cache_get_field_content_float - no active cache
[21:36:26] [DEBUG] cache_get_field_content_int - row: 0, field_name: "Color1", connection: 1
[21:36:26] [WARNING] cache_get_field_content_int - no active cache
[21:36:26] [DEBUG] cache_get_field_content_int - row: 0, field_name: "Color2", connection: 1
[21:36:26] [WARNING] cache_get_field_content_int - no active cache
[21:36:26] [DEBUG] cache_get_field_content_int - row: 0, field_name: "Mod1", connection: 1
[21:36:26] [WARNING] cache_get_field_content_int - no active cache
[21:36:26] [DEBUG] cache_get_field_content_int - row: 0, field_name: "Mod2", connection: 1
[21:36:26] [WARNING] cache_get_field_content_int - no active cache
[21:36:26] [DEBUG] cache_get_field_content_int - row: 0, field_name: "Mod3", connection: 1
[21:36:26] [WARNING] cache_get_field_content_int - no active cache
[21:36:26] [DEBUG] cache_get_field_content_int - row: 0, field_name: "Mod4", connection: 1
[21:36:26] [WARNING] cache_get_field_content_int - no active cache
[21:36:26] [DEBUG] cache_get_field_content_int - row: 0, field_name: "Mod5", connection: 1
[21:36:26] [WARNING] cache_get_field_content_int - no active cache
[21:36:26] [DEBUG] cache_get_field_content_int - row: 0, field_name: "Mod6", connection: 1
[21:36:26] [WARNING] cache_get_field_content_int - no active cache
[21:36:26] [DEBUG] cache_get_field_content_int - row: 0, field_name: "Mod7", connection: 1
[21:36:26] [WARNING] cache_get_field_content_int - no active cache
[21:36:26] [DEBUG] cache_get_field_content_int - row: 0, field_name: "Mod8", connection: 1
[21:36:26] [WARNING] cache_get_field_content_int - no active cache
[21:36:26] [DEBUG] cache_get_field_content_int - row: 0, field_name: "Mod9", connection: 1
[21:36:26] [WARNING] cache_get_field_content_int - no active cache
[21:36:26] [DEBUG] cache_get_field_content_int - row: 0, field_name: "Mod10", connection: 1
[21:36:26] [WARNING] cache_get_field_content_int - no active cache
[21:36:26] [DEBUG] cache_get_field_content_int - row: 0, field_name: "Mod11", connection: 1
[21:36:26] [WARNING] cache_get_field_content_int - no active cache
[21:36:26] [DEBUG] cache_get_field_content_int - row: 0, field_name: "Mod12", connection: 1
[21:36:26] [WARNING] cache_get_field_content_int - no active cache
[21:36:26] [DEBUG] cache_get_field_content_int - row: 0, field_name: "Mod13", connection: 1
[21:36:26] [WARNING] cache_get_field_content_int - no active cache
[21:36:26] [DEBUG] cache_get_field_content_int - row: 0, field_name: "Mod14", connection: 1
[21:36:26] [WARNING] cache_get_field_content_int - no active cache
[21:36:26] [DEBUG] cache_get_field_content_int - row: 0, field_name: "Mod15", connection: 1
[21:36:26] [WARNING] cache_get_field_content_int - no active cache
[21:36:26] [DEBUG] cache_get_field_content_int - row: 0, field_name: "Mod16", connection: 1
[21:36:26] [WARNING] cache_get_field_content_int - no active cache
[21:36:26] [DEBUG] cache_get_field_content_int - row: 0, field_name: "Mod17", connection: 1
[21:36:26] [WARNING] cache_get_field_content_int - no active cache
[21:36:26] [DEBUG] cache_get_field_content_int - row: 0, field_name: "Trunk", connection: 1
[21:36:26] [WARNING] cache_get_field_content_int - no active cache
[21:36:26] [DEBUG] cache_get_field_content_int - row: 0, field_name: "DoorLock", connection: 1
[21:36:26] [WARNING] cache_get_field_content_int - no active cache
[21:36:26] [DEBUG] cache_get_field_content_int - row: 0, field_name: "Bonnet", connection: 1
[21:36:26] [WARNING] cache_get_field_content_int - no active cache
[21:36:26] [DEBUG] cache_get_field_content_int - row: 0, field_name: "Engine", connection: 1
[21:36:26] [WARNING] cache_get_field_content_int - no active cache
[21:36:26] [DEBUG] cache_get_field_content_int - row: 0, field_name: "Lights", connection: 1
[21:36:26] [WARNING] cache_get_field_content_int - no active cache
[21:36:26] [DEBUG] cache_get_field_content_int - row: 0, field_name: "Alarm", connection: 1
[21:36:26] [WARNING] cache_get_field_content_int - no active cache
[21:37:56] [DEBUG] mysql_format - connection: 1, len: 4098, format: "UPDATE `accounts` SET Fullname='%e', Password='%e', PositionX='%f', PositionY='%f', PositionZ='%f', PositionA='%f', Health='%f',..."
[21:37:56] [DEBUG] mysql_format - connection: 1, len: 4098, format: "%s, Warnings='%d', Warning1Reason='%e', Warning2Reason='%e', Warning3Reason='%e', WarnedBy1='%e', WarnedBy2='%e', WarnedBy3='%e'..."
[21:37:56] [DEBUG] mysql_format - connection: 1, len: 4098, format: "%s, Helper='%d', Money='%d', MoneyBank='%d', Score='%d', Skin='%d', Hour='%d', Min='%d', Sec='%d', Kills='%d', Deaths='%d', Kred..."
[21:37:56] [DEBUG] mysql_format - connection: 1, len: 4098, format: "%s, Weapon1='%d', Weapon1a='%d', Weapon2='%d', Weapon2a='%d', Weapon3='%d', Weapon3a='%d', Weapon4='%d', Weapon4a='%d', Weapon5=..."
[21:37:56] [DEBUG] mysql_format - connection: 1, len: 4098, format: "%s, Weapon7='%d', Weapon7a='%d', Weapon8='%d', Weapon8a='%d', Weapon9='%d', Weapon9a='%d', Weapon10='%d', Weapon10a='%d', Weapon..."
[21:37:56] [DEBUG] mysql_tquery - connection: 1, query: "UPDATE `accounts` SET Fullname='The_Nerka', Password='41479FC4C3", callback: "(null)", format: "(null)"
[21:37:56] [DEBUG] CMySQLQuery::Execute[] - starting query execution
[21:37:56] [DEBUG] mysql_format - connection: 1, len: 4098, format: "UPDATE `vehicles` SET Fullname='%e', Number='%e', Model='%d', PositionX='%f', PositionY='%f', PositionZ='%f', PositionA='%f', He..."
[21:37:56] [DEBUG] mysql_format - connection: 1, len: 4098, format: "%s, Mod8='%d', Mod9='%d', Mod10='%d', Mod11='%d', Mod12='%d', Mod13='%d', Mod14='%d', Mod15='%d', Mod16='%d', Mod17='%d', Trunk=..."
[21:37:56] [ERROR] mysql_format - no value for specifier "%e" available
[21:37:56] [DEBUG] mysql_tquery - connection: 1, query: "UPDATE `vehicles` SET Fullname='', Number='', Model='0', Positio", callback: "(null)", format: "(null)"
[21:37:56] [DEBUG] mysql_format - connection: 1, len: 4098, format: "UPDATE `vehicles` SET Fullname='%e', Number='%e', Model='%d', PositionX='%f', PositionY='%f', PositionZ='%f', PositionA='%f', He..."
[21:37:56] [DEBUG] mysql_format - connection: 1, len: 4098, format: "%s, Mod8='%d', Mod9='%d', Mod10='%d', Mod11='%d', Mod12='%d', Mod13='%d', Mod14='%d', Mod15='%d', Mod16='%d', Mod17='%d', Trunk=..."
[21:37:56] [ERROR] mysql_format - no value for specifier "%e" available
[21:37:56] [DEBUG] mysql_tquery - connection: 1, query: "UPDATE `vehicles` SET Fullname='', Number='', Model='0', Positio", callback: "(null)", format: "(null)"
[21:37:56] [DEBUG] mysql_format - connection: 1, len: 4098, format: "UPDATE `vehicles` SET Fullname='%e', Number='%e', Model='%d', PositionX='%f', PositionY='%f', PositionZ='%f', PositionA='%f', He..."
[21:37:56] [DEBUG] mysql_format - connection: 1, len: 4098, format: "%s, Mod8='%d', Mod9='%d', Mod10='%d', Mod11='%d', Mod12='%d', Mod13='%d', Mod14='%d', Mod15='%d', Mod16='%d', Mod17='%d', Trunk=..."
[21:37:56] [ERROR] mysql_format - no value for specifier "%e" available
[21:37:56] [DEBUG] mysql_tquery - connection: 1, query: "UPDATE `vehicles` SET Fullname='', Number='', Model='0', Positio", callback: "(null)", format: "(null)"
[21:37:56] [DEBUG] mysql_format - connection: 1, len: 4098, format: "UPDATE `vehicles` SET Fullname='%e', Number='%e', Model='%d', PositionX='%f', PositionY='%f', PositionZ='%f', PositionA='%f', He..."
[21:37:56] [DEBUG] mysql_format - connection: 1, len: 4098, format: "%s, Mod8='%d', Mod9='%d', Mod10='%d', Mod11='%d', Mod12='%d', Mod13='%d', Mod14='%d', Mod15='%d', Mod16='%d', Mod17='%d', Trunk=..."
[21:37:56] [ERROR] mysql_format - no value for specifier "%e" available
[21:37:56] [DEBUG] mysql_tquery - connection: 1, query: "UPDATE `vehicles` SET Fullname='', Number='', Model='0', Positio", callback: "(null)", format: "(null)"
[21:37:56] [DEBUG] mysql_format - connection: 1, len: 4098, format: "UPDATE `vehicles` SET Fullname='%e', Number='%e', Model='%d', PositionX='%f', PositionY='%f', PositionZ='%f', PositionA='%f', He..."
[21:37:56] [DEBUG] mysql_format - connection: 1, len: 4098, format: "%s, Mod8='%d', Mod9='%d', Mod10='%d', Mod11='%d', Mod12='%d', Mod13='%d', Mod14='%d', Mod15='%d', Mod16='%d', Mod17='%d', Trunk=..."
[21:37:56] [ERROR] mysql_format - no value for specifier "%e" available
[21:37:56] [DEBUG] mysql_tquery - connection: 1, query: "UPDATE `vehicles` SET Fullname='', Number='', Model='0', Positio", callback: "(null)", format: "(null)"
[21:37:56] [DEBUG] mysql_format - connection: 1, len: 4098, format: "UPDATE `vehicles` SET Fullname='%e', Number='%e', Model='%d', PositionX='%f', PositionY='%f', PositionZ='%f', PositionA='%f', He..."
[21:37:56] [DEBUG] mysql_format - connection: 1, len: 4098, format: "%s, Mod8='%d', Mod9='%d', Mod10='%d', Mod11='%d', Mod12='%d', Mod13='%d', Mod14='%d', Mod15='%d', Mod16='%d', Mod17='%d', Trunk=..."
[21:37:56] [ERROR] mysql_format - no value for specifier "%e" available
[21:37:56] [DEBUG] mysql_tquery - connection: 1, query: "UPDATE `vehicles` SET Fullname='', Number='', Model='0', Positio", callback: "(null)", format: "(null)"
[21:37:56] [DEBUG] mysql_format - connection: 1, len: 4098, format: "UPDATE `vehicles` SET Fullname='%e', Number='%e', Model='%d', PositionX='%f', PositionY='%f', PositionZ='%f', PositionA='%f', He..."
[21:37:56] [DEBUG] mysql_format - connection: 1, len: 4098, format: "%s, Mod8='%d', Mod9='%d', Mod10='%d', Mod11='%d', Mod12='%d', Mod13='%d', Mod14='%d', Mod15='%d', Mod16='%d', Mod17='%d', Trunk=..."