Hello, I have a problem that I cannot solve. Gamemode worked in 2020, stopped working properly after another update includes YSI by Y_Less. Below are fragments of the code - please help me or point me to the error I am making. The server console stops responding, usually it takes 2-3 minutes and you can enter commands on the server and the game freezes. The error occurs after creating a vehicle via the command. As soon as we see the "triangle" of the created vehicle on the radar, the entire console and server hang and no actions can be performed.
If I made mistakes in translation - I am very sorry, my English is not good.
[12:02:24] [debug] Long callback execution detected (hang or performance issue) [12:02:24] [debug] AMX backtrace: [12:02:24] [debug] #0 00022368 in ?? (24137476, 16133476, 2001, 1) in gamemode.amx [12:02:24] [debug] #1 0002adf8 in ?? (1, 0) in gamemode.amx [12:02:24] [debug] #2 0001bf74 in public OnVehicleStreamIn (1, 0) in gamemode.amx
OnVehicleStreamIn:
public OnVehicleStreamIn(vehicleid, forplayerid) { return 1; }
Code fragment of the command that creates the vehicle:
`if(!strcmp(type, "stworz", true) || !strcmp(type, "create", true))
{
new modelid, color1, color2;
if(sscanf(varchar, "ddd", modelid, color1, color2))
{
ShowTipForPlayer(playerid, "/apojazd stworz [Model] [Kolor1] [Kolor2]");
return 1;
}
if(modelid < 400 || modelid > 611)
{
ShowPlayerInfoDialog(playerid, D_TYPE_ERROR, "Model pojazdu nie może być mniejszy niż 400 oraz większy od 611.");
return 1;
}
if(color1 < 0 || color1 > 255 || color2 < 0 || color2 > 255)
{
ShowPlayerInfoDialog(playerid, D_TYPE_ERROR, "ID koloru nie może być mniejsze niż 0 a także większe od 255.");
return 1;
}
new Float:PosX, Float:PosY, Float:PosZ, vehid;
Hello, I have a problem that I cannot solve. Gamemode worked in 2020, stopped working properly after another update includes YSI by Y_Less. Below are fragments of the code - please help me or point me to the error I am making. The server console stops responding, usually it takes 2-3 minutes and you can enter commands on the server and the game freezes. The error occurs after creating a vehicle via the command. As soon as we see the "triangle" of the created vehicle on the radar, the entire console and server hang and no actions can be performed.
If I made mistakes in translation - I am very sorry, my English is not good.
[12:02:24] [debug] Long callback execution detected (hang or performance issue) [12:02:24] [debug] AMX backtrace: [12:02:24] [debug] #0 00022368 in ?? (24137476, 16133476, 2001, 1) in gamemode.amx [12:02:24] [debug] #1 0002adf8 in ?? (1, 0) in gamemode.amx [12:02:24] [debug] #2 0001bf74 in public OnVehicleStreamIn (1, 0) in gamemode.amx
OnVehicleStreamIn:
public OnVehicleStreamIn(vehicleid, forplayerid) { return 1; }
Code fragment of the command that creates the vehicle: `if(!strcmp(type, "stworz", true) || !strcmp(type, "create", true)) { new modelid, color1, color2; if(sscanf(varchar, "ddd", modelid, color1, color2)) { ShowTipForPlayer(playerid, "/apojazd stworz [Model] [Kolor1] [Kolor2]"); return 1; } if(modelid < 400 || modelid > 611) { ShowPlayerInfoDialog(playerid, D_TYPE_ERROR, "Model pojazdu nie może być mniejszy niż 400 oraz większy od 611."); return 1; } if(color1 < 0 || color1 > 255 || color2 < 0 || color2 > 255) { ShowPlayerInfoDialog(playerid, D_TYPE_ERROR, "ID koloru nie może być mniejsze niż 0 a także większe od 255."); return 1; } new Float:PosX, Float:PosY, Float:PosZ, vehid;
CreateStaticVehicle:
public CreateStaticVehicle(modelid, Float:PosX, Float:PosY, Float:PosZ, Float:PosA, color1, color2, respawn_delay) { new veh_uid, vehid; mysql_query_format("INSERT INTO
"SQL_PREF"vehicles` (vehicle_model, vehicle_posx, vehicle_posy, vehicle_posz, vehicle_posa, vehicle_color1, vehicle_color2, vehicle_fuel) VALUES ('%d', '%f', '%f', '%f', '%f', '%d', '%d', '%d')", modelid, PosX, PosY, PosZ, PosA, color1, color2, GetVehicleMaxFuel(modelid));}`
Public function LoadVehicle `public LoadVehicle(veh_uid) { new query[256], rows, vehid = INVALID_VEHICLE_ID, ORM:orm_id, Cache:tmp_cache;
}`