Beiträge von RedDragon28080
-
-
liegt das daran das im MSQL Immer "NULL" steht ???
-
hallo Breadfish
ich habe folgendes Problem und zwar
wenn ich ein Fahrzeug kaufe steht im MSQL als "NULL"
hier der beweis
hoffe ihr könnt mir da helfen
C
Alles anzeigenpublic OnPlayerBuyCar(playerid,Model,Preis,Autohaus)//CARSYS { if(IsPlayerConnected(playerid) && !Dtc_PlayerHaveCar[playerid][Dtc_PlayerKey[playerid]]) { CallRemoteFunction("M_GivePlayerMoney","id",playerid,-Preis); Gas[Model] = GetGasMax(GetVehicleModel(Model)); SetParkPlatz(playerid,Autohaus); new name[MAX_PLAYER_NAME], str[256], x = Dtc_PlayerKey[playerid]; GetPlayerName(playerid, name, sizeof name); mysql_format(handle, str, sizeof(str), "INSERT INTO `carsystem` (`CarOwner`) VALUES ('%s_%d');", name, x); mysql_pquery(handle, str); format(str, sizeof(str), "UPDATE `carsystem` SET `CarModel`='%d', `CarPos_X`='&f', `CarPos_Y`='&f', `CarPos_Z`='&f', `CarPos_A`='&f' \ , `CarNitro`='0', `CarHyd`='0', `CarWheel`='0', `CarAusp`='0' WHERE `CarOwner` = '%s_%d'", Model, PlayerCar[playerid][x][CarPos_x], PlayerCar[playerid][x][CarPos_y], PlayerCar[playerid][x][CarPos_z], PlayerCar[playerid][x][CarRotate], name, x); mysql_pquery(handle, str); format(str, sizeof(str), "UPDATE `carsystem` SET `CarSideL`='0', `CarSideR`='0', `CarFB`='0', `CarRB`='0', `CarSpoiler`='0' \ , `CarRoof`='0', `CarHood`='0', `CarVents`='0', `CarLamps`='0' WHERE `CarOwner` = '%s_%d'", name, x); mysql_pquery(handle, str); format(str, sizeof(str), "UPDATE `carsystem` SET `CarPJ`='0', `CarC1`='0', `CarC2`='0', `Preis`='%d', `Neon`='0' \ , `Plate`='0', `Number`='GBN-0', `Gesperrt`='0', `Sperrpreis`='0', `Kralle`='0' WHERE `CarOwner` = '%s_%d'", Preis, name, x); mysql_pquery(handle, str); OnPlayerCarLogin(playerid); printf("OnPlayerBuyCar (%s_%d)",name,x); mysql_log(LOG_ALL); } }
-
es geht jetzt aber habe jetzt das letzte Problem mit mein autohaus und zwar das löschen von der datenbank
es wird nur das fahrzeug gelöscht vom server aber nicht von der datenbank
C
Alles anzeigenif(strcmp("/carsell", cmdtext, true, 10) == 0) { if(Dtc_PlayerHaveCar[playerid][Dtc_PlayerKey[playerid]]) { GivePlayerMoney(playerid,PlayerCar[playerid][Dtc_PlayerKey[playerid]][CarPreis]/2); Dtc_Carlock[PlayerCar[playerid][Dtc_PlayerKey[playerid]][CarId]] = 0; Dtc_UnLockCar(PlayerCar[playerid][Dtc_PlayerKey[playerid]][CarId]); DestroyVehicle(PlayerCar[playerid][Dtc_PlayerKey[playerid]][CarId]); new string3[32]; new playername3[MAX_PLAYER_NAME]; GetPlayerName(playerid, playername3, sizeof(playername3)); mysql_format(handle,string3, sizeof(string3), "DELETE FROM `carsystem` WHERE `CarOwner`='%s_%d'",playername3,Dtc_PlayerKey[playerid]); mysql_pquery(handle, string3); Dtc_PlayerHaveCar[playerid][Dtc_PlayerKey[playerid]] = 0; SendClientMessage(playerid, COLOR_YELLOW, "Fahrzeug erfolgreich verkauft. Die Hälfte des Kaufpreises wurde dir erstattet!"); } else { SendClientMessage(playerid, COLOR_GREY, "Du besitzt kein Fahrzeug!"); return 1; } return 1; }
-
und wie mache ich das mit "PlayerCarSpawn" das
das ich da das Kennzeichen erstellen kann
-
es geht jetzt habe eine sache vergessen aber habe ein Problem mit das kennzeichen system
egal was ich mache das kennzeichen will nicht da steht immer XYZSR998
da soll das kennzeichen stehen
C
Alles anzeigenpublic PlayerCarSpawn(playerid,Slot) { if(IsPlayerConnected(playerid)) { if(Dtc_PlayerHaveCar[playerid][Slot]) { PlayerCar[playerid][Slot][CarId] = CreateVehicle(PlayerCar[playerid][Slot][CarModel],PlayerCar[playerid][Slot][CarPos_x],PlayerCar[playerid][Slot][CarPos_y],PlayerCar[playerid][Slot][CarPos_z],PlayerCar[playerid][Slot][CarRotate],PlayerCar[playerid][Slot][CarC1],PlayerCar[playerid][Slot][CarC2], 60000); ChangeVehicleColor(PlayerCar[playerid][Slot][CarId],PlayerCar[playerid][Slot][CarC1],PlayerCar[playerid][Slot][CarC2]); if(PlayerCar[playerid][Slot][CarPJ] >= 0) {ChangeVehiclePaintjob(PlayerCar[playerid][Slot][CarId],PlayerCar[playerid][Slot][CarPJ]);} if(PlayerCar[playerid][Slot][CarNitro] != 0) {AddVehicleComponent(PlayerCar[playerid][Slot][CarId],PlayerCar[playerid][Slot][CarNitro]);} if(PlayerCar[playerid][Slot][CarHyd] != 0) {AddVehicleComponent(PlayerCar[playerid][Slot][CarId],PlayerCar[playerid][Slot][CarHyd]);} if(PlayerCar[playerid][Slot][CarWheel] != 0) {AddVehicleComponent(PlayerCar[playerid][Slot][CarId],PlayerCar[playerid][Slot][CarWheel]);} if(PlayerCar[playerid][Slot][CarAusp] != 0) {AddVehicleComponent(PlayerCar[playerid][Slot][CarId],PlayerCar[playerid][Slot][CarAusp]);} if(PlayerCar[playerid][Slot][CarSideL] != 0) {AddVehicleComponent(PlayerCar[playerid][Slot][CarId],PlayerCar[playerid][Slot][CarSideL]);} if(PlayerCar[playerid][Slot][CarSideR] != 0) {AddVehicleComponent(PlayerCar[playerid][Slot][CarId],PlayerCar[playerid][Slot][CarSideR]);} if(PlayerCar[playerid][Slot][CarFB] != 0) {AddVehicleComponent(PlayerCar[playerid][Slot][CarId],PlayerCar[playerid][Slot][CarFB]);} if(PlayerCar[playerid][Slot][CarRB] != 0) {AddVehicleComponent(PlayerCar[playerid][Slot][CarId],PlayerCar[playerid][Slot][CarRB]);} if(PlayerCar[playerid][Slot][CarSpoiler] != 0) {AddVehicleComponent(PlayerCar[playerid][Slot][CarId],PlayerCar[playerid][Slot][CarSpoiler]);} if(PlayerCar[playerid][Slot][CarRoof] != 0) {AddVehicleComponent(PlayerCar[playerid][Slot][CarId],PlayerCar[playerid][Slot][CarRoof]);} if(PlayerCar[playerid][Slot][CarHood] != 0) {AddVehicleComponent(PlayerCar[playerid][Slot][CarId],PlayerCar[playerid][Slot][CarHood]);} if(PlayerCar[playerid][Slot][CarVents] != 0) {AddVehicleComponent(PlayerCar[playerid][Slot][CarId],PlayerCar[playerid][Slot][CarVents]);} if(PlayerCar[playerid][Slot][CarLamps] != 0) {AddVehicleComponent(PlayerCar[playerid][Slot][CarId],PlayerCar[playerid][Slot][CarLamps]);} if(PlayerCar[playerid][Slot][CarPlate] != 0) {SetVehicleNumberPlate(PlayerCar[playerid][Slot][CarId],PlayerCar[playerid][Slot][CarNumber]);} SetVehicleToRespawn(Slot); print("PlayerCarSpawn 1"); new strings[15]; format(strings, sizeof(strings), "%s",PlayerCar[playerid][Slot][CarNumber]); SetVehicleNumberPlate(PlayerCar[playerid][Slot][CarId], strings); if(Dtc_LockOnSpawn) { Dtc_Carlock[PlayerCar[playerid][Slot][CarId]] = 1; Dtc_LockCar(PlayerCar[playerid][Slot][CarId]); } if(PlayerCar[playerid][Slot][Neon] == 1) { new Float:x,Float:y,Float:z; Neonrohr[playerid][Neon] = CreateObject(18648,x,y,z,0,0,0,283); Neonrohr[playerid][Neon1] = CreateObject(18648,x,y,z,0,0,0,283); AttachObjectToVehicle(Neonrohr[playerid][Neon], PlayerCar[playerid][Dtc_PlayerKey[playerid]][CarId], 0.8,0,-0.70,0,0,0); AttachObjectToVehicle(Neonrohr[playerid][Neon1], PlayerCar[playerid][Dtc_PlayerKey[playerid]][CarId], -0.8,0,-0.70,0,0,0); } if(PlayerCar[playerid][Slot][Neon] == 2) { new Float:x,Float:y,Float:z; Neonrohr[playerid][Neon] = CreateObject(18647,x,y,z,0,0,0,283); Neonrohr[playerid][Neon1] = CreateObject(18647,x,y,z,0,0,0,283); AttachObjectToVehicle(Neonrohr[playerid][Neon], PlayerCar[playerid][Dtc_PlayerKey[playerid]][CarId], 0.8,0,-0.70,0,0,0); AttachObjectToVehicle(Neonrohr[playerid][Neon1], PlayerCar[playerid][Dtc_PlayerKey[playerid]][CarId], -0.8,0,-0.70,0,0,0); } if(PlayerCar[playerid][Slot][Neon] == 3) { new Float:x,Float:y,Float:z; Neonrohr[playerid][Neon] = CreateObject(18649,x,y,z,0,0,0,283); Neonrohr[playerid][Neon1] = CreateObject(18649,x,y,z,0,0,0,283); AttachObjectToVehicle(Neonrohr[playerid][Neon], PlayerCar[playerid][Dtc_PlayerKey[playerid]][CarId], 0.8,0,-0.70,0,0,0); AttachObjectToVehicle(Neonrohr[playerid][Neon1], PlayerCar[playerid][Dtc_PlayerKey[playerid]][CarId], -0.8,0,-0.70,0,0,0); } if(PlayerCar[playerid][Slot][Neon] == 4) { new Float:x,Float:y,Float:z; Neonrohr[playerid][Neon] = CreateObject(18652,x,y,z,0,0,0,283); Neonrohr[playerid][Neon1] = CreateObject(18652,x,y,z,0,0,0,283); AttachObjectToVehicle(Neonrohr[playerid][Neon], PlayerCar[playerid][Dtc_PlayerKey[playerid]][CarId], 0.8,0,-0.70,0,0,0); AttachObjectToVehicle(Neonrohr[playerid][Neon1], PlayerCar[playerid][Dtc_PlayerKey[playerid]][CarId], -0.8,0,-0.70,0,0,0); } if(PlayerCar[playerid][Slot][Neon] == 5) { new Float:x,Float:y,Float:z; Neonrohr[playerid][Neon] = CreateObject(18651,x,y,z,0,0,0,283); Neonrohr[playerid][Neon1] = CreateObject(18651,x,y,z,0,0,0,283); AttachObjectToVehicle(Neonrohr[playerid][Neon], PlayerCar[playerid][Dtc_PlayerKey[playerid]][CarId], 0.8,0,-0.70,0,0,0); AttachObjectToVehicle(Neonrohr[playerid][Neon1], PlayerCar[playerid][Dtc_PlayerKey[playerid]][CarId], -0.8,0,-0.70,0,0,0); } if(PlayerCar[playerid][Slot][Neon] == 6) { new Float:x,Float:y,Float:z; Neonrohr[playerid][Neon] = CreateObject(18650,x,y,z,0,0,0,283); Neonrohr[playerid][Neon1] = CreateObject(18650,x,y,z,0,0,0,283); AttachObjectToVehicle(Neonrohr[playerid][Neon], PlayerCar[playerid][Dtc_PlayerKey[playerid]][CarId], 0.8,0,-0.70,0,0,0); AttachObjectToVehicle(Neonrohr[playerid][Neon1], PlayerCar[playerid][Dtc_PlayerKey[playerid]][CarId], -0.8,0,-0.70,0,0,0); } print("PlayerCarSpawn 2"); } } }
C
Alles anzeigenformat(string, sizeof(string), "GBN-%d",strval(inputtext)); SetVehicleNumberPlate(PlayerCar[playerid][Dtc_PlayerKey[playerid]][CarId], string); PlayerCar[playerid][Dtc_PlayerKey[playerid]][CarPlate] = 1; PlayerCar[playerid][Dtc_PlayerKey[playerid]][CarNumber] = string; GivePlayerMoney(playerid, -100); format(string2, sizeof(string2), "Ihr neues Kennzeichen lautet: GBN-%d", strval(inputtext)); SendClientMessage(playerid, COLOR_WHITE, string2); new Float:cwx[4],Float:cwxo[4]; cwxo[0] = PlayerCar[playerid][Dtc_PlayerKey[playerid]][CarPos_x]; cwxo[1] = PlayerCar[playerid][Dtc_PlayerKey[playerid]][CarPos_y]; cwxo[2] = PlayerCar[playerid][Dtc_PlayerKey[playerid]][CarPos_z]; cwxo[3] = PlayerCar[playerid][Dtc_PlayerKey[playerid]][CarRotate]; GetVehiclePos(PlayerCar[playerid][Dtc_PlayerKey[playerid]][CarId], cwx[0], cwx[1], cwx[2]); GetVehicleZAngle(PlayerCar[playerid][Dtc_PlayerKey[playerid]][CarId], cwx[3]); PlayerCar[playerid][Dtc_PlayerKey[playerid]][CarPos_x] = cwx[0]; PlayerCar[playerid][Dtc_PlayerKey[playerid]][CarPos_y] = cwx[1]; PlayerCar[playerid][Dtc_PlayerKey[playerid]][CarPos_z] = cwx[2]; PlayerCar[playerid][Dtc_PlayerKey[playerid]][CarRotate] = cwx[3]; SetVehicleToRespawn(PlayerCar[playerid][Dtc_PlayerKey[playerid]][CarId]); DestroyObject(Neonrohr[PlayerCar[playerid][Dtc_PlayerKey[playerid]][CarId]][Neon]); DestroyObject(Neonrohr[PlayerCar[playerid][Dtc_PlayerKey[playerid]][CarId]][Neon1]); DestroyVehicle(PlayerCar[playerid][Dtc_PlayerKey[playerid]][CarId]); PlayerCarSpawn(playerid,Dtc_PlayerKey[playerid]); PlayerCar[playerid][Dtc_PlayerKey[playerid]][CarPos_x] = cwxo[0]; PlayerCar[playerid][Dtc_PlayerKey[playerid]][CarPos_y] = cwxo[1]; PlayerCar[playerid][Dtc_PlayerKey[playerid]][CarPos_z] = cwxo[2]; PlayerCar[playerid][Dtc_PlayerKey[playerid]][CarRotate] = cwxo[3]; format(globquery, 256, "UPDATE `carsystem` SET `Number`='%s',`Plate`='1' WHERE `CarOwner`='%s_%d'", string, GetName(playerid), Dtc_PlayerKey[playerid]); mysql_pquery(handle, globquery);
da sind die beiden befehle was mit den Kennzeichen zutun haben
-
wenn ich ein Fahrzeug kaufe steht im MSQL über all
das Fahrzeug wird nicht mal erstellt
GhostRider_0 NULL NULL NULL NULL NULL NULL NULL NULL NULL 0 0 0 0 0 0 0 0 0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 0 0 hier der neue MSQL_LOG
C
Alles anzeigen[17:18:40] [DEBUG] mysql_format - connection: 1, len: 256, format: "INSERT INTO `carsystem` (`CarOwner`) VALUES ('%s_%d');" [17:18:40] [DEBUG] mysql_pquery - connection: 1, query: "INSERT INTO `carsystem` (`CarOwner`) VALUES ('GhostRider_0');", callback: "(null)", format: "(null)" [17:18:40] [DEBUG] mysql_pquery - connection: 1, query: "UPDATE `carsystem` SET `CarModel`='550',`CarPos_X`='1707.003784'", callback: "(null)", format: "(null)" [17:18:40] [DEBUG] mysql_pquery - connection: 1, query: "UPDATE `carsystem` SET `CarSideL`='0',`CarSideR`='0',`CarFB`='0'", callback: "(null)", format: "(null)" [17:18:40] [DEBUG] mysql_pquery - connection: 1, query: "UPDATE `carsystem` SET `CarPJ`='0',`CarC1`='0',`CarC2`='0',`Prei", callback: "(null)", format: "(null)" [17:18:40] [DEBUG] mysql_format - connection: 1, len: 256, format: "SELECT * FROM carsystem WHERE `CarOwner` = '%s_%d'" [17:18:40] [DEBUG] mysql_pquery - connection: 1, query: "SELECT * FROM carsystem WHERE `CarOwner` = 'GhostRider_0'", callback: "LoadMysqlCars", format: "sii" [17:18:40] [DEBUG] mysql_format - connection: 1, len: 256, format: "SELECT * FROM carsystem WHERE `CarOwner` = '%s_%d'" [17:18:40] [DEBUG] mysql_pquery - connection: 1, query: "SELECT * FROM carsystem WHERE `CarOwner` = 'GhostRider_1'", callback: "LoadMysqlCars", format: "sii" [17:18:40] [DEBUG] mysql_format - connection: 1, len: 256, format: "SELECT * FROM carsystem WHERE `CarOwner` = '%s_%d'" [17:18:40] [DEBUG] mysql_pquery - connection: 1, query: "SELECT * FROM carsystem WHERE `CarOwner` = 'GhostRider_2'", callback: "LoadMysqlCars", format: "sii" [17:18:40] [DEBUG] CMySQLQuery::Execute[] - starting query execution [17:18:40] [DEBUG] CMySQLQuery::Execute[] - query was successfully executed within 0.899 milliseconds [17:18:40] [DEBUG] CMySQLQuery::Execute[] - no callback specified, skipping result saving [17:18:40] [DEBUG] CMySQLQuery::Execute[] - starting query execution [17:18:40] [DEBUG] CMySQLQuery::Execute[] - starting query execution [17:18:40] [DEBUG] CMySQLQuery::Execute[] - query was successfully executed within 1.62 milliseconds [17:18:40] [DEBUG] CMySQLQuery::Execute[] - no callback specified, skipping result saving [17:18:40] [DEBUG] CMySQLQuery::Execute[LoadMysqlCars] - starting query execution [17:18:40] [DEBUG] CMySQLQuery::Execute[LoadMysqlCars] - query was successfully executed within 10.495 milliseconds [17:18:40] [DEBUG] CMySQLResult::CMySQLResult() - constructor called [17:18:40] [DEBUG] Calling callback "LoadMysqlCars".. [17:18:40] [DEBUG] cache_get_data - connection: 1 [17:18:40] [DEBUG] CMySQLQuery::Execute[] - query was successfully executed within 14.212 milliseconds [17:18:40] [DEBUG] CMySQLQuery::Execute[] - no callback specified, skipping result saving [17:18:40] [DEBUG] CMySQLQuery::Execute[] - starting query execution [17:18:40] [DEBUG] CMySQLResult::~CMySQLResult() - deconstructor called [17:18:40] [DEBUG] CMySQLQuery::Execute[] - query was successfully executed within 19.158 milliseconds [17:18:40] [DEBUG] CMySQLQuery::Execute[] - no callback specified, skipping result saving [17:18:40] [DEBUG] CMySQLQuery::Execute[LoadMysqlCars] - starting query execution [17:18:40] [DEBUG] CMySQLQuery::Execute[LoadMysqlCars] - query was successfully executed within 2.201 milliseconds [17:18:40] [DEBUG] CMySQLResult::CMySQLResult() - constructor called [17:18:40] [DEBUG] CMySQLQuery::Execute[LoadMysqlCars] - starting query execution [17:18:40] [DEBUG] CMySQLQuery::Execute[LoadMysqlCars] - query was successfully executed within 0.887 milliseconds [17:18:40] [DEBUG] CMySQLResult::CMySQLResult() - constructor called [17:18:40] [DEBUG] Calling callback "LoadMysqlCars".. [17:18:40] [DEBUG] cache_get_data - connection: 1 [17:18:40] [DEBUG] cache_get_field_content - row: 0, field_name: "CarModel", connection: 1, max_len: 128 [17:18:40] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "CarModel", data: "NULL" [17:18:40] [DEBUG] cache_get_field_content - row: 0, field_name: "CarPos_X", connection: 1, max_len: 128 [17:18:40] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "CarPos_X", data: "NULL" [17:18:40] [DEBUG] cache_get_field_content - row: 0, field_name: "CarPos_Y", connection: 1, max_len: 128 [17:18:40] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "CarPos_Y", data: "NULL" [17:18:40] [DEBUG] cache_get_field_content - row: 0, field_name: "CarPos_Z", connection: 1, max_len: 128 [17:18:40] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "CarPos_Z", data: "NULL" [17:18:40] [DEBUG] cache_get_field_content - row: 0, field_name: "CarPos_A", connection: 1, max_len: 128 [17:18:40] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "CarPos_A", data: "NULL" [17:18:40] [DEBUG] cache_get_field_content - row: 0, field_name: "CarNitro", connection: 1, max_len: 128 [17:18:40] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "CarNitro", data: "NULL" [17:18:40] [DEBUG] cache_get_field_content - row: 0, field_name: "CarHyd", connection: 1, max_len: 128 [17:18:40] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "CarHyd", data: "NULL" [17:18:40] [DEBUG] cache_get_field_content - row: 0, field_name: "CarWheel", connection: 1, max_len: 128 [17:18:40] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "CarWheel", data: "NULL" [17:18:40] [DEBUG] cache_get_field_content - row: 0, field_name: "CarAusp", connection: 1, max_len: 128 [17:18:40] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "CarAusp", data: "NULL" [17:18:40] [DEBUG] cache_get_field_content - row: 0, field_name: "CarSideL", connection: 1, max_len: 128 [17:18:40] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "CarSideL", data: "0" [17:18:40] [DEBUG] cache_get_field_content - row: 0, field_name: "CarSideR", connection: 1, max_len: 128 [17:18:40] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "CarSideR", data: "0" [17:18:40] [DEBUG] cache_get_field_content - row: 0, field_name: "CarFB", connection: 1, max_len: 128 [17:18:40] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "CarFB", data: "0" [17:18:40] [DEBUG] cache_get_field_content - row: 0, field_name: "CarRB", connection: 1, max_len: 128 [17:18:40] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "CarRB", data: "0" [17:18:40] [DEBUG] cache_get_field_content - row: 0, field_name: "CarSpoiler", connection: 1, max_len: 128 [17:18:40] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "CarSpoiler", data: "0" [17:18:40] [DEBUG] cache_get_field_content - row: 0, field_name: "CarRoof", connection: 1, max_len: 128 [17:18:40] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "CarRoof", data: "0" [17:18:40] [DEBUG] cache_get_field_content - row: 0, field_name: "CarHood", connection: 1, max_len: 128 [17:18:40] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "CarHood", data: "0" [17:18:40] [DEBUG] cache_get_field_content - row: 0, field_name: "CarVents", connection: 1, max_len: 128 [17:18:40] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "CarVents", data: "0" [17:18:40] [DEBUG] cache_get_field_content - row: 0, field_name: "CarLamps", connection: 1, max_len: 128 [17:18:40] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "CarLamps", data: "0" [17:18:40] [DEBUG] cache_get_field_content - row: 0, field_name: "CarPJ", connection: 1, max_len: 128 [17:18:40] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "CarPJ", data: "NULL" [17:18:40] [DEBUG] cache_get_field_content - row: 0, field_name: "CarC1", connection: 1, max_len: 128 [17:18:40] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "CarC1", data: "NULL" [17:18:40] [DEBUG] cache_get_field_content - row: 0, field_name: "CarC2", connection: 1, max_len: 128 [17:18:40] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "CarC2", data: "NULL" [17:18:40] [DEBUG] cache_get_field_content - row: 0, field_name: "Preis", connection: 1, max_len: 128 [17:18:40] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "Preis", data: "NULL" [17:18:40] [DEBUG] cache_get_field_content - row: 0, field_name: "Neon", connection: 1, max_len: 128 [17:18:40] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "Neon", data: "NULL" [17:18:40] [DEBUG] cache_get_field_content - row: 0, field_name: "Plate", connection: 1, max_len: 128 [17:18:40] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "Plate", data: "NULL" [17:18:40] [DEBUG] cache_get_field_content - row: 0, field_name: "Number", connection: 1, max_len: 128 [17:18:40] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "Number", data: "NULL" [17:18:40] [DEBUG] cache_get_field_content - row: 0, field_name: "Gesperrt", connection: 1, max_len: 128 [17:18:40] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "Gesperrt", data: "NULL" [17:18:40] [DEBUG] cache_get_field_content - row: 0, field_name: "Sperrpreis", connection: 1, max_len: 128 [17:18:40] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "Sperrpreis", data: "NULL" [17:18:40] [DEBUG] cache_get_field_content - row: 0, field_name: "Kralle", connection: 1, max_len: 128 [17:18:40] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "Kralle", data: "NULL" [17:18:40] [DEBUG] CMySQLResult::~CMySQLResult() - deconstructor called [17:18:40] [DEBUG] Calling callback "LoadMysqlCars".. [17:18:40] [DEBUG] cache_get_data - connection: 1 [17:18:40] [DEBUG] CMySQLResult::~CMySQLResult() - deconstructor called
-
C: Hier Das MSQL_LOG
Alles anzeigen[16:34:03] [DEBUG] mysql_format - connection: 1, len: 256, format: "INSERT INTO `carsystem` (`CarOwner`) VALUES ('%s_%d');" [16:34:03] [DEBUG] mysql_pquery - connection: 1, query: "INSERT INTO `carsystem` (`CarOwner`) VALUES ('GhostRider_0');", callback: "(null)", format: "(null)" [16:34:03] [DEBUG] mysql_pquery - connection: 1, query: "UPDATE `carsystem` SET `CarModel`='561',`CarPos_X`='1707.003784'", callback: "(null)", format: "(null)" [16:34:03] [DEBUG] mysql_pquery - connection: 1, query: "UPDATE `carsystem` SET `CarSideL`='0',`CarSideR`='0',`CarFB`='0'", callback: "(null)", format: "(null)" [16:34:03] [DEBUG] mysql_pquery - connection: 1, query: "UPDATE `carsystem` SET `CarPJ`='0',`CarC1`='0',`CarC2`='0',`Prei", callback: "(null)", format: "(null)" [16:34:03] [DEBUG] mysql_format - connection: 1, len: 256, format: "SELECT * FROM carsystem WHERE `CarOwner` = '%s_%d'" [16:34:03] [DEBUG] mysql_pquery - connection: 1, query: "SELECT * FROM carsystem WHERE `CarOwner` = 'GhostRider_0'", callback: "LoadMysqlCars", format: "sii" [16:34:03] [ERROR] mysql_pquery - callback parameter count does not match format specifier length [16:34:03] [DEBUG] mysql_format - connection: 1, len: 256, format: "SELECT * FROM carsystem WHERE `CarOwner` = '%s_%d'" [16:34:03] [DEBUG] mysql_pquery - connection: 1, query: "SELECT * FROM carsystem WHERE `CarOwner` = 'GhostRider_1'", callback: "LoadMysqlCars", format: "sii" [16:34:03] [ERROR] mysql_pquery - callback parameter count does not match format specifier length [16:34:03] [DEBUG] mysql_format - connection: 1, len: 256, format: "SELECT * FROM carsystem WHERE `CarOwner` = '%s_%d'" [16:34:03] [DEBUG] mysql_pquery - connection: 1, query: "SELECT * FROM carsystem WHERE `CarOwner` = 'GhostRider_2'", callback: "LoadMysqlCars", format: "sii" [16:34:03] [ERROR] mysql_pquery - callback parameter count does not match format specifier length [16:34:03] [DEBUG] CMySQLQuery::Execute[] - starting query execution [16:34:03] [DEBUG] CMySQLQuery::Execute[] - starting query execution [16:34:03] [DEBUG] CMySQLQuery::Execute[] - query was successfully executed within 12.934 milliseconds [16:34:03] [DEBUG] CMySQLQuery::Execute[] - no callback specified, skipping result saving [16:34:03] [DEBUG] CMySQLQuery::Execute[] - starting query execution [16:34:03] [DEBUG] CMySQLQuery::Execute[] - query was successfully executed within 31.530 milliseconds [16:34:03] [DEBUG] CMySQLQuery::Execute[] - no callback specified, skipping result saving [16:34:03] [DEBUG] CMySQLQuery::Execute[] - starting query execution [16:34:03] [DEBUG] CMySQLQuery::Execute[] - query was successfully executed within 31.5 milliseconds [16:34:03] [DEBUG] CMySQLQuery::Execute[] - no callback specified, skipping result saving [16:34:03] [DEBUG] CMySQLQuery::Execute[] - query was successfully executed within 25.440 milliseconds [16:34:03] [DEBUG] CMySQLQuery::Execute[] - no callback specified, skipping result saving
-
C: OnPlayerBuyCar
Alles anzeigenpublic OnPlayerBuyCar(playerid,Model,Preis,Autohaus)//CARSYS { if(IsPlayerConnected(playerid) && !Dtc_PlayerHaveCar[playerid][Dtc_PlayerKey[playerid]]) { CallRemoteFunction("M_GivePlayerMoney","id",playerid,-Preis); Gas[Model] = GetGasMax(GetVehicleModel(Model)); SetParkPlatz(playerid,Autohaus); new name[MAX_PLAYER_NAME], str[256], x = Dtc_PlayerKey[playerid]; GetPlayerName(playerid, name, sizeof name); mysql_format(handle, str, sizeof(str), "INSERT INTO `carsystem` (`CarOwner`) VALUES ('%s_%d');", name, x); mysql_pquery(handle, str); format(str, sizeof(str), "UPDATE `carsystem` SET `CarModel`='%d',`CarPos_X`='%f',`CarPos_Y`='%f',`CarPos_Z`='%f',`CarPos_A`='%f',`CarNitro`='0',`CarHyd`='0',`CarWheel`='0',`CarAusp`='0' WHERE `CarOwner`='%s_%d'", Model, PlayerCar[playerid][x][CarPos_x], PlayerCar[playerid][x][CarPos_y], PlayerCar[playerid][x][CarPos_z], PlayerCar[playerid][x][CarRotate], name, x); mysql_pquery(handle, str); format(str, sizeof(str), "UPDATE `carsystem` SET `CarSideL`='0',`CarSideR`='0',`CarFB`='0',`CarFB`='0',`CarRB`='0',`CarSpoiler`='0',`CarRoof`='0',`CarHood`='0',`CarVents`='0',`CarLamps`='0' WHERE `CarOwner`='%s_%d'", name, x); mysql_pquery(handle, str); format(str, sizeof(str), "UPDATE `carsystem` SET `CarPJ`='0',`CarC1`='0',`CarC2`='0',`Preis`='%d',`Neon`='0',`Plate`='0',`Number`='LoH-0',`Gesperrt`='0',`Sperrpreis`='0',`Kralle`='0' WHERE `CarOwner`='%s_%d'", Preis, name, x); mysql_pquery(handle, str); OnPlayerCarLogin(playerid); } }
C: OnPlayerCarLogin
Alles anzeigenpublic OnPlayerCarLogin(playerid) { for(new x = 0; x < MaxVeh; x++) { if(!Dtc_PlayerHaveCar[playerid][x]) { new string2[256],string3[256]; new playername2[MAX_PLAYER_NAME]; GetPlayerName(playerid, playername2, sizeof(playername2)); format(string3, sizeof(string3), "/Privatcars/%s%d.dtcar", playername2,x); new File: UserFile = fopen(string3, io_read); if (UserFile) { Dtc_PlayerHaveCar[playerid][x] = 1; new key[ 256 ] , val[ 256 ]; new Data[ 256 ]; while ( fread( UserFile , Data , sizeof( Data ) ) ) { key = ini_GetKey( Data ); if( strcmp( key , "CarId" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][CarId] = strval( val ); } if( strcmp( key , "CarModel" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][CarModel] = strval( val ); } if( strcmp( key , "CarPos_x" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][CarPos_x] = floatstr( val ); } if( strcmp( key , "CarPos_y" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][CarPos_y] = floatstr( val ); } if( strcmp( key , "CarPos_z" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][CarPos_z] = floatstr( val ); } if( strcmp( key , "CarRotate" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][CarRotate] = floatstr( val ); } if( strcmp( key , "CarNitro" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][CarNitro] = strval( val ); } if( strcmp( key , "CarHyd" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][CarHyd] = strval( val ); } if( strcmp( key , "CarWheel" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][CarWheel] = strval( val ); } if( strcmp( key , "CarAusp" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][CarAusp] = strval( val ); } if( strcmp( key , "CarSideL" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][CarSideL] = strval( val ); } if( strcmp( key , "CarSideR" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][CarSideR] = strval( val ); } if( strcmp( key , "CarFB" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][CarFB] = strval( val ); } if( strcmp( key , "CarRB" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][CarRB] = strval( val ); } if( strcmp( key , "CarSpoiler" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][CarSpoiler] = strval( val ); } if( strcmp( key , "CarRoof" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][CarRoof] = strval( val ); } if( strcmp( key , "CarHood" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][CarHood] = strval( val ); } if( strcmp( key , "CarVents" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][CarVents] = strval( val ); } if( strcmp( key , "CarLamps" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][CarLamps] = strval( val ); } if( strcmp( key , "CarPJ" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][CarPJ] = strval( val ); } if( strcmp( key , "CarC1" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][CarC1] = strval( val ); } if( strcmp( key , "CarC2" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][CarC2] = strval( val ); } if( strcmp( key , "Preis" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][CarPreis] = strval( val ); } if( strcmp( key , "Neon" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][Neon] = strval( val ); } if( strcmp( key , "Plate" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][CarPlate] = strval( val ); } if( strcmp( key , "Number" , true ) == 0 ) { val = ini_GetValue( Data ); format(PlayerCar[playerid][x][CarNumber], 32, "%s", val); } if( strcmp( key , "Gesperrt" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][CarGesperrt] = strval( val ); } if( strcmp( key , "Sperrpreis" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][CarSperrpreis] = strval( val ); } if( strcmp( key , "Abgeschleppt", true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][Abgeschleppt] = strval( val ); } } fclose(UserFile); mysql_format(handle, string2, sizeof(string2), "INSERT INTO `carsystem` (`CarOwner`) VALUES ('%s_%d')",playername2,x); mysql_pquery(handle, string2); format(string2, sizeof(string2), "UPDATE `carsystem` SET `CarModel`='%d',`CarPos_X`='%f',`CarPos_Y`='%f',`CarPos_Z`='%f',`CarPos_A`='%f',`CarNitro`='%d',`CarHyd`='%d',`CarWheel`='%d',`CarAusp`='%d' WHERE `CarOwner`='%s_%d'", PlayerCar[playerid][x][CarModel], PlayerCar[playerid][x][CarPos_x], PlayerCar[playerid][x][CarPos_y], PlayerCar[playerid][x][CarPos_z], PlayerCar[playerid][x][CarRotate], PlayerCar[playerid][x][CarNitro],PlayerCar[playerid][x][CarHyd], PlayerCar[playerid][x][CarWheel], PlayerCar[playerid][x][CarAusp], playername2, x); mysql_pquery(handle, string2); format(string2, sizeof(string2), "UPDATE `carsystem` SET `CarSideL`='%d',`CarSideR`='%d',`CarFB`='%d',`CarFB`='%d',`CarRB`='%d',`CarSpoiler`='%d',`CarRoof`='%d',`CarHood`='%d',`CarVents`='%d',`CarLamps`='%d' WHERE `CarOwner`='%s_%d'", PlayerCar[playerid][x][CarSideL], PlayerCar[playerid][x][CarSideR], PlayerCar[playerid][x][CarFB], PlayerCar[playerid][x][CarRB], PlayerCar[playerid][x][CarSpoiler], PlayerCar[playerid][x][CarRoof], PlayerCar[playerid][x][CarHood], PlayerCar[playerid][x][CarVents], PlayerCar[playerid][x][CarLamps], playername2, x); mysql_pquery(handle, string2); format(string2, sizeof(string2), "UPDATE `carsystem` SET `CarPJ`='%d',`CarC1`='%d',`CarC2`='%d',`Preis`='%d',`Neon`='%d',`Plate`='%d',`Number`='%s',`Gesperrt`='%d',`Sperrpreis`='%d',`Kralle`='%d' WHERE `CarOwner`='%s_%d'", PlayerCar[playerid][x][CarPJ], PlayerCar[playerid][x][CarC1], PlayerCar[playerid][x][CarC2], PlayerCar[playerid][x][CarPreis], PlayerCar[playerid][x][Neon], PlayerCar[playerid][x][CarPlate], PlayerCar[playerid][x][CarNumber], PlayerCar[playerid][x][CarGesperrt], PlayerCar[playerid][x][CarSperrpreis], PlayerCar[playerid][x][Kralle], playername2, x); mysql_pquery(handle, string2); fremove(string3); PlayerCarSpawn(playerid,x); } else { mysql_format(handle, string2, sizeof(string2), "SELECT * FROM carsystem WHERE `CarOwner` = '%s_%d'", playername2, x); mysql_pquery(handle, string2, "LoadMysqlCars", "sii", playername2,x,playerid, 0); } } } }
C: LoadMysqlCars
Alles anzeigenforward LoadMysqlCars(playername,x,playerid); public LoadMysqlCars(playername,x,playerid) { new rows,fields,v[128]; cache_get_data(rows,fields); if(rows) { Dtc_PlayerHaveCar[playerid][x] = 1; cache_get_field_content(0,"CarModel",v); PlayerCar[playerid][x][CarModel] = strval(v); cache_get_field_content(0,"CarPos_X",v); PlayerCar[playerid][x][CarPos_x] = floatstr(v); cache_get_field_content(0,"CarPos_Y",v); PlayerCar[playerid][x][CarPos_y] = floatstr(v); cache_get_field_content(0,"CarPos_Z",v); PlayerCar[playerid][x][CarPos_z] = floatstr(v); cache_get_field_content(0,"CarPos_A",v); PlayerCar[playerid][x][CarRotate] = floatstr(v); cache_get_field_content(0,"CarNitro",v); PlayerCar[playerid][x][CarNitro] = strval(v); cache_get_field_content(0,"CarHyd",v); PlayerCar[playerid][x][CarHyd] = strval(v); cache_get_field_content(0,"CarWheel",v); PlayerCar[playerid][x][CarWheel] = strval(v); cache_get_field_content(0,"CarAusp",v); PlayerCar[playerid][x][CarAusp] = strval(v); cache_get_field_content(0,"CarSideL",v); PlayerCar[playerid][x][CarSideL] = strval(v); cache_get_field_content(0,"CarSideR",v); PlayerCar[playerid][x][CarSideR] = strval(v); cache_get_field_content(0,"CarFB",v); PlayerCar[playerid][x][CarFB] = strval(v); cache_get_field_content(0,"CarRB",v); PlayerCar[playerid][x][CarRB] = strval(v); cache_get_field_content(0,"CarSpoiler",v); PlayerCar[playerid][x][CarSpoiler] = strval(v); cache_get_field_content(0,"CarRoof",v); PlayerCar[playerid][x][CarRoof] = strval(v); cache_get_field_content(0,"CarHood",v); PlayerCar[playerid][x][CarHood] = strval(v); cache_get_field_content(0,"CarVents",v); PlayerCar[playerid][x][CarVents] = strval(v); cache_get_field_content(0,"CarLamps",v); PlayerCar[playerid][x][CarLamps] = strval(v); cache_get_field_content(0,"CarPJ",v); PlayerCar[playerid][x][CarPJ] = strval(v); cache_get_field_content(0,"CarC1",v); PlayerCar[playerid][x][CarC1] = strval(v); cache_get_field_content(0,"CarC2",v); PlayerCar[playerid][x][CarC2] = strval(v); cache_get_field_content(0,"Preis",v); PlayerCar[playerid][x][CarPreis] = strval(v); cache_get_field_content(0,"Neon",v); PlayerCar[playerid][x][Neon] = strval(v); cache_get_field_content(0,"Plate",v); PlayerCar[playerid][x][CarPlate] = strval(v); cache_get_field_content(0,"Number",v); format(PlayerCar[playerid][x][CarNumber], 32, "%s", v); cache_get_field_content(0,"Gesperrt",v); PlayerCar[playerid][x][CarGesperrt] = strval(v); cache_get_field_content(0,"Sperrpreis",v); PlayerCar[playerid][x][CarSperrpreis] = strval(v); cache_get_field_content(0,"Kralle",v); PlayerCar[playerid][x][Kralle] = strval(v); PlayerCarSpawn(playerid,x); } }
C: PlayerCarSpawn
Alles anzeigenpublic PlayerCarSpawn(playerid,Slot) { if(IsPlayerConnected(playerid)) { if(Dtc_PlayerHaveCar[playerid][Slot]) { PlayerCar[playerid][Slot][CarId] = CreateVehicle(PlayerCar[playerid][Slot][CarModel],PlayerCar[playerid][Slot][CarPos_x],PlayerCar[playerid][Slot][CarPos_y],PlayerCar[playerid][Slot][CarPos_z],PlayerCar[playerid][Slot][CarRotate],PlayerCar[playerid][Slot][CarC1],PlayerCar[playerid][Slot][CarC2], 60000); ChangeVehicleColor(PlayerCar[playerid][Slot][CarId],PlayerCar[playerid][Slot][CarC1],PlayerCar[playerid][Slot][CarC2]); if(PlayerCar[playerid][Slot][CarPJ] >= 0) {ChangeVehiclePaintjob(PlayerCar[playerid][Slot][CarId],PlayerCar[playerid][Slot][CarPJ]);} if(PlayerCar[playerid][Slot][CarNitro] != 0) {AddVehicleComponent(PlayerCar[playerid][Slot][CarId],PlayerCar[playerid][Slot][CarNitro]);} if(PlayerCar[playerid][Slot][CarHyd] != 0) {AddVehicleComponent(PlayerCar[playerid][Slot][CarId],PlayerCar[playerid][Slot][CarHyd]);} if(PlayerCar[playerid][Slot][CarWheel] != 0) {AddVehicleComponent(PlayerCar[playerid][Slot][CarId],PlayerCar[playerid][Slot][CarWheel]);} if(PlayerCar[playerid][Slot][CarAusp] != 0) {AddVehicleComponent(PlayerCar[playerid][Slot][CarId],PlayerCar[playerid][Slot][CarAusp]);} if(PlayerCar[playerid][Slot][CarSideL] != 0) {AddVehicleComponent(PlayerCar[playerid][Slot][CarId],PlayerCar[playerid][Slot][CarSideL]);} if(PlayerCar[playerid][Slot][CarSideR] != 0) {AddVehicleComponent(PlayerCar[playerid][Slot][CarId],PlayerCar[playerid][Slot][CarSideR]);} if(PlayerCar[playerid][Slot][CarFB] != 0) {AddVehicleComponent(PlayerCar[playerid][Slot][CarId],PlayerCar[playerid][Slot][CarFB]);} if(PlayerCar[playerid][Slot][CarRB] != 0) {AddVehicleComponent(PlayerCar[playerid][Slot][CarId],PlayerCar[playerid][Slot][CarRB]);} if(PlayerCar[playerid][Slot][CarSpoiler] != 0) {AddVehicleComponent(PlayerCar[playerid][Slot][CarId],PlayerCar[playerid][Slot][CarSpoiler]);} if(PlayerCar[playerid][Slot][CarRoof] != 0) {AddVehicleComponent(PlayerCar[playerid][Slot][CarId],PlayerCar[playerid][Slot][CarRoof]);} if(PlayerCar[playerid][Slot][CarHood] != 0) {AddVehicleComponent(PlayerCar[playerid][Slot][CarId],PlayerCar[playerid][Slot][CarHood]);} if(PlayerCar[playerid][Slot][CarVents] != 0) {AddVehicleComponent(PlayerCar[playerid][Slot][CarId],PlayerCar[playerid][Slot][CarVents]);} if(PlayerCar[playerid][Slot][CarLamps] != 0) {AddVehicleComponent(PlayerCar[playerid][Slot][CarId],PlayerCar[playerid][Slot][CarLamps]);} if(PlayerCar[playerid][Slot][CarPlate] != 0) {SetVehicleNumberPlate(PlayerCar[playerid][Slot][CarId],PlayerCar[playerid][Slot][CarNumber]);} SetVehicleToRespawn(Slot); if(Dtc_LockOnSpawn == 1) { Dtc_Carlock[PlayerCar[playerid][Slot][CarId]] = 1; Dtc_LockCar(PlayerCar[playerid][Slot][CarId]); } if(PlayerCar[playerid][Slot][Neon] == 1) { new Float:x,Float:y,Float:z; Neonrohr[playerid][Neon] = CreateObject(18648,x,y,z,0,0,0,283); Neonrohr[playerid][Neon1] = CreateObject(18648,x,y,z,0,0,0,283); AttachObjectToVehicle(Neonrohr[playerid][Neon], PlayerCar[playerid][Dtc_PlayerKey[playerid]][CarId], 0.8,0,-0.70,0,0,0); AttachObjectToVehicle(Neonrohr[playerid][Neon1], PlayerCar[playerid][Dtc_PlayerKey[playerid]][CarId], -0.8,0,-0.70,0,0,0); } if(PlayerCar[playerid][Slot][Neon] == 2) { new Float:x,Float:y,Float:z; Neonrohr[playerid][Neon] = CreateObject(18647,x,y,z,0,0,0,283); Neonrohr[playerid][Neon1] = CreateObject(18647,x,y,z,0,0,0,283); AttachObjectToVehicle(Neonrohr[playerid][Neon], PlayerCar[playerid][Dtc_PlayerKey[playerid]][CarId], 0.8,0,-0.70,0,0,0); AttachObjectToVehicle(Neonrohr[playerid][Neon1], PlayerCar[playerid][Dtc_PlayerKey[playerid]][CarId], -0.8,0,-0.70,0,0,0); } if(PlayerCar[playerid][Slot][Neon] == 3) { new Float:x,Float:y,Float:z; Neonrohr[playerid][Neon] = CreateObject(18649,x,y,z,0,0,0,283); Neonrohr[playerid][Neon1] = CreateObject(18649,x,y,z,0,0,0,283); AttachObjectToVehicle(Neonrohr[playerid][Neon], PlayerCar[playerid][Dtc_PlayerKey[playerid]][CarId], 0.8,0,-0.70,0,0,0); AttachObjectToVehicle(Neonrohr[playerid][Neon1], PlayerCar[playerid][Dtc_PlayerKey[playerid]][CarId], -0.8,0,-0.70,0,0,0); } if(PlayerCar[playerid][Slot][Neon] == 4) { new Float:x,Float:y,Float:z; Neonrohr[playerid][Neon] = CreateObject(18652,x,y,z,0,0,0,283); Neonrohr[playerid][Neon1] = CreateObject(18652,x,y,z,0,0,0,283); AttachObjectToVehicle(Neonrohr[playerid][Neon], PlayerCar[playerid][Dtc_PlayerKey[playerid]][CarId], 0.8,0,-0.70,0,0,0); AttachObjectToVehicle(Neonrohr[playerid][Neon1], PlayerCar[playerid][Dtc_PlayerKey[playerid]][CarId], -0.8,0,-0.70,0,0,0); } if(PlayerCar[playerid][Slot][Neon] == 5) { new Float:x,Float:y,Float:z; Neonrohr[playerid][Neon] = CreateObject(18651,x,y,z,0,0,0,283); Neonrohr[playerid][Neon1] = CreateObject(18651,x,y,z,0,0,0,283); AttachObjectToVehicle(Neonrohr[playerid][Neon], PlayerCar[playerid][Dtc_PlayerKey[playerid]][CarId], 0.8,0,-0.70,0,0,0); AttachObjectToVehicle(Neonrohr[playerid][Neon1], PlayerCar[playerid][Dtc_PlayerKey[playerid]][CarId], -0.8,0,-0.70,0,0,0); } if(PlayerCar[playerid][Slot][Neon] == 6) { new Float:x,Float:y,Float:z; Neonrohr[playerid][Neon] = CreateObject(18650,x,y,z,0,0,0,283); Neonrohr[playerid][Neon1] = CreateObject(18650,x,y,z,0,0,0,283); AttachObjectToVehicle(Neonrohr[playerid][Neon], PlayerCar[playerid][Dtc_PlayerKey[playerid]][CarId], 0.8,0,-0.70,0,0,0); AttachObjectToVehicle(Neonrohr[playerid][Neon1], PlayerCar[playerid][Dtc_PlayerKey[playerid]][CarId], -0.8,0,-0.70,0,0,0); } } } }
-
hallo breadfish
ich habe folgendes Problem
und zwar habe ich ein neues Autohaus
und es liegt dabei wenn mann ein Auto kauft wird es nicht mal gespeichert somit auch nicht erstellt
hoffe ihr findet den fehler
ich habe das MSQL R39-3
public OnPlayerBuyCar(playerid,Model,Preis,Autohaus)//CARSYS{if(IsPlayerConnected(playerid) && !Dtc_PlayerHaveCar[playerid][Dtc_PlayerKey[playerid]]){CallRemoteFunction("M_GivePlayerMoney","id",playerid,-Preis);Gas[Model] = GetGasMax(GetVehicleModel(Model));/*if(Autohaus == 0){new bizzid=18;if(strcmp(GetName(playerid), SBizzInfo[Spielerinfo[playerid][pPbiskey]-100][sbOwner], true) != 0){SBizzInfo[bizzid][sbTill] += Preis;}}else if(Autohaus == 1){new bizzid=20;if(strcmp(GetName(playerid), SBizzInfo[Spielerinfo[playerid][pPbiskey]-100][sbOwner], true) != 0){SBizzInfo[bizzid][sbTill] += Preis;}}else if(Autohaus == 2){new bizzid=19;if(strcmp(GetName(playerid), SBizzInfo[Spielerinfo[playerid][pPbiskey]-100][sbOwner], true) != 0){SBizzInfo[bizzid][sbTill] += Preis;}}else if(Autohaus == 3){new bizzid=1;if(strcmp(GetName(playerid), SBizzInfo[Spielerinfo[playerid][pPbiskey]-100][sbOwner], true) != 0){SBizzInfo[bizzid][sbTill] += Preis;}}else if(Autohaus == 4){new bizzid=0;if(strcmp(GetName(playerid), SBizzInfo[Spielerinfo[playerid][pPbiskey]-100][sbOwner], true) != 0){SBizzInfo[bizzid][sbTill] += Preis;}}*/SetParkPlatz(playerid,Autohaus);new name[MAX_PLAYER_NAME], str[256], x = Dtc_PlayerKey[playerid];GetPlayerName(playerid, name, sizeof name);format(str, 256, "INSERT INTO `carsystem` (`CarOwner`) VALUES ('%s_%d')",name,x);mysql_pquery(handle, str);format(str, 256, "UPDATE `carsystem` SET `CarModel`='%d',`CarPos_X`='%f',`CarPos_Y`='%f',`CarPos_Z`='%f',`CarPos_A`='%f',`CarNitro`='0',`CarHyd`='0',`CarWheel`='0',`CarAusp`='0' WHERE `CarOwner`='%s_%d'",Model, PlayerCar[playerid][x][CarPos_x], PlayerCar[playerid][x][CarPos_y], PlayerCar[playerid][x][CarPos_z], PlayerCar[playerid][x][CarRotate], name, x);mysql_pquery(handle, str);format(str, 256, "UPDATE `carsystem` SET `CarSideL`='0',`CarSideR`='0',`CarFB`='0',`CarFB`='0',`CarRB`='0',`CarSpoiler`='0',`CarRoof`='0',`CarHood`='0',`CarVents`='0',`CarLamps`='0' WHERE `CarOwner`='%s_%d'",name, x);mysql_pquery(handle, str);format(str, 256, "UPDATE `carsystem` SET `CarPJ`='0',`CarC1`='0',`CarC2`='0',`Preis`='%d',`Neon`='0',`Plate`='0',`Number`='LoH-0',`Gesperrt`='0',`Sperrpreis`='0',`Kralle`='0' WHERE `CarOwner`='%s_%d'",Preis, name, x);mysql_pquery(handle, str);OnPlayerCarLogin(playerid);}}
public OnPlayerCarLogin(playerid){for(new x = 0; x < MaxVeh; x++){if(!Dtc_PlayerHaveCar[playerid][x]){new string2[256],string3[256];new playername2[MAX_PLAYER_NAME];GetPlayerName(playerid, playername2, sizeof(playername2));format(string3, sizeof(string3), "/Privatcars/%s%d.dtcar", playername2,x);new File: UserFile = fopen(string3, io_read);if (UserFile){Dtc_PlayerHaveCar[playerid][x] = 1;new key[ 256 ] , val[ 256 ];new Data[ 256 ];while ( fread( UserFile , Data , sizeof( Data ) ) ){key = ini_GetKey( Data );if( strcmp( key , "CarId" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][CarId] = strval( val ); }if( strcmp( key , "CarModel" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][CarModel] = strval( val ); }if( strcmp( key , "CarPos_x" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][CarPos_x] = floatstr( val ); }if( strcmp( key , "CarPos_y" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][CarPos_y] = floatstr( val ); }if( strcmp( key , "CarPos_z" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][CarPos_z] = floatstr( val ); }if( strcmp( key , "CarRotate" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][CarRotate] = floatstr( val ); }if( strcmp( key , "CarNitro" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][CarNitro] = strval( val ); }if( strcmp( key , "CarHyd" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][CarHyd] = strval( val ); }if( strcmp( key , "CarWheel" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][CarWheel] = strval( val ); }if( strcmp( key , "CarAusp" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][CarAusp] = strval( val ); }if( strcmp( key , "CarSideL" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][CarSideL] = strval( val ); }if( strcmp( key , "CarSideR" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][CarSideR] = strval( val ); }if( strcmp( key , "CarFB" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][CarFB] = strval( val ); }if( strcmp( key , "CarRB" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][CarRB] = strval( val ); }if( strcmp( key , "CarSpoiler" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][CarSpoiler] = strval( val ); }if( strcmp( key , "CarRoof" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][CarRoof] = strval( val ); }if( strcmp( key , "CarHood" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][CarHood] = strval( val ); }if( strcmp( key , "CarVents" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][CarVents] = strval( val ); }if( strcmp( key , "CarLamps" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][CarLamps] = strval( val ); }if( strcmp( key , "CarPJ" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][CarPJ] = strval( val ); }if( strcmp( key , "CarC1" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][CarC1] = strval( val ); }if( strcmp( key , "CarC2" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][CarC2] = strval( val ); }if( strcmp( key , "Preis" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][CarPreis] = strval( val ); }if( strcmp( key , "Neon" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][Neon] = strval( val ); }if( strcmp( key , "Plate" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][CarPlate] = strval( val ); }if( strcmp( key , "Number" , true ) == 0 ) { val = ini_GetValue( Data ); format(PlayerCar[playerid][x][CarNumber], 32, "%s", val); }if( strcmp( key , "Gesperrt" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][CarGesperrt] = strval( val ); }if( strcmp( key , "Sperrpreis" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][CarSperrpreis] = strval( val ); }if( strcmp( key , "Abgeschleppt", true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][Abgeschleppt] = strval( val ); }}fclose(UserFile);format(string2, 256, "INSERT INTO `carsystem` (`CarOwner`) VALUES ('%s_%d')",playername2,x);mysql_pquery(handle, string2);format(string2, 1024, "UPDATE `carsystem` SET `CarModel`='%d',`CarPos_X`='%f',`CarPos_Y`='%f',`CarPos_Z`='%f',`CarPos_A`='%f',`CarNitro`='%d',`CarHyd`='%d',`CarWheel`='%d',`CarAusp`='%d' WHERE `CarOwner`='%s_%d'",PlayerCar[playerid][x][CarModel], PlayerCar[playerid][x][CarPos_x], PlayerCar[playerid][x][CarPos_y], PlayerCar[playerid][x][CarPos_z],PlayerCar[playerid][x][CarRotate], PlayerCar[playerid][x][CarNitro],PlayerCar[playerid][x][CarHyd], PlayerCar[playerid][x][CarWheel], PlayerCar[playerid][x][CarAusp], playername2, x);mysql_pquery(handle, string2);format(string2, 1024, "UPDATE `carsystem` SET `CarSideL`='%d',`CarSideR`='%d',`CarFB`='%d',`CarFB`='%d',`CarRB`='%d',`CarSpoiler`='%d',`CarRoof`='%d',`CarHood`='%d',`CarVents`='%d',`CarLamps`='%d' WHERE `CarOwner`='%s_%d'",PlayerCar[playerid][x][CarSideL], PlayerCar[playerid][x][CarSideR], PlayerCar[playerid][x][CarFB], PlayerCar[playerid][x][CarRB],PlayerCar[playerid][x][CarSpoiler], PlayerCar[playerid][x][CarRoof],PlayerCar[playerid][x][CarHood], PlayerCar[playerid][x][CarVents], PlayerCar[playerid][x][CarLamps], playername2, x);mysql_pquery(handle, string2);format(string2, 1024, "UPDATE `carsystem` SET `CarPJ`='%d',`CarC1`='%d',`CarC2`='%d',`Preis`='%d',`Neon`='%d',`Plate`='%d',`Number`='%s',`Gesperrt`='%d',`Sperrpreis`='%d',`Kralle`='%d' WHERE `CarOwner`='%s_%d'",PlayerCar[playerid][x][CarPJ], PlayerCar[playerid][x][CarC1], PlayerCar[playerid][x][CarC2], PlayerCar[playerid][x][CarPreis],PlayerCar[playerid][x][Neon], PlayerCar[playerid][x][CarPlate],PlayerCar[playerid][x][CarNumber], PlayerCar[playerid][x][CarGesperrt], PlayerCar[playerid][x][CarSperrpreis], PlayerCar[playerid][x][Kralle], playername2, x);mysql_pquery(handle, string2);fremove(string3);PlayerCarSpawn(playerid,x);}else{format(string2, 256, "SELECT * FROM `carsystem` WHERE `CarOwner`='%s_%d'",playername2,x);mysql_pquery(handle, string2, "LoadMysqlCars", "sii", playername2,x,playerid, 0);}}}}
forward LoadMysqlCars(playername,x,playerid);public LoadMysqlCars(playername,x,playerid){new rows,fields,v[128];cache_get_data(rows,fields);if(rows) {Dtc_PlayerHaveCar[playerid][x] = 1;cache_get_field_content(0,"CarModel",v); PlayerCar[playerid][x][CarModel] = strval(v);cache_get_field_content(0,"CarPos_X",v); PlayerCar[playerid][x][CarPos_x] = floatstr(v);cache_get_field_content(0,"CarPos_Y",v); PlayerCar[playerid][x][CarPos_y] = floatstr(v);cache_get_field_content(0,"CarPos_Z",v); PlayerCar[playerid][x][CarPos_z] = floatstr(v);cache_get_field_content(0,"CarPos_A",v); PlayerCar[playerid][x][CarRotate] = floatstr(v);cache_get_field_content(0,"CarNitro",v); PlayerCar[playerid][x][CarNitro] = strval(v);cache_get_field_content(0,"CarHyd",v); PlayerCar[playerid][x][CarHyd] = strval(v);cache_get_field_content(0,"CarWheel",v); PlayerCar[playerid][x][CarWheel] = strval(v);cache_get_field_content(0,"CarAusp",v); PlayerCar[playerid][x][CarAusp] = strval(v);cache_get_field_content(0,"CarSideL",v); PlayerCar[playerid][x][CarSideL] = strval(v);cache_get_field_content(0,"CarSideR",v); PlayerCar[playerid][x][CarSideR] = strval(v);cache_get_field_content(0,"CarFB",v); PlayerCar[playerid][x][CarFB] = strval(v);cache_get_field_content(0,"CarRB",v); PlayerCar[playerid][x][CarRB] = strval(v);cache_get_field_content(0,"CarSpoiler",v); PlayerCar[playerid][x][CarSpoiler] = strval(v);cache_get_field_content(0,"CarRoof",v); PlayerCar[playerid][x][CarRoof] = strval(v);cache_get_field_content(0,"CarHood",v); PlayerCar[playerid][x][CarHood] = strval(v);cache_get_field_content(0,"CarVents",v); PlayerCar[playerid][x][CarVents] = strval(v);cache_get_field_content(0,"CarLamps",v); PlayerCar[playerid][x][CarLamps] = strval(v);cache_get_field_content(0,"CarPJ",v); PlayerCar[playerid][x][CarPJ] = strval(v);cache_get_field_content(0,"CarC1",v); PlayerCar[playerid][x][CarC1] = strval(v);cache_get_field_content(0,"CarC2",v); PlayerCar[playerid][x][CarC2] = strval(v);cache_get_field_content(0,"Preis",v); PlayerCar[playerid][x][CarPreis] = strval(v);cache_get_field_content(0,"Neon",v); PlayerCar[playerid][x][Neon] = strval(v);cache_get_field_content(0,"Plate",v); PlayerCar[playerid][x][CarPlate] = strval(v);cache_get_field_content(0,"Number",v); format(PlayerCar[playerid][x][CarNumber], 32, "%s", v);cache_get_field_content(0,"Gesperrt",v); PlayerCar[playerid][x][CarGesperrt] = strval(v);cache_get_field_content(0,"Sperrpreis",v); PlayerCar[playerid][x][CarSperrpreis] = strval(v);cache_get_field_content(0,"Kralle",v); PlayerCar[playerid][x][Kralle] = strval(v);PlayerCarSpawn(playerid,x);}}
public PlayerCarSpawn(playerid,Slot){if(IsPlayerConnected(playerid)){if(Dtc_PlayerHaveCar[playerid][Slot]){PlayerCar[playerid][Slot][CarId] = CreateVehicle(PlayerCar[playerid][Slot][CarModel],PlayerCar[playerid][Slot][CarPos_x],PlayerCar[playerid][Slot][CarPos_y],PlayerCar[playerid][Slot][CarPos_z],PlayerCar[playerid][Slot][CarRotate],PlayerCar[playerid][Slot][CarC1],PlayerCar[playerid][Slot][CarC2], 60000);ChangeVehicleColor(PlayerCar[playerid][Slot][CarId],PlayerCar[playerid][Slot][CarC1],PlayerCar[playerid][Slot][CarC2]);if(PlayerCar[playerid][Slot][CarPJ] >= 0) {ChangeVehiclePaintjob(PlayerCar[playerid][Slot][CarId],PlayerCar[playerid][Slot][CarPJ]);}if(PlayerCar[playerid][Slot][CarNitro] != 0) {AddVehicleComponent(PlayerCar[playerid][Slot][CarId],PlayerCar[playerid][Slot][CarNitro]);}if(PlayerCar[playerid][Slot][CarHyd] != 0) {AddVehicleComponent(PlayerCar[playerid][Slot][CarId],PlayerCar[playerid][Slot][CarHyd]);}if(PlayerCar[playerid][Slot][CarWheel] != 0) {AddVehicleComponent(PlayerCar[playerid][Slot][CarId],PlayerCar[playerid][Slot][CarWheel]);}if(PlayerCar[playerid][Slot][CarAusp] != 0) {AddVehicleComponent(PlayerCar[playerid][Slot][CarId],PlayerCar[playerid][Slot][CarAusp]);}if(PlayerCar[playerid][Slot][CarSideL] != 0) {AddVehicleComponent(PlayerCar[playerid][Slot][CarId],PlayerCar[playerid][Slot][CarSideL]);}if(PlayerCar[playerid][Slot][CarSideR] != 0) {AddVehicleComponent(PlayerCar[playerid][Slot][CarId],PlayerCar[playerid][Slot][CarSideR]);}if(PlayerCar[playerid][Slot][CarFB] != 0) {AddVehicleComponent(PlayerCar[playerid][Slot][CarId],PlayerCar[playerid][Slot][CarFB]);}if(PlayerCar[playerid][Slot][CarRB] != 0) {AddVehicleComponent(PlayerCar[playerid][Slot][CarId],PlayerCar[playerid][Slot][CarRB]);}if(PlayerCar[playerid][Slot][CarSpoiler] != 0) {AddVehicleComponent(PlayerCar[playerid][Slot][CarId],PlayerCar[playerid][Slot][CarSpoiler]);}if(PlayerCar[playerid][Slot][CarRoof] != 0) {AddVehicleComponent(PlayerCar[playerid][Slot][CarId],PlayerCar[playerid][Slot][CarRoof]);}if(PlayerCar[playerid][Slot][CarHood] != 0) {AddVehicleComponent(PlayerCar[playerid][Slot][CarId],PlayerCar[playerid][Slot][CarHood]);}if(PlayerCar[playerid][Slot][CarVents] != 0) {AddVehicleComponent(PlayerCar[playerid][Slot][CarId],PlayerCar[playerid][Slot][CarVents]);}if(PlayerCar[playerid][Slot][CarLamps] != 0) {AddVehicleComponent(PlayerCar[playerid][Slot][CarId],PlayerCar[playerid][Slot][CarLamps]);}if(PlayerCar[playerid][Slot][CarPlate] != 0) {SetVehicleNumberPlate(PlayerCar[playerid][Slot][CarId],PlayerCar[playerid][Slot][CarNumber]);}SetVehicleToRespawn(Slot);if(Dtc_LockOnSpawn == 1){Dtc_Carlock[PlayerCar[playerid][Slot][CarId]] = 1;Dtc_LockCar(PlayerCar[playerid][Slot][CarId]);}if(PlayerCar[playerid][Slot][Neon] == 1){new Float:x,Float:y,Float:z;Neonrohr[playerid][Neon] = CreateObject(18648,x,y,z,0,0,0,283);Neonrohr[playerid][Neon1] = CreateObject(18648,x,y,z,0,0,0,283);AttachObjectToVehicle(Neonrohr[playerid][Neon], PlayerCar[playerid][Dtc_PlayerKey[playerid]][CarId], 0.8,0,-0.70,0,0,0);AttachObjectToVehicle(Neonrohr[playerid][Neon1], PlayerCar[playerid][Dtc_PlayerKey[playerid]][CarId], -0.8,0,-0.70,0,0,0);}if(PlayerCar[playerid][Slot][Neon] == 2){new Float:x,Float:y,Float:z;Neonrohr[playerid][Neon] = CreateObject(18647,x,y,z,0,0,0,283);Neonrohr[playerid][Neon1] = CreateObject(18647,x,y,z,0,0,0,283);AttachObjectToVehicle(Neonrohr[playerid][Neon], PlayerCar[playerid][Dtc_PlayerKey[playerid]][CarId], 0.8,0,-0.70,0,0,0);AttachObjectToVehicle(Neonrohr[playerid][Neon1], PlayerCar[playerid][Dtc_PlayerKey[playerid]][CarId], -0.8,0,-0.70,0,0,0);}if(PlayerCar[playerid][Slot][Neon] == 3){new Float:x,Float:y,Float:z;Neonrohr[playerid][Neon] = CreateObject(18649,x,y,z,0,0,0,283);Neonrohr[playerid][Neon1] = CreateObject(18649,x,y,z,0,0,0,283);AttachObjectToVehicle(Neonrohr[playerid][Neon], PlayerCar[playerid][Dtc_PlayerKey[playerid]][CarId], 0.8,0,-0.70,0,0,0);AttachObjectToVehicle(Neonrohr[playerid][Neon1], PlayerCar[playerid][Dtc_PlayerKey[playerid]][CarId], -0.8,0,-0.70,0,0,0);}if(PlayerCar[playerid][Slot][Neon] == 4){new Float:x,Float:y,Float:z;Neonrohr[playerid][Neon] = CreateObject(18652,x,y,z,0,0,0,283);Neonrohr[playerid][Neon1] = CreateObject(18652,x,y,z,0,0,0,283);AttachObjectToVehicle(Neonrohr[playerid][Neon], PlayerCar[playerid][Dtc_PlayerKey[playerid]][CarId], 0.8,0,-0.70,0,0,0);AttachObjectToVehicle(Neonrohr[playerid][Neon1], PlayerCar[playerid][Dtc_PlayerKey[playerid]][CarId], -0.8,0,-0.70,0,0,0);}if(PlayerCar[playerid][Slot][Neon] == 5){new Float:x,Float:y,Float:z;Neonrohr[playerid][Neon] = CreateObject(18651,x,y,z,0,0,0,283);Neonrohr[playerid][Neon1] = CreateObject(18651,x,y,z,0,0,0,283);AttachObjectToVehicle(Neonrohr[playerid][Neon], PlayerCar[playerid][Dtc_PlayerKey[playerid]][CarId], 0.8,0,-0.70,0,0,0);AttachObjectToVehicle(Neonrohr[playerid][Neon1], PlayerCar[playerid][Dtc_PlayerKey[playerid]][CarId], -0.8,0,-0.70,0,0,0);}if(PlayerCar[playerid][Slot][Neon] == 6){new Float:x,Float:y,Float:z;Neonrohr[playerid][Neon] = CreateObject(18650,x,y,z,0,0,0,283);Neonrohr[playerid][Neon1] = CreateObject(18650,x,y,z,0,0,0,283);AttachObjectToVehicle(Neonrohr[playerid][Neon], PlayerCar[playerid][Dtc_PlayerKey[playerid]][CarId], 0.8,0,-0.70,0,0,0);AttachObjectToVehicle(Neonrohr[playerid][Neon1], PlayerCar[playerid][Dtc_PlayerKey[playerid]][CarId], -0.8,0,-0.70,0,0,0);}}}} -
oky danke
und ich kenne kein script cool.pwn
ich habe ein Script von mein bruder genommen da er nicht mehr scriptet und mir die ausgestellt hat
-
-
ich habe mir von ein anderes script ein autohaus raus kopiert
das speicher ist MSQL R5
und ich habe in mein Script MSQL R39-3
und brauche das "mysql_store_result" in R39-3
und das brauche ich auch "mysql_num_rows" in R39-3
hoffe ihr könnt mir da helfen
-
Hier
Code
Alles anzeigenv0.3.7-R2, (C)2005-2015 SA-MP Team [18:18:20] filterscripts = "" (string) [18:18:20] password = "" (string) [18:18:20] [18:18:20] Server Plugins [18:18:20] -------------- [18:18:20] Loading plugin: crashdetect [18:18:20] CrashDetect v4.15.1 is OK. [18:18:20] Loaded. [18:18:20] Loading plugin: sscanf [18:18:20] [18:18:20] =============================== [18:18:20] sscanf plugin loaded. [18:18:20] (c) 2009 Alex "Y_Less" Cole [18:18:20] =============================== [18:18:20] Loaded. [18:18:20] Loading plugin: MapAndreas [18:18:20] Loaded. [18:18:20] Loading plugin: mysql [18:18:20] >> plugin.mysql: R39-3 successfully loaded. [18:18:20] Loaded. [18:18:20] Loading plugin: streamer [18:18:20] *** Streamer Plugin v2.7.7 by Incognito loaded *** [18:18:20] Loaded. [18:18:20] Loaded 5 plugins. [18:18:20] [18:18:20] Ban list [18:18:20] -------- [18:18:20] Loaded: samp.ban [18:18:20] [18:18:20] [18:18:20] Filterscripts [18:18:20] --------------- [18:18:20] Loaded 0 filterscripts. [18:18:21] [debug] Run time error 19: "File or function is not found" [18:18:21] [debug] SSCANF_Init [18:18:21] [debug] SSCANF_Join [18:18:21] [debug] SSCANF_Leave [18:18:21] [debug] Run time error 19: "File or function is not found" [18:18:21] [debug] SSCANF_Init [18:18:21] [debug] SSCANF_Join [18:18:21] [debug] SSCANF_Leave [18:18:21] Script[gamemodes/Haupt-Script.amx]: Run time error 19: "File or function is not found" [18:18:21] Number of vehicle models: 0
-
Hallo Breadfish
ich habe folgendes Problem
ich habe plötzlich ein Problem mit den Sscanf
habe Log errors
Code[17:54:35] [debug] Run time error 19: "File or function is not found" [17:54:35] [debug] SSCANF_Init [17:54:35] [debug] SSCANF_Join [17:54:35] [debug] SSCANF_Leave [17:54:35] [debug] Run time error 19: "File or function is not found" [17:54:35] [debug] SSCANF_Init [17:54:35] [debug] SSCANF_Join [17:54:35] [debug] SSCANF_Leave
Was heißt das und ich wie bekomme ich es wieder weg habe Sscanf schon aufen neuesten Stand
-
geht immer noch nicht
Crasht immer noch -
wenn ich es ausklammer geht der befehl
-
geht auch nicht bleibt wieder hier stehen "[19:47:27] Maske7-> Unbekannt_144"
-
also geht immer noch nicht
[19:29:02] Maske1
[19:29:02] Maske2
[19:29:02] Maske3
[19:29:02] Maske4
[19:29:02] Maske5
[19:29:02] Maske6
[19:29:02] Maske7-> Unbekannt_127
dann Server Crash
print("Maske1");
if(maskehat[playerid] == true) return SendClientMessage(playerid,GRAU,"Du hast deine Maske noch an!");
print("Maske2");
SetPlayerAttachedObject(playerid,0,19037,2,0.108000,0.046000,-0.001000,79.900032,80.200012,8.999998);
print("Maske3");
SendClientMessage(playerid,GRAU,""#HTML_RED"Tarnung: "#HTML_WHITE"Angezogen!");
print("Maske4");
maskehat[playerid] = true;
print("Maske5");
SetPlayerSkinEx(playerid,294);
print("Maske6");
new pname[MAX_PLAYER_NAME];
format(pname,sizeof(pname),"Unbekannt_%i",random(50) + 122);
printf("Maske7-> %s", pname);
SetPlayerName(playerid,pname); //<-- Crasht Server
print("Maske8");
CreateErfolg(playerid,44,"Ich war Luft...","Setze eine Maske auf","",0,10);
print("Maske9");
return true; -
jetzt habe ich diesen error "C:\Users\Patrick\Desktop\Haupt-Script.pwn(10330) : warning 202: number of arguments does not match definition"
zeile: "print("Maske7-> %s", pname);"