new row2[256]; new field2[17][24]; format(file, sizeof(file), \"SELECT * FROM Hazak WHERE X=\'%f\' AND Y=\'%f\' AND Z=\'%f\'\",x,y,z); mysql_query(file); mysql_store_result(); mysql_fetch_row_format(row2, \"|\"); explode(row2, field2, \"|\"); mysql_free_result(); new id = strval(field2[0]); HazInfo[id][ujHaz] = 1; GetPlayerName(playerid,nev,sizeof(nev)); format(file,sizeof(file),\"%s létrehozott egy házat! ID: %d | Belsõ ID: %d | Eladási Ár: %d Ft\",nev,id,belso,ar);
ALTER TABLE tábla_név AUTO_INCREMENT = 1;[/quote]
CMD:ujhaz(playerid,params[]){if(Belepve[playerid] != 0){ if(JatekosInfo[playerid][Admin] == 4) { new belso,ar; if(sscanf(params,\"dd\",belso,ar))return SendClientMessage(playerid,SZURKE,\"Használat: /ujhaz [belsõ ID] [Eladási ár]\"); { if(belso > 0 && belso < 9) { new Float:x,Float:y,Float:z; GetPlayerPos(playerid,x,y,z); new file[512]; AddStaticPickup(1239, 23, x,y,z, 0); if(belso == 1) { format(file, sizeof(file), \"INSERT INTO Hazak (X,Y,Z,Interior,Belso,Zarva,Ar) VALUES (\'%f\',\'%f\',\'%f\',\'1\',\'1\',\'1\',\'%d\')\", x,y,z,ar); mysql_query(file); } if(belso == 2) { format(file, sizeof(file), \"INSERT INTO Hazak (X,Y,Z,Interior,Belso,Zarva,Ar) VALUES (\'%f\',\'%f\',\'%f\',\'4\',\'2\',\'1\',\'%d\')\", x,y,z,ar); mysql_query(file); } if(belso == 3) { format(file, sizeof(file), \"INSERT INTO Hazak (X,Y,Z,Interior,Belso,Zarva,Ar) VALUES (\'%f\',\'%f\',\'%f\',\'5\',\'3\',\'1\',\'%d\')\", x,y,z,ar); mysql_query(file); } if(belso == 4) { format(file, sizeof(file), \"INSERT INTO Hazak (X,Y,Z,Interior,Belso,Zarva,Ar) VALUES (\'%f\',\'%f\',\'%f\',\'9\',\'4\',\'1\',\'%d\')\", x,y,z,ar); mysql_query(file); } if(belso == 5) { format(file, sizeof(file), \"INSERT INTO Hazak (X,Y,Z,Interior,Belso,Zarva,Ar) VALUES (\'%f\',\'%f\',\'%f\',\'15\',\'5\',\'1\',\'%d\')\", x,y,z,ar); mysql_query(file); } if(belso == 6) { format(file, sizeof(file), \"INSERT INTO Hazak (X,Y,Z,Interior,Belso,Zarva,Ar) VALUES (\'%f\',\'%f\',\'%f\',\'8\',\'6\',\'1\',\'%d\')\", x,y,z,ar); mysql_query(file); } if(belso == 7) { format(file, sizeof(file), \"INSERT INTO Hazak (X,Y,Z,Interior,Belso,Zarva,Ar) VALUES (\'%f\',\'%f\',\'%f\',\'6\',\'7\',\'1\',\'%d\')\", x,y,z,ar); mysql_query(file); } if(belso == { format(file, sizeof(file), \"INSERT INTO Hazak (X,Y,Z,Interior,Belso,Zarva,Ar) VALUES (\'%f\',\'%f\',\'%f\',\'6\',\'8\',\'1\',\'%d\')\", x,y,z,ar); mysql_query(file); } new row2[256]; new field2[17][24]; format(file, sizeof(file), \"SELECT * FROM Hazak WHERE X=\'%f\' AND Y=\'%f\' AND Z=\'%f\'\",x,y,z); mysql_query(file); mysql_store_result(); mysql_fetch_row_format(row2, \"|\"); explode(row2, field2, \"|\"); mysql_free_result(); new id = strval(field2[0]); HazInfo[id][ujHaz] = 1; GetPlayerName(playerid,nev,sizeof(nev)); format(file,sizeof(file),\"%s létrehozott egy házat! ID: %d | Belsõ ID: %d | Eladási Ár: %d Ft\",nev,id,belso,ar); AdminnakUzenet(VNARANCS,file,1); } else SendClientMessage(playerid, HIBA, \"A belsõnek 1-8-ig kell lennie!\"); } } else SendClientMessage(playerid, HIBA, \"Minimum 4-as adminnak kell lenned!\"); }else SendClientMessage(playerid, HIBA, \"Nem vagy bejelentkezve!\");return 1;}
ALTER TABLE *TÁBLANÉV* AUTO_INCREMENT = *SOROKSZÁMA*;