12.01.2018, 22:14
Hello,
i dont know how it should work that i match the Database carid with the ingame car id
https://pic-upload.pw/img/0cd for example ingame its ID:1 and in the Database its ID 4
thats the command to delete the car but it only delete the car if the database id and the ingame id match
i dont know how it should work that i match the Database carid with the ingame car id
https://pic-upload.pw/img/0cd for example ingame its ID:1 and in the Database its ID 4
Код:
CMD:copcarloeschen(playerid, params[]) { new vid; if(!IsNumeric(params) || !strlen(params)) return SendClientMessage(playerid, 0xFF0000FF, "Error: Nutze: /copcarloeschen [Vehicle ID]"); vid = strval(params); if(vid <= 0) return SendClientMessage(playerid, 0xFF0000FF, "Error: Vehicle-ID ist kein Fraktions-Fahrzeug."); for(new i=0; i<MAX_cop_VEHICLES; i++) { if(copVehicle[i][e_vID] == vid) { copVehicle[i][e_modelID] = 0; copVehicle[i][e_x] = 0.0; copVehicle[i][e_y] = 0.0; copVehicle[i][e_z] = 0.0; copVehicle[i][e_a] = 0.0; copVehicle[i][e_color1] = 0; copVehicle[i][e_color2] = 0; new query[128]; format(query, sizeof(query), "DELETE FROM copVehicles WHERE ID = '%i'",vid); mysql_tquery(handle, query); DestroyVehicle(copVehicle[i][e_vID]); return SendClientMessage(playerid, 0x00FF00FF, "Fahrzeug gelцscht."); } } return SendClientMessage(playerid, 0xFF0000FF, "Error: Vehicle-ID ist kein Fraktions-Fahrzeug."); }