#include <a_samp>#include <dini>new bool:update[MAX_PLAYERS] = true;new kuldik;#include \"functions.pwn\"main(){} newKalandLista[4][] ={\"Segítség, hol vagyok?\",\"Eltûnt a kocsim! \" ,\"Az egy UFO volt?\",\"Eredj utána, de gyorsan!\"},Kaland[768];public OnGameModeInit(){SetGameModeText(\"Adventure\");for(new i; i < sizeof(KalandLista); ++i){strcat(Kaland, KalandLista);strcat(Kaland, \"\\n\");}kuldik = sizeof KalandLista;printf(\"Küldetések száma: %d\", kuldik);return 1;}public OnGameModeExit(){return 1;}public OnPlayerRequestClass(playerid, classid){ Textdraw1[playerid] = TextDrawCreate(11.000000, 429.000000, FixGameString(\"Mód verzió: 1.203!\"));TextDrawBackgroundColor(Textdraw1[playerid], 255);TextDrawFont(Textdraw1[playerid], 1);TextDrawLetterSize(Textdraw1[playerid], 0.219999, 1.100000);TextDrawColor(Textdraw1[playerid], -16776961);TextDrawSetOutline(Textdraw1[playerid], 0);TextDrawSetProportional(Textdraw1[playerid], 1);TextDrawSetShadow(Textdraw1[playerid], 1);TextDrawUseBox(Textdraw1[playerid], 1);TextDrawBoxColor(Textdraw1[playerid], 255);TextDrawTextSize(Textdraw1[playerid], 676.000000, 83.000000); TextDrawShowForPlayer(playerid, Textdraw1[playerid]);ShowPlayerDialog(playerid, 10000, DIALOG_STYLE_LIST, \"Válassz kalandot! \", Kaland, \"Mehet!\", \"\");return 1;}public OnPlayerConnect(playerid){ select[playerid] = 0;return 1;}public OnPlayerDisconnect(playerid, reason){return 1;}public OnPlayerSpawn(playerid){return 1;}public OnPlayerDeath(playerid, killerid, reason){return 1;}public OnVehicleSpawn(vehicleid){return 1;}public OnVehicleDeath(vehicleid, killerid){return 1;}public OnPlayerText(playerid, text[]){return 1;}public OnPlayerCommandText(playerid, cmdtext[]){//ShowPlayerDialog(playerid,1010,2,\"Sztori kezelése\",\"Sztori létrehozás\",\"Oké\",\"\");if (strcmp(\"/restart\", cmdtext, true) == 0){StartKaland(playerid, GetKaland(playerid));return 1;}if (strcmp(\"/d\", cmdtext, true) == 0){new asd[30];format(asd, sizeof asd, \"%d\", dialogkell[playerid]);msg(playerid, asd);return 1;}return 0;}public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger){return 1;}public OnPlayerExitVehicle(playerid, vehicleid){return 1;}public OnPlayerStateChange(playerid, newstate, oldstate){return 1;}public OnPlayerEnterCheckpoint(playerid){return 1;}public OnPlayerLeaveCheckpoint(playerid){return 1;}public OnPlayerEnterRaceCheckpoint(playerid){return 1;}public OnPlayerLeaveRaceCheckpoint(playerid){return 1;}public OnRconCommand(cmd[]){return 1;}public OnPlayerRequestSpawn(playerid){return 1;}public OnObjectMoved(objectid){return 1;}public OnPlayerObjectMoved(playerid, objectid){return 1;}public OnPlayerPickUpPickup(playerid, pickupid){return 1;}public OnVehicleMod(playerid, vehicleid, componentid){return 1;}public OnVehiclePaintjob(playerid, vehicleid, paintjobid){return 1;}public OnVehicleRespray(playerid, vehicleid, color1, color2){return 1;}public OnPlayerSelectedMenuRow(playerid, row){return 1;}public OnPlayerExitedMenu(playerid){return 1;}public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid){return 1;}public OnPlayerKeyStateChange(playerid, newkeys, oldkeys){return 1;}public OnRconLoginAttempt(ip[], password[], success){return 1;} public OnPlayerUpdate(playerid){ if(update[playerid] == true){ new fajl[64], cpIDstr[32], cpTEXT[64], rPOS[5][64], selectTEXT[256], cutselect[3][64], sel[64], tort_S[64], tort_F[512];format(fajl, sizeof fajl, \"kalandok/%d.txt\", GetKaland(playerid));format(cpIDstr, sizeof cpIDstr, \"range(%d)(%d)\", kuldiid[playerid]-1, select[playerid]);format(cpTEXT, sizeof cpTEXT, \"%s\", dini_Get(fajl, cpIDstr));split(dini_Get(fajl, cpIDstr), rPOS, \',\');if(IsPlayerInRangeOfPoint(playerid, 3.00, floatstr(rPOS[0]), floatstr(rPOS[1]), floatstr(rPOS[2]))){ if(dialogkell[playerid] == false) { if(strval(rPOS[4]) == 0) { format(tort_S, sizeof tort_S, \"tortenet(%d)\", kuldiid[playerid]); format(tort_F, sizeof tort_F, \"%s\", dini_Get(fajl, tort_S)); dialogkellU[playerid] = false; ShowPlayerDialog(playerid, kuldiid[playerid], 0, \"Történet\", tort_F, \"Oké\", \"\"); update[playerid] = false; } } else { if(strval(rPOS[4]) == 1) { //dialogkell[playerid] = false; format(sel, sizeof sel, \"select(%d)\", kuldiid[playerid]); split(dini_Get(fajl, sel), cutselect, \',\'); format(selectTEXT, sizeof selectTEXT, \"%s\\n%s\\n%s\", cutselect[0], cutselect[1], cutselect[2] ); dialogkellU[playerid] = true; ShowPlayerDialog(playerid, kuldiid[playerid], 2, \"Válassz!\", selectTEXT, \"Oké\", \"\"); update[playerid] = false; } }}}return 1;}public OnPlayerStreamIn(playerid, forplayerid){return 1;}public OnPlayerStreamOut(playerid, forplayerid){return 1;}public OnVehicleStreamIn(vehicleid, forplayerid){return 1;}public OnVehicleStreamOut(vehicleid, forplayerid){return 1;}#define kuldi 2020public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]){if(response){ switch(dialogid) { case 10000: { if(0 <= listitem < sizeof(KalandLista)) { SetPVarInt(playerid, \"KalandID\", listitem); static szStr[128]; if(!listitem) { format(szStr, sizeof(szStr), \"[iNFO] Kiválasztott kaland: %s\", KalandLista[listitem]); SendClientMessage(playerid, 0xFFFFFFFF, szStr); StartKaland(playerid, listitem); } else { format(szStr, sizeof(szStr), \"[iNFO] Kiválasztott kaland: %s\", KalandLista[listitem]); SendClientMessage(playerid, 0xFFFFFFFF, szStr); StartKaland(playerid, listitem); } } } /* case 1010: { if(response) { if(listitem==0) //Küldetés létrehozása { ShowPlayerDialog(playerid,1010+1,0,\"Sztori létrehozása\",\"Ez legyen a sztoridnak a pozíciója?\",\"Igen\",\"Nem\"); } } else ShowPlayerDialog(playerid,1010,2,\"Sztori kezelése\",\"Sztori létrehozás\",\"Oké\",\"\"); } case 1011: //Létrehozás { kuldik++; new Float:X, Float:Y, Float:Z, Float:A ; new kuldetesid[64]; format(kuldetesid, sizeof kuldetesid, \"kalandok/%d.txt\", kuldik); dini_Create(kuldetesid); GetPlayerFacingAngle(playerid, A); GetPlayerPos(playerid, X, Y, Z); new f[64]; format(f, sizeof f, \"%f,%f,%f,%f\", X, Y, Z, A); dini_Set(kuldetesid, \"spawnpos\", f); ShowPlayerDialog(playerid,1010+2,0,\"Sztori létrehozása\",\"Add meg a küldetésed címét:\",\"Oké\",\"\"); } case 1012: { new kuldetesid[64]; format(kuldetesid, sizeof kuldetesid, \"kalandok/%d.txt\", kuldik); dini_Set(kuldetesid, \"Cím\", inputtext); msg(playerid, \"/k <szöveg> <CPKell-e> - így tudsz létrehozni szöveget az adott helyen\"); }*/}}if(dialogid == kuldiid[playerid] && response){ if(dialogkellU[playerid] == true) { switch(listitem) { case 0: { select[playerid]=0; NextKuldi(playerid); msg(playerid, \"NextKüldi elküdve0\"); } case 1: { select[playerid]=1; NextKuldi(playerid); msg(playerid, \"NextKüldi elküdve1\"); } case 2: { select[playerid]=2; NextKuldi(playerid); msg(playerid, \"NextKüldi elküdve2\"); } }}else{ select[playerid] = 0; NextKuldi(playerid);}}return 1;}public OnPlayerClickPlayer(playerid, clickedplayerid, source){return 1;}
Nem nekem kell, hanem a szabályzatnak... De ha már ennyit \"fáradtál\" vele, beleírtam + még az elõtagot is kiraktam :DD
Ma nem, de holnap tesztelem, szépnek tûnik! Grat.