ALTER TABLE `tablaneve` DROP `ID`ALTER TABLE `tablaneve` ADD `ID` INT( 4 ) NOT NULL AUTO_INCREMENT PRIMARY KEY FIRST\"
new data[128],picknev,Float:pickx,Float:picky,Float:pickz;mysql_query(\"SELECT pickupnev,pickupx,pickupy,pickupz FROM hotel\");mysql_store_result();while(mysql_fetch_row(data)) {sscanf(data, \"p<|>s[50]fff\",picknev,pickx,picky,pickz);picknev = CreatePickup(1273, 1, pickx,picky,pickz); }
public OnPlayerPickUpPickup(playerid, pickupid){ new data1[128],string[128],picknev[128],lefoglalva[128];mysql_query(\"SELECT foglalva,pickupnev FROM hotel\"); mysql_store_result(); while(mysql_fetch_row(data1)) { sscanf(data1, \"p<|>s[50]s[50]\",lefoglalva,picknev); if(pickupid ==picknev) //hát itt irtam lvhotel1,2,3 de ugyan azon az 1 pickupon kapom meg az adatokat:( és lvhotel9 értékeit:( { format(string,500,\"szoba név: %s \\n Lefoglalva: %s \",picknev,lefoglalva); ShowPlayerDialog (playerid, listabehoz,DIALOG_STYLE_MSGBOX, \"Hotel foglalas\",string, \"ok\",\"kilep\"); } }}
new picknev[9];new hanyadik;new data[128],Float:pickx,Float:picky,Float:pickz;mysql_query(\"SELECT pickupnev,pickupx,pickupy,pickupz FROM hotel\");mysql_store_result();while(mysql_fetch_row(data)) {sscanf(data, \"p<|>s[50]fff\",picknev,pickx,picky,pickz);hanyadik++;picknev[hanyadik] = CreatePickup(1273, 1, pickx,picky,pickz); }
public OnPlayerPickUpPickup(playerid, pickupid){ new data1[128],string[128],picknev[9],hanyadik,lefoglalva[128];mysql_query(\"SELECT foglalva,pickupnev FROM hotel\"); mysql_store_result(); while(mysql_fetch_row(data1)) { sscanf(data1, \"p<|>s[50]s[50]\",lefoglalva,picknev);hanyadik++; if(pickupid == picknev[hanyadik]) { format(string,500,\"szoba név: %s \\n Lefoglalva: %s \",picknev,lefoglalva); ShowPlayerDialog (playerid, listabehoz,DIALOG_STYLE_MSGBOX, \"Hotel foglalas\",string, \"ok\",\"kilep\"); } } hanyadik = 0;}
if(pickupid == picknev[hanyadik]) // Itt a picknev karakterlánc egyik karakterét próbálod összehasonlítani a pickupid -vel ami egy egész számot tartalmazó változó. { format(string,500,\"szoba név: %s \\n Lefoglalva: %s \",picknev,lefoglalva); // Itt meg ugyanazt a változót karakterláncként ki akarod íratni?
ugyan az a probléma:( 1 ikon utolso érték és ennyi. public OnPlayerPickUpPickup(playerid, pickupid){ new data1[128],string[128],picknev[9],hanyadik,lefoglalva[128];mysql_query(\"SELECT foglalva,pickupnev FROM hotel\"); mysql_store_result(); while(mysql_fetch_row(data1)) { sscanf(data1, \"p<|>s[50]s[50]\",lefoglalva,picknev);hanyadik++; if(pickupid == picknev[hanyadik]) { format(string,500,\"szoba név: %s \\n Lefoglalva: %s \",picknev,lefoglalva); ShowPlayerDialog (playerid, listabehoz,DIALOG_STYLE_MSGBOX, \"Hotel foglalas\",string, \"ok\",\"kilep\"); } } hanyadik = 0;}
#include <a_samp> newpickup_id[10]; publicOnFilterScriptInit(){for(new i; i < sizeof pickup_id; i++){pickup_id = CreatePickup(1273, 1, 0.0 - i, 0.0 + i, 2.0);}return 1;}publicOnPlayerPickUpPickup(playerid, pickupid){for(new i; i < sizeof pickup_id; i++){if(pickup_id == pickupid){ new str[128]; format(str, sizeof str, \"Megtaláltad a %d sorszámú pickupot.\", pickupid); SendClientMessage(playerid, -1, str); return 1;}}return 1;}
public OnPlayerPickUpPickup(playerid, pickupid){ new data[128],string[128],pickid[10],hanyadik,foglalva[10],pickupnev[10];mysql_query(\"SELECT id,foglalva,pickupnev FROM hotel\"); mysql_store_result(); hanyadik=0;// 0 hozz add 1 et while(mysql_fetch_row(data)) { hanyadik++; sscanf(data, \"p<|>ds[50]s[50]\",pickid[hanyadik],foglalva[hanyadik],pickupnev[hanyadik]); if(pickupid == pickid[hanyadik]) { format(string,500,\"Szoba szám : %d \\n Foglalva : %s \",pickid[hanyadik],foglalva[hanyadik]); ShowPlayerDialog (playerid, listabehoz,DIALOG_STYLE_MSGBOX, \"Hotel foglalas\",string, \"ok\",\"kilep\"); printf(\"%d\",pickid[hanyadik]); } }}public pickuplerakas(){new data[128],pickid[10],hanyadik,Float:pickx[10],Float:picky[10],Float:pickz[10];mysql_query(\"SELECT id,pickupx,pickupy,pickupz FROM hotel\"); mysql_store_result(); hanyadik =0; while(mysql_fetch_row_format(data)) { hanyadik++; sscanf(data, \"p<|>dfff\",pickid[hanyadik],pickx[hanyadik],picky[hanyadik],pickz[hanyadik]); printf(\"%d / %f /%f / %f\",pickid[hanyadik],pickx[hanyadik],picky[hanyadik],pickz[hanyadik]); } for(new i=0; i <= 9; i++){ pickid = CreatePickup(1273, 1, pickx,picky,pickz); printf(\"%d /%f /%f/%f \",pickid,pickx,picky,pickz);}return 1;}public OnGameModeInit(){pickuplerakas()}
#define MAX_PICKUP 10newHotelPickup[MAX_PICKUP];stockLoadPickup(){newi = 0,temp[128],Float:pickx,Float:picky,Float:pickz;mysql_query(\"SELECT `pickupx`, `pickupy`, `pickupz` FROM `hotel`\");mysql_store_result();while(mysql_fetch_row_format(temp)) {if(i < MAX_PICKUP){ sscanf(temp, \"p<|>fff\", pickx, picky, pickz); HotelPickup = CreatePickup(1273, 1, pickx, picky, pickz); i++;}}mysql_free_result();}publicOnPlayerPickUpPickup(playerid, pickupid){for(new i; i < MAX_PICKUP; i++){if(HotelPickup == pickupid){ new str[128]; format(str, sizeof str, \"Szoba szám : %d\", pickupid); ShowPlayerDialog(playerid, listabehoz, DIALOG_STYLE_MSGBOX, \"Hotel foglalas\", str, \"ok\",\"kilep\"); return 1;}}return 1;}