Jump to content

crismar

Members
  • Posts

    263
  • Joined

  • Last visited

Everything posted by crismar

  1. When I click on a button it works fine, but when I click inside the GUI Window the action from the nearest button is triggered (or well, something like that). Can you explain my why is that ?
  2. Howdy! I'm building a UCP and I've a strange problem. My script is something like this: addEventHandler("onClientGUIClick", modifyAccount, function() local thePlayer = localPlayer triggerServerEvent("getDetails", root) end) ^ The first part works fine, the server gets the right details and outputs the correct results, the problem is it outputs them to EVERYONE, meaning if one clicks the respective button, entire server will be shown the GUI. The server event is here: function getTheirDetails() local ucpMail = getAccountData(getPlayerAccount(client), "ucpMail") or "E-Mailul acestui cont nu a fost setat!" local ucpUser = getAccountName(getPlayerAccount(client)) or "Nu esti logat!" triggerClientEvent("onResults", root, ucpMail, ucpUser) end addEvent("getDetails", true) addEventHandler("getDetails", root, getTheirDetails) I want to know how to triggerClientEvent back to the 'client' ? I tried getPlayerFromName and triggerClientEvent("onResults", client, ucpMail, ucpUser) but it didn't work.
  3. Ti-ai facut roleplay si nu stii sa faci o poarta ?... createObject moveObject addEventHandler
  4. Prea putini Joshua. Cat despre DayZ, probabil ai dreptate. Cunostintele mele de LUA NU imi permit momentan sa scriptez pentru un server de RP sau macar sa inteleg cum functioneaza un mod de RP find foarte complex. Pot sa-mi fac oricand server de RP, privat, doar pentru mine ca sa retraiesc niste vremuri trecute dar in niciun caz nu as indrazni sa pornesc o comunitate pe care n-as putea-o stapani.
  5. Din romani, engleza. Mda, stii ca e posibil, dar mai stii ceva ? Englezii deja isi au jucatorii lor 'loiali' ca sa zic asa, n-o sa plece jucatorul X de pe un server sa vina pe al tau, care abea e deschis, si sa-si piarda munca. Plus ca, romanii n-au o imagine tocmai roz pe MTA.
  6. Toti vreti RP si nu inteleg de ce. RPul serios n-o sa-l faceti cu romanii. Degeaba e un owner serios care isi da silinta, romanul nu intra sa faca RP, intra pt case, masini, grade, bani si 'jmecherie'. Mi-e rusine de situatia curent, ajung sa intru pe servere romanesti, cand n-am ce face si dau de: - admini agramati - jucatori si mai agramati - owner arogant - nici macar o traducere la script daca tot vor sa fie server romanesc. Intr-un cuvant: patetic.
  7. Vedic e un ripoff de la Valhalla, nu-l recomandd. Deja avem un server de RP in dezvoltare, nu e nevoie de inca unul...
  8. Stii care-i faza ? Sunt asa de multe server de RP, toate cu administratori care habar n-au ce e RPul si care au fost setati doar ca ownerul sa aiba si el 3 playeri pe server mi se pare absurd... Mihailescu nu are RP, Mihailescu e un server pe care daca te rogi suficient de admin primesti o masina fara probleme. Romanu' nu-i facut pt RP, de fapt, Romanu' nu-i facut pentru admin pe vreun server. Putini sunt maturi, si daca sunt, sigur nu merg pe Mihailescu.
  9. crismar

    dxDraw Help

    YEs, I've read an entire philosophy about dxDraw and how their are just pixels and our mind tricks us and stuff but I'm curious. If guiCreate has relative and absolute positionning, and same GUI looks the same across all resolutions, isn't it possible at all to make dxDrawed text also relative/absolute? In short: I have a money system and it uses dxDraw and I have positioned money right under time (normal GtA SA hud component time), and now it simply doesn't show up/position well in some resolutions. For instance: in 1024x768 - Looks perfect 800x600 - Doesn't even show up 1920x1080 (or well, higher then 1280x1024) - Shows somewhere in the left of the current weapon hud component. I don't want that. Could you help me up ?
  10. Daca tot posteaza lumea resurse am decis sa va arat si eu unul din scripturile disponibile pe serverul meu, anume panoul de crafting. Permite constructia unui set destul de mare de iteme si este atat in romana cat si in engleza. Butonul 'Construieste' este disponibil doar cand jucatorul are materialele necesare. Am rezolvat toate bugurile (si cel in care daca apesi foarte repede pe buton primesti itemul de mai multe ori dar dai materialele doar odata).
  11. crismar

    RomaniaZ

    Domeniu achizitionat! http://romaniaz.net/
  12. crismar

    RomaniaZ

    Cine suntem? RomaniaZ este o comunitate înfinţată pe 13 Martie 2014, si are ca scop promovarea gamemodului DayZ cu sisteme originale, respectand limitele legale impuse de comunitatea VaveGames. De ce noi? Spre deosebire de alte comunităţi atât internaţionale dar si româneşti, serverul nostru respectă munca fostei comunitaţi VaveGames, folosind astfel ultima versiune lansata de ei fară a folosi influente de la versiunile decompilate ilegale. Totodata, ne mândrim cu faptul că ne creem propriile scripturi şi resurse, şi cel mai important, încercăm pe cât se poate sa NU le permitem accesul pe server acelor jucători care au ca scop clar distrugerea amuzamentului celorlalţi. Ce oferă serverul? Un medium realist de supravieţuire cu o oarecare tentă de roleplay; Un sistem avansat de asistenţă ce ne permite sa ne distribuim atenţia către toţi jucatorii; Un sistem de crafting realizat special pentru a permite crearea de iteme; Prezenţa banilor pe server putând achiziţiona diverse obiecte; Un echilibru între jucătorii noi si cei vechi: zone non PvP cu iteme ce pot constitui un echipament bun pentru începutul jocului pe server; Zone radioactive realizate special de către echipa noastră pentru a spori realismul scenariului în care este plasat serverul; Modificări (într-un număr restrâns - ne mândrim cu scriptul nu cu modurile altora); Updateuri si bugfixuri frecvente; Influente RPG precum un sistem de nivele/bani creat de noi; Un UCP unde jucatorii isi vor putea administra contul si unde isi vor putea vedea statisticile de cand joaca pe server; Sisteme dinamice cum ar fi zone de protectie pentru baze (aparendu-ne astfel de ModSADb); Un sistem administrativ care consta in peste 100 de comenzi create integral de noi; Un sistem de notificari situat deasupra radarului care va va infoma in legatura cu statutul de supravietuire (pierderi de sange, nevoie de hrana, sugestii si sfaturi pentru sporirea duratei de viata); Un sistem de inventar secundar implementat, alaturi de iteme noi cu diferite atribute (efecte vizuale, viteza jocului, gravitatia, controlul jucatorului etc.) cat si iteme precum lasere, franghii (posibilitatea de a lega un jucator), explozibili de diferite tipuri and so on; Si multe altele! Pe langa toate acestea, pe server se lucreaza la un sistem de misiuni inspirat din RPGurile deja cunoscute care va avea ca scop diversificarea jocului si crearea unui scop secundar pe langa supravietuirea intalnita pe toate server. Se lucreaza de asemenea la un market unde jucatorii vor putea face comert cu iteme intr-un mediu protejat. Acest lucru se va baza in mare parte pe troc si va avea ca scop sporirea interactiunii non-PvP dintre jucatori. Serverului prezinta multe alte scripturi si functii unice precum un sistem de eventuri, un sistem anti-cheat extrem de bine pus la punct (care protejeaza impotriva multiplicatului, hackurilor de sange si a floodurillor din chat - am observat ca exista un programel care pune 20 000 mesaje in chat in mai putin de 1 minut ducand astfel la blocarea serverului). Suntem constienti ca multe din functii deviaza mai mult sau mai putin de la supravietuire catre un mod RPG, astfel serverul constituite ce imi place mie sa numesc un 'DayZ-RPG'. Recent am inceput sa compilez -TOATE- scripturile dupa o lovitura venita de la una din persoanele la care nu ma asteptam, anume un alt server de DayZ a decis sa-mi fure efectiv client-sideurile de pe server si sa le foloseasca, desigur fara un efect prea mare, pe langa acela ca serverul -Arata- la fel ca al meu. In prezent comunitatea s-a dezvoltat pe toate planurile, numarand pana in prezent 500 utilizatori activi pe forum, o medie de jucatori de 40-50 zilnic in functie de momentul zilei, cu un record de 84 jucatori, si o existenta de aproximativ 5 luni. SITE: http://romaniaz.net/ TEAMSPEAK3: ts.romaniaz.net Sunt dispus sa accept scripteri pe server cu un nivel de experienta mai ridicat decat al meu.
  13. How to obtain that blurred background?
  14. When you try /svp does it output anything in the chat ? Did you copy the internal.db file as written in the instructions ? What MTA DayZ version are you using ?
  15. I'm creating my own admin system, it all works perfectly so far, I got most of the commands working but I have a problem. I don't want to make use of the 'Admin' group that comes with MTA for multiple reasons (I've set groups for each admin level). Yet, I was unable to find command.whowas or something similar in ACL. How can I assign this command to another ACL group (other then Admin and Console) ? Or ugh, is there a function/resource that does this ?
  16. Te pot ajuta si eu. Daca vrei sa vezi cam ce pot eu sa fac in LUA imi poti da PM pe Skype sau pur si simplu poti intra pe serverul meu.
  17. Is there a event handler for MemoBox that gets triggered when someone types in it ? Something like 'onMemoBoxType' ? Searched but couldn't find any, would be usefull for my script since I want to count characters and I'm using a timer at the moment, though I think it'd be more professional to use a event handler for it. Also, another question, does LUA have a function like PHP to shrink a string ? More exactly, say I have a 300 characters long string. In PHP you could substr(string, 100) to get first characters and so on. In short I'm develping a report panel and I want to limit it's characters to 300 (did that already), but I want to output it in chatbox in sequences of 100 characters. Could you tell me the function ?
  18. Am jucat pe vG din 2010 pana cand a devenit rG si s-a inchis. O sa va fac o vizita, nu de alta dar vreau sa imi potolesc nostalgia fata de GMul vG.
  19. I've seen in some scripts some sort of: setElementData(thePlayer, "Thingy", +1) Tried that but didn't get it to work, is it possible or I just have a bad memory ? At the moment I'm using an additional variable to store the oldValue with getElementData then do setElementData(thePlayer, "Thingy", oldValue + 1) Ideas ?
  20. Howdy, I have this function (trying to make a crafting system for MTA DaYz from scratch) and I want to check if the player has the necessary materials. The problem is: initially, getElementData returned 'false' (boolean) if the player didn't have the item. Now, I used 'tonumber' and it returns 'nil'. Is it possible to convert 'nil' or 'false' to a integer value (0) ? function craftCheck(thePlayer) local craftPickX, craftPickY = guiGridListGetSelectedItem(craftItems) if craftPickX == 0 then guiSetEnabled(craftGo, false) guiSetText(craftReq, "- Lee Enfield [x1]\n- Empty Soda Cans [x3]") guiSetText(craftName, "Item: CZ-550") guiSetText(craftQ, "Cantitate: 1") if tonumber(getElementData(thePlayer, "Lee Enfield")) >= 1 and tonumber(getElementData(thePlayer, "Empty Soda Cans")) >= 3 then guiSetEnabled(craftGo, true) end end end Debugscript keeps returning this error: attempt to compare number with nil On this line: if tonumber(getElementData(thePlayer, "Lee Enfield")) >= 1 and tonumber(getElementData(thePlayer, "Empty Soda Cans")) >= 3 then Ideas ?
  21. I want to make a crafting system, and to avoid wasting time of making 2 separate checks, I want to make it so if the conditions aren't met, the 'craft' button gets disabled. I don't need the script, I only want to know the function name (since I couldn't find it)
  22. Nevermind, figured out by myself, guiGridListGetSelectedItem returns row and column. also so the script was supposed to have: local row, column = guiGridListGetSelectedItem(craftItems) And the local was to be placed in the craftCheck function. Posted if anyone encounters the same problem.
  23. function craftPanel() craft = guiCreateWindow(243, 296, 526, 241, "Panoul de Constructie", false) guiWindowSetSizable(craft, false) guiSetVisible(craft, false) craftItems = guiCreateGridList(9, 27, 144, 204, false, craft) guiGridListSetScrollBars(craftItems, false, false) guiGridListAddColumn(craftItems, "Item", 0.9) guiGridListAddRow(craftItems) guiGridListSetItemText(craftItems, 0, 1, "CZ-550", false, false) craftReq = guiCreateMemo(163, 79, 354, 90, "", false, craft) craftName = guiCreateLabel(163, 27, 354, 17, "Item:", false, craft) guiSetFont(craftName, "default-bold-small") craftQ = guiCreateLabel(163, 44, 354, 17, "Cantitate:", false, craft) guiSetFont(craftQ, "default-bold-small") craftUseless = guiCreateLabel(163, 61, 354, 17, "Materiale Necesare:", false, craft) guiSetFont(craftUseless, "default-bold-small") guiLabelSetColor(craftUseless, 255, 0, 0) craftGo = guiCreateButton(343, 177, 174, 54, "Construieste", false, craft) guiSetFont(craftGo, "default-bold-small") guiSetProperty(craftGo, "NormalTextColour", "FF00FF00") craftNote = guiCreateLabel(165, 175, 168, 56, "- Nu oferim materiale inapoi;\n- Sansa de succes la constructie este de 40%!", false, craft) guiSetFont(craftNote, "default-bold-small") guiLabelSetHorizontalAlign(craftNote, "left", true) local craftPick = guiGridListGetSelectedItem(craftItems) addEventHandler("onClientGUIClick", craftGo, craftCheck) end addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), craftPanel) function showMenu() if guiGetVisible(craft) == true then guiSetVisible(craft, false) showCursor(false) else guiSetVisible(craft, true) showCursor(true) end end addCommandHandler("craft", showMenu, false) function craftCheck() outputChatBox(craftPick) end Howdy, I have this GUI, basically I want to make a crafting system. I managed to pull it around with commands really quick, but I thought it's time to take advantage of MTA GUIs... then I had a nasty surprise, even simplest stuffs became hard I'm at the moment stuck with getting the value of a selected row. What I want to do is: when the craftGo button is clicked, function craftCheck() is triggered and will output in the chatbox the value of the selected item (in this case CZ-550) At the moment my script outputs 'nil' even if I select the CZ-550 row. Any ideas ?
×
×
  • Create New...