Jump to content

..:D&G:..

Members
  • Posts

    1,028
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by ..:D&G:..

  1. This only creates lots of "You are too far away from the garage" messages...
  2. I changed a function a bit and here is what I got: local easing = "OutBounce" local time = 2000 local open = false function openGarageGate(thePlayer, cmd, garageID) if not garageID then outputChatBox("SYNTAXA: /"..cmd.." [iD Garage]", thePlayer, 255, 255, 0) else local garageID = tonumber(garageID) for i, v in ipairs (getElementsByType("object")) do if (getElementModel(v) == 17950) then local gate = getElementData(v, "poarta") local dbid = tonumber(getElementData(v, "dbid")) if (dbid == garageID) then local gateX, gateY, gateZ = getElementPosition(gate) --moveObject(gate, time, gateX+4.9, gateY+9.6, gateZ, 0, 0, 0, easing) moveObject(gate, 17951, 1588.5490234375, -1637.95546875, 16.446516990662, -90, 0, 0) outputChatBox("You have opened your garage!", thePlayer, 0, 255, 0) open = true else outputChatBox("You are too far away from the garage!", thePlayer, 255, 0, 0) end end end end end addCommandHandler("opengarage", openGarageGate) The problem is that it doesn't open the garage gate, I get like a small shake on my screen but that's all. It also gives me like 10 "your are too far away from the garage" messages, then at the end "you have opened your garage". Any ideas?
  3. Hello, I am trying to do a garage system that saves in mysql, and I got to the part where I need to make a command that opens the garage with a specific id from the database. The command should be something like: /opengarage [iD of garage]. It seems that I can't think today as I've spent 40 minutes on only this function: function openGarageGate(thePlayer, cmd, dbid) local easing = "OutBounce" local time = 2000 local result = mysqlSystem:query_database("SELECT id, x, y, z, interior, dimension, rot1, rot2, rot3 FROM garages") while true do local row = mysqlSystem:fetch_rows(result) if not (row) then break end local garageID = row['id'] local x = row['x'] local y = row['y'] local z = row['z'] local int = row['interior'] local dim = row['dimension'] local rot1 = row['rot1'] local rot2 = row['rot2'] local rot3 = row['rot3'] local value = exports.objectTables:getElement( "object", 17951 ) if value then local vx, vy, vz = getElementPosition(value) local x, y, z = getElementPosition(thePlayer) if getDistanceBetweenPoints3D(x, y, z, vx, vy, vz) <= 30 then -- Garage found local gate = getElementData(garageID, "garageGate") moveObject(gate, time, x+4.9, y+9.6, z, 0, 0, 0, easing) end end end end end addCommandHandler("opengarage", openGarageGate) I know that this is a mess, but maybe it makes you an idea of what I want to do. Thanks.
  4. What do you mean? I want to spawn the gate at a position, then attach it to the garage (in front of the garage)
  5. Hi guys, I am trying to attach a gate to CJ garage but when I use attachElements, the gate gets in the middle of the garage, and turned 90 degrees local garage = createObject(17950, tonumber(x), tonumber(y), tonumber(z), tonumber(rot1), tonumber(rot2), tonumber(rot3)) local gate = createObject(17951, tonumber(x)+4.22, tonumber(y)+1.05, tonumber(z)-0.25, tonumber(rot1), tonumber(rot2), tonumber(rot3)-90) attachElements ( gate, garage ) Any ideas?
  6. Hello guys, how can I make a pickup not disappear when a player hits it. Is there any other way than setting the respawn time to 0?
  7. It worked! Thanks a lot! (Your english is fine btw )
  8. Hello guys, I am making a garage system where admins can create a CJ garage with a gate. Everything works fine but when an admin deletes a garage, the gate doesn't get deleted. Here is my delete bit: if (garageID) then local garageID = tonumber(garageID) local found = false for i, v in ipairs (getElementsByType("object")) do if (getElementModel(v) == 17950) or (getElementModel(v) == 17951) then local dbid = tonumber(getElementData(v, "dbid")) if (dbid == garageID) then destroyElement(v) outputChatBox("Garage with #ID ".. garageID .." has been deleted.", thePlayer, 0, 255, 0) found = true break end end end Any ideas guys? Thanks.
  9. Eu prefer sa ma "screm" (vorba de cioban tractorist) la un server si sa il fac cum trebuie, de cat sa traduc un server si sa adaug resurse de pe community. Si haide, dute pe google si cauta Owl, daca il gasesti iti dau un os. P.S: Daca tot vrei sa te certi cu mine, dami skype-ul tau pe privat daca ai tupeu.
  10. Bai pustiule, eu nu sunt ca ceilalti disperati sa anunt tot poporul ca eu deschid un server. Daca esti de ceva timp pe MTA si ai intrat pe fostul WG acum un an, ai vedea cat de mult am muncit la el la versiunea 1.4. Ai poze cand nu am avut loginul de la Owl schimbat? Ia intra acum si nu mai comenta, eu macar fac schimbari la server. Oricum, lasa-ma pe mine si serverul meu, ca era vorba de Raileanu nu de mine. Ar vrea raileanu sa aiba fostul meu gamemode, si cel de acum, deci te rog, daca raileanu avea server unic, facut de el, sau macar modificat MULT de el, atunci taceam din gura, dar.... acum tu taci din gura si ia criticile in mod constructiv (daca vrei).
  11. Waaa fratica, raileanu are 13-14 ani, si tu imi zici mie ca e condus de oameni "maturi"? Ce rost are sa fi owner activ daca nu sti oleaca de scripting ca sa imbunatatesti si sa adaugi si tu scripturi pe server, Puie Metru asta se duce pe community sau ciordeste client side-urile de pe alte servere, asta nu e server! (Ai avut noroc ca Axel a dat in damblageala si a pus gamemode-uri pe net, ca altfel te duceai sa sugi p**a pentru un gamemode) P.S: De ce ai facut topic acestui specimen? Sti ca aici toti urasc astfel de servere, mai ales Mihailescu si Raileanu...
  12. Lool, how the F didn't I notice that?! Thanks man
  13. Yes as I mentioned here [quote name=..&G:..] exports.notif:showBarNoti("#ff0000This is a notification test")
  14. I smell a Valhalla leak..
  15. Hello guys, I am making a script which will create some notification bars on the screen, and I want to use that script in server and in client side. I got this in server side: function showBarNoti(thePlayer, message) --Server-side triggerClientEvent("onClientNotiShow", thePlayer, message) end And here is the function with onClientNotiShow: function showNotificationBar(message) if not (message and type(message) == "string") then error("Bad argument @ 'showNotificationBar' [Expected player at argument 1, got "..type(message).."]") return false end return table.insert(lisrMSG, {message, getTickCount()}) end addEvent("onClientNotiShow",true) addEventHandler("onClientNotiShow", root, showNotificationBar) I tried triggerClientEvent(thePlayer, "onClientNotiShow", thePlayer, message) but it still says that an element is expected at argument 2 but got a string. I use this in another script: exports.notif:showBarNoti("#ff0000This is a notification test") it still says: bad argument @ 'triggerClientEvent' [Expected element at argument 2, got string "#ff0000This is a notification test"]. Any ideas?
  16. ..:D&G:..

    Bug Logare

    In client side la panoul de logare unde fereastra de logare se creeaza pune: guiSetInputEnabled(true) Unde fereastra de logare este distrusa/inchisa pune: guiSetInputEnabled(false)
  17. Hello guys, from the maths (distance*0.6) I get a decimal number with 1 decimal place, is there anyway of rounding that up? Thanks.
  18. Really helpful if you want to add mods to your server with no waiting time! (Nearly)
  19. Awesome work! (Hopefully it won't get leaked) Btw, I hope you are still working on the Roleplay server
  20. Kinda late for this uncompiled version, I did my own coins system already, but this is still one of the only coins system on community, good job
  21. Poti sa imi zici prin PM pe forum... dar daca vrei sa imi zici ceva gen "Vreau sa te ajut la server, etc etc" iti zic de acum sa nu te obosesti
  22. Um... te cunosc cumva? Fara suparare..
  23. Ransom what do you say* You know that the staff gave up on this section cuz it ain't even used properly, right?
  24. Ok so, I am saving up to buy that PC and till now I have £400, half the amount I need. I was thinking of adding a cheap 1GB graphics card to my old dell inspiron that has at least shader model 3.0 so I can play some games till I save some money. Which graphics card has 1gb memory and shader model 3.0 and doesn't need a PCIe cable as the PSU it has its only 300W and I don't want to upgrade it. Thanks again for helping
×
×
  • Create New...