
Unknown76
Members-
Posts
135 -
Joined
Everything posted by Unknown76
-
Am modificat, mersi.
-
Asa este, aloca mult mai multa memorie pentru SELECT * FROM table dar daca trebuie sa scrii mai mult de 5 coloane eu zic ca ar fi bine folosirea asterixului. Daca un scripter vrea sa stie ce coloane are un tabel interogheaza baza de date cu "SHOW COLUMNS FROM tabel" in phpMyAdmin sau isi face o resursa in Lua.
-
dbExec este o functie query care nu returneaza un rezultat si executa direct in baza de date. dbQuery este o functie query care returneaza un rezultat dupa apelare. De exemplu daca vrei sa selectezi un caracter din baza de date ai nevoie de returnarea valorilor: Selecteaza caracterele local char = dbQuery ( char_db , "SELECT * FROM characters WHERE account=?", "QuantumZ" ) Pentru a prelucra datele din dbQuery avem nevoie de alte doua functii dbPoll (care insereaza datele in variabile) si dbFree (care elibereaza variabila de date) -- O functie care afiseaza caracterele cu viata <500 local chars = dbQuery ( char_db , "SELECT * FROM characters" ) -- functia returneaza toate caracterele din tabelul characters local result, numrows = dbPoll(chars, -1) -- -1 inseamna sa astepte serverul pana termina de verificat, 0 inseamna instant dar poate da erori si nu recomand if (result and numrows > 0) then -- daca avem un rezultat si numarul de randuri >0 atunci for index, row in pairs(result) do if row['health']<500 then outputChatBox(row['name'].." are mai putin de 500 viata.") end end end dbFree(chars) -- elibereaza conexiunea
-
Golanu, eu nu am nimic cu mine, chiar am fost transparent in tot acest timp si te respect ca pe toti ceilalti, daca vroiai sa ma intrebi (din cate vad din titlu, nici nu prea ai fost explicit) puteai sa-mi trimiti un PM, nu sa creezi atata zarva pe forum. Daca vrei sa faci public gm-ul ramane la atitudinea ta desi nu ar strica un server unic de zombie. Eu nu am pe ce rang sa ma bat, am scris in Section Moderator ca nu-mi doresc sa fiu moderator.
-
De ce iti doresti chiar asa de mult rangul de moderator de recurgi la astfel de manevre? Si mai mult decat atat, eu n-am niciun drept sa decid moderatorul sectiunii.
-
I have checked these forums quite often but never seen that user bandi.
-
Indeed, a trendy theme. I really like how industry has changed, targeting squared and simple designs instead of glossy and rounded ones.
-
Ok, poate m-am cam pripit si nu mi-am dat seama ce inseamna sa portezi LoL-ul in MTA, am decis sa abandonez pentru ca necesita prea multa migala. In schimb am reusit sa extrag un script din proiect si sa-l fac public: https://community.multitheftauto.com/in ... ls&id=7702 .
-
I can't dedicate enough time to the romanian forums so do not count on me. Thanks anyway. I will try to help whenever my time allows it. These are not DailyMail's boards. My opinion is that you contradict yourself. Your first argument tells us that we don't need moderators who master Lua but in your second paragraph you state that players need help, "not the most read topic". How can unskilled moderators help our community? In the end, we should focus on two qualities: strong romanian language skills and expertise in MTASA scripting language. (Sorry to say that but that user, golanu, has some issues with the first one - no offence - just being objective ) Since I have the right to vote, my choice is Axel because he has decent scripting skills, strong romanian, he is the only one I've seen using diacritics on this forum and above all, good organizational abilities and experience in maintaining MTASA servers/communities for longer periods. (Axel reminds me somehow of Arran, the owner of CIT, Arran owns the largest RPG server but still contributes to the community of MTA, same with Axel). Cheers.
-
Haide sa o luam logic. Pasul 1: Trebuie sa conectam scriptul nostru la baza de date SQLite. ( https://wiki.multitheftauto.com/wiki/DbConnect ) Exemplu: = dbConnect( "sqlite", ".db" ) In cazul tau sa luam drept exemplu (atentie daca fisierul char.db nu exista acesta va fi creat automat): char_db = dbConnect( "sqlite", "char.db" ) Ca sa conectezi alta resursa externa la baza de date din resursa ta folosesti: char_db = dbConnect( "sqlite", ":numeleresursei/char.db" ) Pasul 2: Ne gandim cam ce tabele ne-ar trebui pentru character-systems. (Tip: Numele tabelelor in MySQL/SQLite trebuie scrise cu litere mici si sa fie la plural. Acesta este standardul in bazele de date.) Numele tabelului nostru va fi "characters". Acum ne gandim cam ce coloane ar trebui sa aibe acest tabel "characters". Sa vedem, avem nevoie de un PRIMARY KEY (cheie primara) care sa identifce fiecare caracter in parte. Asa ca vom adauga coloana "id" cu AUTOINCREMENT (adica pentru fiecare caracter adaugat numarul "id"-ului se va auto incrementa. Alte coloane pentru sistemul tau de caractere ar putea fi: nume, model (pentru modelul pedului), health (viata), posx, posy, posz (toate acestea pentru salvarea pozitiei) etc. Asta ar fi basic-ul pentru un character systems. Acum urmeaza crearea acestui tabel: function creeazaTabel() local characters = dbExec( char_db, "CREATE TABLE IF NOT EXISTS characters (id INTEGER PRIMARY KEY AUTOINCREMENT, nume CHAR(50) NOT NULL, model INTEGER NOT NULL, health REAL NOT NULL, posx REAL NOT NULL, posy REAL NOT NULL, posz REAL NOT NULL)") end addEventHandler("onResourceStart", getRootElement(getThisResource()), creeazaTabel) INTEGER = numar intreg (stim ca id-ul trebuie sa fie numar intreg, modelele peds-ilor in MTA sunt numere intregi (exemplu: https://wiki.multitheftauto.com/wiki/Character_Skins ) REAL = in MTA nu exista tipul REAL, ci FLOAT sau DOUBLE, din fericire SQLite poate integra in REAL atat float si double. Pozitia caracterlor in MTA si viata este de tip FLOAT. (exemplu 1003.532622) Pasul 3: Functia de inserare a unui nou caracter Ne bazam pe linia asta de cod: dbExec( char_db, "INSERT INTO characters (nume, model, health, posx, posy, posz) VALUES (?,?,?,?,?,?)", numele, model, health, posx, posy, posz ) Pentru a insera caracterul si al spawna la coordonatele 0, 0, 0 pentru inceput folosim: dbExec( char_db, "INSERT INTO characters (nume, model, health, posx, posy, posz) VALUES (?,?,?,?,?,?)", "Tanti Lucica", idmodel, 1000, 0, 0, 0 ) Pasul 4: Cum actualizam detaliile caracterului dupa ce iese de pe server? Folosesti functia UPDATE ( https://wiki.multitheftauto.com/wiki/DbExec ) dbExec( char_db, "UPDATE `??` SET `??`=?", tableName, columnName, columnValue ) Atentie, poate sa contina erori, l-am scris in graba de pe tableta. Daca gasiti vreo greseala anuntati-ma si voi edita postul.
-
Ok, am decis la ce voi lucra. Cred ca imaginea atasata spune tot.
-
Salut, in perioada aceasta am putin timp liber asa ca m-am gandit sa concep un gamemode nou (sau poate un server). Ce gamemode considerati voi ca ar fi ok (fara Race/DD/DM ca sunt mainstream)? *RPG *Roleplay *Zombie Survival/RPG *Ceva nou (poate aveti voi o idee) Sa mai specificati daca vreti ca GM-ul sa fie lansat public sau sa fie server privat in romana sau engleza.
-
https://wiki.multitheftauto.com/wiki/RemoveWorldModel
-
Salut, pentru instalatia de Craciun trebuie sa folosesti Markers de tip "corona" ( https://wiki.multitheftauto.com/wiki/CreateMarker ) si putin scripting pentru jocul de lumini. Pentru globuri gasesti in Map Editor niste obiecte de decor foarte usor si le poti redimensiona cu setObjectScale daca sunt prea mari ( https://wiki.multitheftauto.com/wiki/SetObjectScale ). Iar la capitolul brad presupun ca ai de unde sa alegi in Map Editor. Am aici un exemplu fara instalatie dar destul de dragut (nu este facut de mine ci de un user de pe forumurile SA-MP, eu doar l-am convertit): <map edf:definitions="editor_main"> <meta> <info author='convertFFS.com' version='1.0' name='convertFFS map file' description='Converted by convertFFS' type='map' /> </meta> <object id="convertFFS (0)" model="656" posX="1480.7246090" posY="-1640.0168460" posZ="13.2242760" rotX="0.0000000" rotY="0.0000000" rotZ="0.0000000" dimension="0" interior="0" /> <object id="convertFFS (1)" model="3472" posX="1515.5476070" posY="-1606.0526120" posZ="13.4160350" rotX="0.0000000" rotY="0.0000000" rotZ="0.0000000" dimension="0" interior="0" /> <object id="convertFFS (2)" model="3472" posX="1483.6416020" posY="-1606.1478270" posZ="13.4084590" rotX="0.0000000" rotY="0.0000000" rotZ="0.0000000" dimension="0" interior="0" /> <object id="convertFFS (3)" model="3472" posX="1443.3813480" posY="-1605.8172610" posZ="13.4160350" rotX="0.0000000" rotY="0.0000000" rotZ="0.0000000" dimension="0" interior="0" /> <object id="convertFFS (4)" model="3472" posX="1442.9938960" posY="-1638.0092770" posZ="13.4084580" rotX="0.0000000" rotY="0.0000000" rotZ="0.0000000" dimension="0" interior="0" /> <object id="convertFFS (5)" model="3472" posX="1441.8006590" posY="-1681.5351560" posZ="13.1673060" rotX="0.0000000" rotY="0.0000000" rotZ="0.0000000" dimension="0" interior="0" /> <object id="convertFFS (6)" model="3472" posX="1443.0931400" posY="-1718.3114010" posZ="13.4160350" rotX="0.0000000" rotY="0.0000000" rotZ="0.0000000" dimension="0" interior="0" /> <object id="convertFFS (7)" model="3472" posX="1479.1662600" posY="-1718.9134520" posZ="13.4160350" rotX="0.0000000" rotY="0.0000000" rotZ="0.0000000" dimension="0" interior="0" /> <object id="convertFFS (8)" model="3472" posX="1515.9698490" posY="-1718.5927730" posZ="13.4160350" rotX="0.0000000" rotY="0.0000000" rotZ="0.0000000" dimension="0" interior="0" /> <object id="convertFFS (9)" model="3472" posX="1515.9193120" posY="-1695.3533940" posZ="13.4160350" rotX="0.0000000" rotY="0.0000000" rotZ="0.0000000" dimension="0" interior="0" /> <object id="convertFFS (10)" model="3472" posX="1515.8012700" posY="-1669.4069820" posZ="13.4160350" rotX="0.0000000" rotY="0.0000000" rotZ="0.0000000" dimension="0" interior="0" /> <object id="convertFFS (11)" model="3472" posX="1515.8511960" posY="-1637.0718990" posZ="13.4160350" rotX="0.0000000" rotY="0.0000000" rotZ="0.0000000" dimension="0" interior="0" /> <object id="convertFFS (12)" model="3534" posX="1486.9981690" posY="-1639.9875490" posZ="23.8772200" rotX="0.0000000" rotY="0.0000000" rotZ="0.0000000" dimension="0" interior="0" /> <object id="convertFFS (13)" model="3534" posX="1481.4981690" posY="-1635.1453860" posZ="24.7118970" rotX="0.0000000" rotY="0.0000000" rotZ="0.0000000" dimension="0" interior="0" /> <object id="convertFFS (14)" model="3534" posX="1484.7481690" posY="-1638.5523680" posZ="25.3772160" rotX="0.0000000" rotY="0.0000000" rotZ="0.0000000" dimension="0" interior="0" /> <object id="convertFFS (15)" model="3534" posX="1481.4821780" posY="-1645.1363530" posZ="26.5031170" rotX="0.0000000" rotY="0.0000000" rotZ="0.0000000" dimension="0" interior="0" /> <object id="convertFFS (16)" model="3534" posX="1477.0859380" posY="-1641.0865480" posZ="22.7093450" rotX="0.0000000" rotY="0.0000000" rotZ="0.0000000" dimension="0" interior="0" /> <object id="convertFFS (17)" model="3534" posX="1474.4880370" posY="-1641.0848390" posZ="28.5697170" rotX="0.0000000" rotY="0.0000000" rotZ="0.0000000" dimension="0" interior="0" /> <object id="convertFFS (18)" model="3534" posX="1480.4870610" posY="-1645.3365480" posZ="31.0232120" rotX="0.0000000" rotY="0.0000000" rotZ="0.0000000" dimension="0" interior="0" /> <object id="convertFFS (19)" model="3534" posX="1477.2644040" posY="-1644.3365480" posZ="27.7040440" rotX="0.0000000" rotY="0.0000000" rotZ="0.0000000" dimension="0" interior="0" /> <object id="convertFFS (20)" model="3534" posX="1478.7630620" posY="-1643.4960940" posZ="31.3261600" rotX="0.0000000" rotY="0.0000000" rotZ="0.0000000" dimension="0" interior="0" /> <object id="convertFFS (21)" model="3534" posX="1474.4880370" posY="-1637.8970950" posZ="26.6153850" rotX="0.0000000" rotY="0.0000000" rotZ="0.0000000" dimension="0" interior="0" /> <object id="convertFFS (22)" model="3534" posX="1477.7380370" posY="-1637.2316890" posZ="31.4392320" rotX="0.0000000" rotY="0.0000000" rotZ="0.0000000" dimension="0" interior="0" /> <object id="convertFFS (23)" model="3534" posX="1478.9880370" posY="-1635.5621340" posZ="28.2167550" rotX="0.0000000" rotY="0.0000000" rotZ="0.0000000" dimension="0" interior="0" /> <object id="convertFFS (24)" model="1262" posX="1485.4981690" posY="-1640.3032230" posZ="28.0991820" rotX="0.0000000" rotY="0.0000000" rotZ="292.5000000" dimension="0" interior="0" /> <object id="convertFFS (25)" model="1262" posX="1480.9223630" posY="-1637.3601070" posZ="28.3660130" rotX="0.0000000" rotY="0.0000000" rotZ="0.0000000" dimension="0" interior="0" /> <object id="convertFFS (26)" model="1262" posX="1475.9880370" posY="-1640.2166750" posZ="24.6375120" rotX="0.0000000" rotY="0.0000000" rotZ="67.5000000" dimension="0" interior="0" /> <object id="convertFFS (27)" model="1262" posX="1478.3131100" posY="-1645.0430910" posZ="28.6887490" rotX="0.0000000" rotY="0.0000000" rotZ="135.0000000" dimension="0" interior="0" /> <object id="convertFFS (28)" model="1262" posX="1475.9880370" posY="-1642.3137210" posZ="30.7854190" rotX="0.0000000" rotY="0.0000000" rotZ="117.3473000" dimension="0" interior="0" /> <object id="convertFFS (29)" model="1262" posX="1481.1636960" posY="-1641.0865480" posZ="21.4842700" rotX="0.0000000" rotY="0.0000000" rotZ="184.8473000" dimension="0" interior="0" /> <object id="convertFFS (30)" model="1262" posX="1485.4733890" posY="-1640.0375980" posZ="32.1441800" rotX="0.0000000" rotY="0.0000000" rotZ="306.8785000" dimension="0" interior="0" /> <object id="convertFFS (31)" model="1262" posX="1482.8171390" posY="-1643.4108890" posZ="27.5492710" rotX="0.0000000" rotY="0.0000000" rotZ="228.2058000" dimension="0" interior="0" /> <object id="convertFFS (32)" model="1262" posX="1481.2137450" posY="-1641.0865480" posZ="34.6684110" rotX="0.0000000" rotY="0.0000000" rotZ="228.2058000" dimension="0" interior="0" /> <object id="convertFFS (33)" model="7666" posX="1480.8218990" posY="-1639.9508060" posZ="38.3647990" rotX="0.0000000" rotY="0.0000000" rotZ="0.0000000" dimension="0" interior="0" /> <object id="convertFFS (34)" model="7666" posX="1480.7878420" posY="-1639.9738770" posZ="38.3647990" rotX="0.0000000" rotY="0.0000000" rotZ="264.7660000" dimension="0" interior="0" /> <object id="convertFFS (35)" model="7666" posX="1480.8663330" posY="-1640.0606690" posZ="38.3647990" rotX="0.0000000" rotY="0.0000000" rotZ="231.0161000" dimension="0" interior="0" /> <object id="convertFFS (36)" model="7666" posX="1480.8081050" posY="-1639.9927980" posZ="38.3647990" rotX="0.0000000" rotY="0.0000000" rotZ="326.2500000" dimension="0" interior="0" /> <object id="convertFFS (37)" model="1262" posX="1481.7481690" posY="-1640.7796630" posZ="24.0641880" rotX="0.0000000" rotY="0.0000000" rotZ="191.2501000" dimension="0" interior="0" /> <object id="convertFFS (38)" model="1262" posX="1481.4139400" posY="-1639.6101070" posZ="31.8891050" rotX="0.0000000" rotY="0.0000000" rotZ="326.2500000" dimension="0" interior="0" /> <object id="convertFFS (39)" model="1262" posX="1478.8681640" posY="-1634.6101070" posZ="24.0149000" rotX="0.0000000" rotY="0.0000000" rotZ="33.7500000" dimension="0" interior="0" /> <object id="convertFFS (40)" model="1262" posX="1477.7683110" posY="-1637.3601070" posZ="27.7075940" rotX="0.0000000" rotY="0.0000000" rotZ="48.3604000" dimension="0" interior="0" /> <!-- Objects converted: 41 Vehicles converted: 0 Vehicle models found: 0 ---------------------- In the time this conversion took to finish the US national debt has risen by about $593.49! --> </map> Sarbatori fericite va doresc, QuantumZ
-
Slava tie, eroule! 1. Pe Valhalla scripturile au fost date din libera initiativa celor de la Vedic Gaming deoarece jumatate din comunitate traiau in America de Nord si vroiau sa aibe propriul lor fus orar pe server. Cei de la Vedic Gaming s-au certat si s-au impartit iar in Showdown si naiba mai stie care. 2. Multe contributii au fost facute de catre Mabako la Valhalla Gaming si el mi-a spus pe GTalk ca orice script facut de el este sub Common Rights, precum MTA Paradise. 3. Din cate am observat si am discutat cu Axel pe Skype, baiatul chiar s-a chinuit sa traduca si sa fixeze scripturile. 4. Acolo ai si cateva scripturi & modificari facute de mine, asa ca nu ti-am dat dreptul sa le publici. 5. Esti cumva vreun calator astral ce trebuia sa schimbe cursul omenirii prin fisierele postate? Determinism? Poate te va ajuta: http://en.wikipedia.org/wiki/Down_syndromeEDIT: 6. Ai incalcat regulamentul forumului (o parte din creditele pentru script apartin lui Axel si l-ai postat fara acordul lui).
-
Scrie openports in consola si vezi daca portul pentru download este deschis.
-
This code will help with the connection between IP.Board forum platform and your MTA server. In fact, when a player registers on the MTA server, this script will automatically create a forum account with the same username and password. All you need is PHP SDK (for more info, there is a tutorial in this section about PHP SDK), a IP Board forum and a MTA server. First step: download PHP SDK from the wiki or from the tutorial provided in this section Second step: create a new folder at this path ipb-forum-root/admin/sources/base/ called sdk and extract everything from php sdk archive to it Third step: create a new PHP file called mtaforum.php in ipb-forum-root/admin/sources/base/ and add this piece of code to the file: <?php //By QuantumZ require( "../../../initdata.php"); //we need to include this because ipsRegistry requires it include( "sdk/mta_sdk.php" ); //the sdk is a must require( "ipsRegistry.php" ); //this will give us the functions to modify things in the forum platform ipsRegistry::init(); $input = mta::getInput(); // $input[0] is username, $input[1] is password, $input[2] is e-mail mta::doReturn($input[0]); //$passSalt = IPSMember::generatePasswordSalt(5); //$passCompiled = IPSMember::generateCompiledPasshash($passSalt, md5($input[1])); $user = IPSMember::create( array( 'core' => array( 'email' => $input[2], 'password' => $input[1], 'name' => $input[0], 'members_display_name' => $input[0] ) ) ); ?> Fourth step: Now we finshed with the web-based things let's go to our MTA server and add this in our Register function: callRemote("http://FORUM ADRESS/admin/sources/base/mtaforum.php", inReturn,username, password, mail) Fifth step: Add this in the same .lua as the callRemote to ouput in console whenever somebody will create a forum account: function inReturn(name) outputDebugString("[FORUM] " ..tostring(name).. " registered.") end Sixth step: Profit.
-
Poate gamemode-ul foloseste baza de date MySQL?! Esti sigur ca ai instalat tot ce trebuie?
-
Habar nu am de gamemode-ul Fort Carson Roleplay (nici pe comunitate nu-l gasesc). Presupun ca este un script gen vG iar daca esti inceptor iti spun de acum sa nu te aventurezi in scripturi complexe.
-
Modurile un vin impreuna cu kit-ul de instalare de la MTA. Ele sunt adaugate de administratorii serverelor prin scripting iar in functie de server tu vei descarca acele moduri cand dai join.
-
viewtopic.php?f=115&t=47324
-
https://wiki.multitheftauto.com/wiki/EngineImportTXD Pentru texturi, exemplul 3 din acel link.
-
1. Placa video este destul de veche 2. Poate fi de la VSync, incearca sa dezactivezi optiunea VSync din Settings (Video tab parca). 3. Optimizare: Seteaza totul pe Low din video settings, dezactiveaza Volumetric Shadows si Grass Effect si micsoreaza rezolutia.
-
Shadow functions already exist in MTA as user settings. Server owners shouldn't be allowed to manipulate shadows because some users may encounter fps drop or other issues.
-
Te referi la skin-urile speciale adaugate in versiunea 1.1 sau cele custom made? Daca le cauti pe cele speciale ai lista id-urilor aici: https://wiki.multitheftauto.com/wiki/Special_Skins_Page