25.03.2019, 16:07
update the code
this is mess, I suggest to start over with clean code
Код:
AddARepairPickups(Float:x, Float:y, Float:z) { for (new i; i < sizeof(ARepairPickups); i++) { if (ARepairPickups[i][PickupID] == -1) { ARepairPickups[i][PickupID] = CreatePickup(3096, 1, x, y, z, 0); ARepairPickups[i][pux] = x; ARepairPickups[i][puy] = y; ARepairPickups[i][puz] = z; Create3DTextLabel("{FFFF00}Type {00FF00}/repair {FFFF00}to repair your vehicle!", -1, x, y, z +0.5, 50.0, 0); CreateDynamicMapIcon(x, y, z, 27, 0, 0, 0, -1, 300.0); printf("PickupID: %d, PosX: %.4f, PosY: %.4f, PosZ: %.4f",ARepairPickups[i][PickupID],x,y,z); break; } } } ////and AddARepairPickups(x, y, z); mysql_format(MySQL, query, 128, "INSERT INTO `repair_system` (`PickupID`, `pux`,`puy`,`puz`) VALUES (%d, %f, %f, %f)",ARepairPickups[playerid][PickupID], x, y, z); // Use %f specifier here, because we insert float for pux puy puz mysql_tquery(MySQL, query, "AddARepairPickups", "ffff", ARepairPickups[playerid][PickupID], x, y, z); // AddARepairPickups must be a public function return 1;