public VehicleSpawn(playerid){new name[MAX_PLAYER_NAME];new vehicleid,kocsicolor,Float:Xpos,Float:Ypos,Float:Zpos,Float:AnglePos; GetPlayerName(playerid,name,sizeof(name));format(query,sizeof(query),\"SELECT kocsiid,kocsiszin,X,Y,Z,Angle FROM autok WHERE tulaj = \'%s\'\",name);mysql_query(query);mysql_store_result();mysql_fetch_row(line);sscanf(line,\"p<|>ddffff\",vehicleid,kocsicolor,Xpos,Ypos,Zpos,AnglePos);CreateVehicle(vehicleid,Xpos,Ypos,Zpos,AnglePos,kocsicolor,kocsicolor,-1);printf(\"Kocsi ID: %d\",vehicleid);mysql_free_result();return 1;}
public VehicleSpawn(playerid){new name[MAX_PLAYER_NAME];new vehicleid,kocsicolor,Float:Xpos,Float:Ypos,Float:Zpos,Float:AnglePos; GetPlayerName(playerid,name,sizeof(name));format(query,sizeof(query),\"SELECT * FROM autok WHERE tulaj = \'%s\'\",name);mysql_query(query);mysql_store_result();mysql_fetch_row(line);sscanf(line,\"p<|>{s[20]}dd{s[35]s[35]}ffff\",vehicleid,kocsicolor,Xpos,Ypos,Zpos,AnglePos);CreateVehicle(vehicleid,Xpos,Ypos,Zpos,AnglePos,kocsicolor,kocsicolor,-1);printf(\"Kocsi ID: %d\",vehicleid);mysql_free_result();return 1;}
public VehicleSpawn(playerid){new name[MAX_PLAYER_NAME];new vehicleid,kocsicolor,Float:Xpos,Float:Ypos,Float:Zpos,Float:AnglePos; GetPlayerName(playerid,name,sizeof(name));format(query,sizeof(query),\"SELECT kocsiid,kocsiszin,X,Y,Z,Angle FROM autok WHERE tulaj = \'%s\' LIMIT 1\",name);mysql_query(query);mysql_store_result();if(mysql_num_rows() > 0){mysql_fetch_row(line);mysql_free_result();sscanf(line,\"p<|>ddffff\",vehicleid,kocsicolor,Xpos,Ypos,Zpos,AnglePos);CreateVehicle(vehicleid,Xpos,Ypos,Zpos,AnglePos,kocsicolor,kocsicolor,-1);printf(\"Kocsi ID: %d\",vehicleid);} else {printf(\"Ezen a néven nincs elmentve jármû: %s\", name);mysql_free_result();}return 1;}
---- Tábla szerkezet: `autok`--CREATE TABLE IF NOT EXISTS `autok` ( `tulaj` varchar(20) COLLATE utf8_hungarian_ci NOT NULL, `kocsiid` int(3) NOT NULL, `kocsinev` varchar(20) COLLATE utf8_hungarian_ci NOT NULL, `kocsiszin` int(3) NOT NULL, `rendszam` varchar(20) COLLATE utf8_hungarian_ci NOT NULL, `X` float NOT NULL, `Y` float NOT NULL, `Z` float NOT NULL, `Angle` float NOT NULL, UNIQUE KEY `tulaj` (`tulaj`)) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_hungarian_ci;---- A tábla adatainak kiíratása `autok`--INSERT INTO `autok` (`tulaj`, `kocsiid`, `kocsinev`, `kocsiszin`, `rendszam`, `X`, `Y`, `Z`, `Angle`) VALUES(\'Zsolesszka\', 550, \'Sunrise\', 2, \'asd\', 2148.75, 1397.25, 10.8125, 145.916);
WHERE tulaj = '%s\' LIMIT 1\", name);[/quote] WHERE tulaj = \'%s\' LIMIT 1\", name);
Mivel a code tagek is frankón mûködnek mi lenne ha manuálisan javítanád? WHERE tulaj = '%s\' LIMIT 1\", name); WHERE tulaj = \'%s\' LIMIT 1\", name); [/quote]Annyira azért nem vagyok hülye hozzá hogy azt ne vegyem észre és azt javítottam még mielõtt bemásoltam volna Más ötlet ?
WHERE tulaj = '%s\' LIMIT 1\", name);
format(query,sizeof(query),\"INSERT INTO `felhasznalok` (`id`,`name`,`jelszo`) VALUES (0,\'%s\',\'%s\')\",name,jelszo);