public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]){if(dialogid==teleport){if(response){if(listitem==0)///////////////////////////////////////////////////////////-Városok-//////////////////////////////////////////////////////////////////////////////{ShowPlayerDialog(playerid,teleport,DIALOG_STYLE_LIST,\"Városok\",\"{ffffff}Los Santos\\n{ffffff}San Fierro\\n{ffffff}Las Venturas\",\"Port\", \"Mégse\");if(listitem==0) { SetPlayerPos(playerid,1306.7422,1267.5371,10.8203); return 1; }if(listitem==1) { SetPlayerPos(playerid,-1567.6731,-179.2296,14.1484); return 1; }if(listitem==2) { SetPlayerPos(playerid,1412.8171,-2435.1362,13.5766); return 1; } return 1;}else if(listitem==1)///////////////////////////////////////////////////////////-Faluk-//////////////////////////////////////////////////////////////////////////////{ShowPlayerDialog(playerid,teleport,DIALOG_STYLE_LIST,\"Faluk\",\"{ff0000}Fort Carson\\n{ffffff}Falu 2\\n{ffffff}Falu 3\",\"Port\", \"Mégse\");if(listitem==0) { SetPlayerPos(playerid,1306.7422,1267.5371,10.8203); return 1; }if(listitem==1) { SetPlayerPos(playerid,-1567.6731,-179.2296,14.1484); return 1; }if(listitem==2) { SetPlayerPos(playerid,1412.8171,-2435.1362,13.5766); return 1; } return 1;}///////////////////////////////////////////////////////////-Stuntok-//////////////////////////////////////////////////////////////////////////////else if(listitem==2){ShowPlayerDialog(playerid,teleport,DIALOG_STYLE_LIST,\"Stuntok\",\"{0000ff}Stunt City\\n{0000ff}Stunt1\\n{0000ff}Stunt area\",\"Port\", \"Mégse\");if(listitem==0) { SetPlayerPos(playerid,1306.7422,1267.5371,10.8203); return 1; }if(listitem==1) { SetPlayerPos(playerid,-1567.6731,-179.2296,14.1484); return 1; }if(listitem==2) { SetPlayerPos(playerid,1412.8171,-2435.1362,13.5766); return 1; } return 1;}///////////////////////////////////////////////////////////-Driftek-//////////////////////////////////////////////////////////////////////////////else if(listitem==3){ShowPlayerDialog(playerid,teleport,DIALOG_STYLE_LIST,\"Driftek\",\"{ff00ff}Drift world\\n{ff00ff}Drift world 2\\n{ff00ff}Drift\",\"Port\", \"Mégse\");if(listitem==0) { SetPlayerPos(playerid,1306.7422,1267.5371,10.8203); return 1; }if(listitem==1) { SetPlayerPos(playerid,-1567.6731,-179.2296,14.1484); return 1; }if(listitem==2) { SetPlayerPos(playerid,1412.8171,-2435.1362,13.5766); return 1; }}}}return 1;}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]){ if(dialogid == teleport) { if(response) { if(listitem == 0) { ShowPlayerDialog(playerid, varosok, DIALOG_STYLE_LIST, \"Városok\", \"{ffffff}Los Santos\\n{ffffff}San Fierro\\n{ffffff}Las Venturas\", \"Port\", \"Mégse\"); } if(listitem == 1) { ShowPlayerDialog(playerid, falvak, DIALOG_STYLE_LIST, \"Falvak\", \"{ff0000}Fort Carson\\n{ffffff}Falu 2\\n{ffffff}Falu 3\", \"Port\", \"Mégse\"); } if(listitem == 2) { ShowPlayerDialog(playerid, stuntok, DIALOG_STYLE_LIST, \"Stuntok\", \"{0000ff}Stunt City\\n{0000ff}Stunt1\\n{0000ff}Stunt area\", \"Port\", \"Mégse\"); } if(listitem == 3) { ShowPlayerDialog(playerid, driftek, DIALOG_STYLE_LIST, \"Driftek\", \"{ff00ff}Drift world\\n{ff00ff}Drift world 2\\n{ff00ff}Drift\", \"Port\", \"Mégse\"); } } } if(dialogid == varosok) { if(response) { if(listitem == 0) { SetPlayerPos(playerid, 1306.7422, 1267.5371, 10.8203); } if(listitem == 1) { SetPlayerPos(playerid, -1567.6731, -179.2296, 14.1484); } if(listitem == 2) { SetPlayerPos(playerid, 1412.8171, -2435.1362, 13.5766); } } } if(dialogid == falvak) { if(response) { if(listitem == 0) { SetPlayerPos(playerid, 1306.7422, 1267.5371, 10.8203); } if(listitem == 1) { SetPlayerPos(playerid, -1567.6731, -179.2296, 14.1484); } if(listitem == 2) { SetPlayerPos(playerid, 1412.8171, -2435.1362, 13.5766); } } } if(dialogid == stuntok) { if(response) { if(listitem == 0) { SetPlayerPos(playerid, 1306.7422, 1267.5371, 10.8203); } if(listitem == 1) { SetPlayerPos(playerid, -1567.6731, -179.2296, 14.1484); } if(listitem == 2) { SetPlayerPos(playerid, 1412.8171, -2435.1362, 13.5766); } } } if(dialogid == driftek) { if(response) { if(listitem == 0) { SetPlayerPos(playerid, 1306.7422, 1267.5371, 10.8203); } if(listitem == 1) { SetPlayerPos(playerid, -1567.6731, -179.2296, 14.1484); } if(listitem == 2) { SetPlayerPos(playerid, 1412.8171, -2435.1362, 13.5766); } } } return 1;}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]){ if(dialogid == teleport) { if(response) { switch(listitem) { case 0: ShowPlayerDialog(playerid, varosok, DIALOG_STYLE_LIST, \"Városok\", \"{ffffff}Los Santos\\n{ffffff}San Fierro\\n{ffffff}Las Venturas\", \"Port\", \"Mégse\"); case 1: ShowPlayerDialog(playerid, falvak, DIALOG_STYLE_LIST, \"Falvak\", \"{ff0000}Fort Carson\\n{ffffff}Falu 2\\n{ffffff}Falu 3\", \"Port\", \"Mégse\"); case 2: ShowPlayerDialog(playerid, stuntok, DIALOG_STYLE_LIST, \"Stuntok\", \"{0000ff}Stunt City\\n{0000ff}Stunt1\\n{0000ff}Stunt area\", \"Port\", \"Mégse\"); case 3: ShowPlayerDialog(playerid, driftek, DIALOG_STYLE_LIST, \"Driftek\", \"{ff00ff}Drift world\\n{ff00ff}Drift world 2\\n{ff00ff}Drift\", \"Port\", \"Mégse\"); } } } if(dialogid == varosok) { if(response) { if(listitem == 0) SetPlayerPos(playerid, 1306.7422, 1267.5371, 10.8203); if(listitem == 1) SetPlayerPos(playerid, -1567.6731, -179.2296, 14.1484); if(listitem == 2) SetPlayerPos(playerid, 1412.8171, -2435.1362, 13.5766); } } if(dialogid == falvak) { if(response) { if(listitem == 0) SetPlayerPos(playerid, 1306.7422, 1267.5371, 10.8203); if(listitem == 1) SetPlayerPos(playerid, -1567.6731, -179.2296, 14.1484); if(listitem == 2) SetPlayerPos(playerid, 1412.8171, -2435.1362, 13.5766); } } if(dialogid == stuntok) { if(response) { if(listitem == 0) SetPlayerPos(playerid, 1306.7422, 1267.5371, 10.8203); if(listitem == 1) SetPlayerPos(playerid, -1567.6731, -179.2296, 14.1484); if(listitem == 2) SetPlayerPos(playerid, 1412.8171, -2435.1362, 13.5766); } } if(dialogid == driftek) { if(response) { if(listitem == 0) SetPlayerPos(playerid, 1306.7422, 1267.5371, 10.8203); if(listitem == 1) SetPlayerPos(playerid, -1567.6731, -179.2296, 14.1484); if(listitem == 2) SetPlayerPos(playerid, 1412.8171, -2435.1362, 13.5766); } } return 1;}
nemazért,de ez ugyanolyan sz*r...rámegyek a los santosra kidob a stuntokhoz....
Különben nem vetted észre még, hogy mindenhol ugyanaz a 3 koordináta van? Legyen az város, falu, stunt, drift... [/quote]Egyébként LOL, azokat a koordinátákat komolyan gondolta Azt hittem, az csak példa, és tud róla, hogy ugyanolyanok. De ezek szerint nem...
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]){ if(dialogid == teleport) { if(response) { switch(listitem) { case 0: ShowPlayerDialog(playerid, varosok, DIALOG_STYLE_LIST, \"Városok\", \"{ffffff}Los Santos\\n{ffffff}San Fierro\\n{ffffff}Las Venturas\", \"Port\", \"Mégse\"); case 1: ShowPlayerDialog(playerid, falvak, DIALOG_STYLE_LIST, \"Falvak\", \"{ff0000}Fort Carson\\n{ffffff}Falu 2\\n{ffffff}Falu 3\", \"Port\", \"Mégse\"); case 2: ShowPlayerDialog(playerid, stuntok, DIALOG_STYLE_LIST, \"Stuntok\", \"{0000ff}Stunt City\\n{0000ff}Stunt1\\n{0000ff}Stunt area\", \"Port\", \"Mégse\"); case 3: ShowPlayerDialog(playerid, driftek, DIALOG_STYLE_LIST, \"Driftek\", \"{ff00ff}Drift world\\n{ff00ff}Drift world 2\\n{ff00ff}Drift\", \"Port\", \"Mégse\"); } } } if(dialogid == varosok) { if(response) { if(listitem == 0) SetPlayerPos(playerid, 1306.7422, 1267.5371, 10.8203); if(listitem == 1) SetPlayerPos(playerid, -1567.6731, -179.2296, 14.1484); if(listitem == 2) SetPlayerPos(playerid, 1412.8171, -2435.1362, 13.5766); } } if(dialogid == falvak) { if(response) { if(listitem == 0) SetPlayerPos(playerid, 1306.7422, 1267.5371, 10.8203); if(listitem == 1) SetPlayerPos(playerid, -1567.6731, -179.2296, 14.1484); if(listitem == 2) SetPlayerPos(playerid, 1412.8171, -2435.1362, 13.5766); } } if(dialogid == stuntok) { if(response) { if(listitem == 0) SetPlayerPos(playerid, 1306.7422, 1267.5371, 10.8203); if(listitem == 1) SetPlayerPos(playerid, -1567.6731, -179.2296, 14.1484); if(listitem == 2) SetPlayerPos(playerid, 1412.8171, -2435.1362, 13.5766); } } if(dialogid == driftek) { if(response) { if(listitem == 0) SetPlayerPos(playerid, 1306.7422, 1267.5371, 10.8203); if(listitem == 1) SetPlayerPos(playerid, -1567.6731, -179.2296, 14.1484); if(listitem == 2) SetPlayerPos(playerid, 1412.8171, -2435.1362, 13.5766); } } return 1;} Átláthatóbb.Különben nem vetted észre még, hogy mindenhol ugyanaz a 3 koordináta van? Legyen az város, falu, stunt, drift...
if(IsPlayerInAnyVehicle(playerid)){ SetVehiclePos(GetPlayerVehicleID // ... PutPlayerInVehicle // ...}
if(IsPlayerInAnyVehicle(playerid)) { SetVehiclePos(GetPlayerVehicleID(playerid), X, Y, Z);}else{ SetPlayerPos(playerid, X, Y, Z);}
Ránéztem a kódra, és elhánytam magam... :crazy: :sick: Ilyen rondán, és eszméletlenül hibásan nem hagyhatom... Habár nem akartam, de csak azért, hogy kijavítsd, megírtam neked helyesen (ha persze nem írtam el benne semmit)...
Ránéztem a kódra, és elhánytam magam... :crazy: :sick: Ilyen rondán, és eszméletlenül hibásan nem hagyhatom... Habár nem akartam, de csak azért, hogy kijavítsd, megírtam neked helyesen (ha persze nem írtam el benne semmit)... a tied is elég gusztustalan :Cry2:másold be a jelenlegi kódod! [/quote]Az már más kérdés, ha te máshogy programozol, de az enyém legalább rendezett, nem úgy, mint az övé. Amúgy szerintem már megoldotta, ugyanis kint van a [MEGOLDVA] kategória...