#include <a_samp>#define SelectCity 5000publicOnPlayerRequestSpawn(playerid) { ShowPlayerDialog(playerid, SelectCity, DIALOG_STYLE_LIST, \"Spawn kiválasztása\", \"Los Santos\\nSan Fierro\\nLas Venturas\\nstb...\\n\", \"Go\", \"Bezár\" return 1;}publicOnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) {if(dialogid == SelectCity){ if(response) { if(listitem == 0) SetPlayerPos(playerid, x, y, z); if(listitem == 1) SetPlayerPos(playerid, x, y, z); if(listitem == 2) SetPlayerPos(playerid, x, y, z); //if(listitem == 3) SetPlayerPos(playerid, x, y, z); }} return 1;}
Ez az eggyik alap gm-be benne van, még kamera mozgással is, de ha dialogba szeretnéd akkor: #include <a_samp> #define SelectCity 5000 public OnPlayerRequestSpawn(playerid) { ShowPlayerDialog(playerid, SelectCity, DIALOG_STYLE_LIST, \"Spawn kiválasztása\", \"Los Santos\\nSan Fierro\\nLas Venturas\\nstb...\\n\", \"Go\", \"Bezár\" return 1; } public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) { if(dialogid == SelectCity) { if(response) { if(listitem == 0) SetPlayerPos(playerid, x, y, z); if(listitem == 1) SetPlayerPos(playerid, x, y, z); if(listitem == 2) SetPlayerPos(playerid, x, y, z); //if(listitem == 3) SetPlayerPos(playerid, x, y, z); } } return 1; } [/quote]d eneki szerintem uugy kell h elmetse és ne kérdezze le minden spawnál!
#include <a_samp> #define SelectCity 5000 public OnPlayerRequestSpawn(playerid) { ShowPlayerDialog(playerid, SelectCity, DIALOG_STYLE_LIST, \"Spawn kiválasztása\", \"Los Santos\\nSan Fierro\\nLas Venturas\\nstb...\\n\", \"Go\", \"Bezár\" return 1; } public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) { if(dialogid == SelectCity) { if(response) { if(listitem == 0) SetPlayerPos(playerid, x, y, z); if(listitem == 1) SetPlayerPos(playerid, x, y, z); if(listitem == 2) SetPlayerPos(playerid, x, y, z); //if(listitem == 3) SetPlayerPos(playerid, x, y, z); } } return 1; }
#include <a_samp>#define SelectCity 5000new asd[MAX_PLAYERS];public OnPlayerRequestSpawn(playerid) {if(asd[playerid] == 0){ShowPlayerDialog(playerid, SelectCity, DIALOG_STYLE_LIST, \"Spawn kiválasztása\", \"Los Santos\\nSan Fierro\\nLas Venturas\\nstb...\\n\", \"Go\", \"Bezár\");} return 1;}public OnPlayerConnect(playerid) return asd[playerid] = 0;public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) {if(dialogid == SelectCity){ if(response) { asd[playerid] = 1; if(listitem == 0) SetPlayerPos(playerid, 0, 0, 0);// 0, 0, 0 hjelyére a koordinátákat. if(listitem == 1) SetPlayerPos(playerid, 0, 0, 0);// 0, 0, 0 hjelyére a koordinátákat. if(listitem == 2) SetPlayerPos(playerid, 0, 0, 0);// 0, 0, 0 hjelyére a koordinátákat. //if(listitem == 3) SetPlayerPos(playerid, 0, 0, 0);// 0, 0, 0 hjelyére a koordinátákat. }}return 1;}
new spawnhely[MAX_PLAYERS];new file[100];
spawnhely[playerid] = 0;
Kód: [Kijelölés] if(listitem == 0) SetPlayerPos(playerid, ide), spawnhely[playerid] = 1; if(listitem == 1) SetPlayerPos(playerid, oda), spawnhely[playerid] = 2; if(listitem == 2) SetPlayerPos(playerid, amoda), spawnhely[playerid] = 1;
if(listitem == 0) SetPlayerPos(playerid, ide), spawnhely[playerid] = 1; if(listitem == 1) SetPlayerPos(playerid, oda), spawnhely[playerid] = 2; if(listitem == 2) SetPlayerPos(playerid, amoda), spawnhely[playerid] = 1;
if(!dini_Exists(file)) {dini_Create(file);dini_IntSet(file, \"SpawnHely\", spawnhely[playerid]);} else if(dini_Exists(file)) {spawnhely[playerid] = dini_Int(file, \"SpawnHely\");}
if(spawnhely[playerid] == 0) //Ha meg nincs neki spawnhelyeShowPlayerDialog(...)// Spawnivalasztasi Dialogelse if(spawnhely[playerid] == 1) SetPlayerPos(ide);else if(spawnhely[playerid == 2) SetPlayerPos(oda);else if(spawnhely[playerid] == 3) SetPlayerPos(mashova);
Nem teszteltem: #include <a_samp>#define SelectCity 5000new asd[MAX_PLAYERS];public OnPlayerRequestSpawn(playerid) {if(asd[playerid] == 0){ShowPlayerDialog(playerid, SelectCity, DIALOG_STYLE_LIST, \"Spawn kiválasztása\", \"Los Santos\\nSan Fierro\\nLas Venturas\\nstb...\\n\", \"Go\", \"Bezár\");} return 1;}public OnPlayerConnect(playerid) return asd[playerid] = 0;public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) {if(dialogid == SelectCity){ if(response) { asd[playerid] = 1; if(listitem == 0) SetPlayerPos(playerid, 0, 0, 0);// 0, 0, 0 hjelyére a koordinátákat. if(listitem == 1) SetPlayerPos(playerid, 0, 0, 0);// 0, 0, 0 hjelyére a koordinátákat. if(listitem == 2) SetPlayerPos(playerid, 0, 0, 0);// 0, 0, 0 hjelyére a koordinátákat. //if(listitem == 3) SetPlayerPos(playerid, 0, 0, 0);// 0, 0, 0 hjelyére a koordinátákat. }}return 1;} [/quote]
new name[MAX_PLAYER_NAME];GetPlayerName(playeridm name, sizeof name);De akkor még ez is hiányzik hogy: format(file, sizeof file, \"Mappa/%d\"name);De szerintem feleslegese lementeni, szóval: Nem teszteltem: #include <a_samp>#define SelectCity 5000new asd[MAX_PLAYERS];public OnPlayerRequestSpawn(playerid) {if(asd[playerid] == 0){ShowPlayerDialog(playerid, SelectCity, DIALOG_STYLE_LIST, \"Spawn kiválasztása\", \"Los Santos\\nSan Fierro\\nLas Venturas\\nstb...\\n\", \"Go\", \"Bezár\");} return 1;}public OnPlayerConnect(playerid) return asd[playerid] = 0;public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) {if(dialogid == SelectCity){ if(response) { asd[playerid] = 1; if(listitem == 0) SetPlayerPos(playerid, 0, 0, 0);// 0, 0, 0 hjelyére a koordinátákat. if(listitem == 1) SetPlayerPos(playerid, 0, 0, 0);// 0, 0, 0 hjelyére a koordinátákat. if(listitem == 2) SetPlayerPos(playerid, 0, 0, 0);// 0, 0, 0 hjelyére a koordinátákat. //if(listitem == 3) SetPlayerPos(playerid, 0, 0, 0);// 0, 0, 0 hjelyére a koordinátákat. }}return 1;} Igen nem kell lementeni Köszi!^^[/quote]
Nem teszteltem: #include <a_samp>#define SelectCity 5000new asd[MAX_PLAYERS];public OnPlayerRequestSpawn(playerid) {if(asd[playerid] == 0){ShowPlayerDialog(playerid, SelectCity, DIALOG_STYLE_LIST, \"Spawn kiválasztása\", \"Los Santos\\nSan Fierro\\nLas Venturas\\nstb...\\n\", \"Go\", \"Bezár\");} return 1;}public OnPlayerConnect(playerid) return asd[playerid] = 0;public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) {if(dialogid == SelectCity){ if(response) { asd[playerid] = 1; if(listitem == 0) SetPlayerPos(playerid, 0, 0, 0);// 0, 0, 0 hjelyére a koordinátákat. if(listitem == 1) SetPlayerPos(playerid, 0, 0, 0);// 0, 0, 0 hjelyére a koordinátákat. if(listitem == 2) SetPlayerPos(playerid, 0, 0, 0);// 0, 0, 0 hjelyére a koordinátákat. //if(listitem == 3) SetPlayerPos(playerid, 0, 0, 0);// 0, 0, 0 hjelyére a koordinátákat. }}return 1;}