Jump to content

..:D&G:..

Members
  • Posts

    1,028
  • Joined

  • Last visited

  • Days Won

    1

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

  1. Hello, I am making a mechanic job, and instead of making tons of topics when I need help with this system, I will just make 1 topic. So, I want to make a gridlist with all the vehicles in a colshape, but I don't really know how to get the vehicles within the colshape... Thanks.
  2. So it was all just the order of the code....? -.-
  3. Can you tell me what you've changed?
  4. Not really because all that is triggered here: function onMechanicHitMarker( hitElement, piesaID ) attachCarPart(hitElement, 1081) end addEventHandler( "onMarkerHit", mechanicMarker, onMechanicHitMarker )
  5. Hello guys, I'm trying to make a mechanic job where the car parts are picked up by the player. When the mechanic enters a marker, the part should attach to the player, and if he enters again and already has a car part attached to them, the object should get destroyed, but it doesn't really work... The object is attached to the player, but it doesn't get destroyed due to the elementData... parts = { [1015] = { } } function attachCarPart(hitElement, partID) if (tonumber(getElementData(hitElement, "partInHand")) > 0) then local IDpart = tonumber(getElementData(hitElement, "partInHand")) destroyElement(parts[IDpart][hitElement]) parts[IDpart][hitElement] = nil setElementData(hitElement, "partInHand", 0) else parts[partID][hitElement] = part part = createObject(partID, 0, 0, 0) setElementData(hitElement, "partInHand", partID) end end
  6. Hello guys, I am trying to make a mechanic system where the mechanic has to pick up the parts and put them in the vehicle. I want to set the player the "carry" animation (the one CJ has when picking up the boxes in Single Player). Now, how do I set the player animation and keep it when the player is walking? Thanks.
  7. Very soon my friend, very soon I'll let you know tho
  8. Baa, ia gata, hai hai, sa nu mai vad cuvantul "server" si "roleplay" in topicul asta!
  9. Craciun fericit Gabitzulee, cum iti mai merge cu gagica de 13 ani? )) O sa va intalniti si voi odata sau va masturbati la web?
  10. Salut buaaai, Dinu Bambinu' la butoane. Ce mai faceti bai? Cum o mai duceti? Tot cu MTA-ul vad )) Altii incearca, altii continua vad. Cum va mai merge treaba fratilor? Toti sunt bine veniti sa comenteze P.S: Nu, nu m-am intors la MTA, doar sunt plictisit la ora 3 (ora mea) si nu am ce face, si vad cum se chinuie lumea aici ca pestele pe uscat )) MTA will end up like Metin, an old 90's game with dumb kids.
  11. Thanks for help everyone, but I managed to find a solution myself I forgot to say it in the topic as well (I used setTimer as TAPL did)
  12. It makes no difference if I add 'or' or 'and' or even swap the outputChatBoxes, it still does the first thing before the 'else', even if the player entered nothing, or completed every form.
  13. The thing is, I want the message to show when the player has not entered the details in 1 box, because I don't want to do an 'elseif' for every box... but still, it insures my vehicle, it doesn't say that I haven't entered the details..
  14. Hello guys, I am making an insurance system and I want players to insert their details in a gui, and if they haven't, it should output an error, I really don't know what's wrong with this, it insures my vehicle even though I haven't put any details in... function sendInsuranceApplication(button, state) if (source==bInsur) and (button=="left") and (state=="up") then if guiGetText(tName) ~= "" or guiGetText(tSurName) ~= "" or guiGetText(tTel) ~= "" or guiGetText(tAddress) ~= "" then outputChatBox("INSURE VEHICLE!", 255, 0, 0) else outputChatBox("PUT DETAILS IN!", 255, 0, 0) return end end end Thanks.
  15. I tried this but the vehicle keeps exploding and respawning -.- function testRespawn() respawnVehicle(source) end function getElementsOnExplode() setTimer ( testRespawn(source), 1000, 1 ) end addEventHandler("onVehicleExplode", getRootElement(), getElementsOnExplode)
  16. That has nothing to do with what I want... I want to respawn the vehicle when the vehicle explodes, I want it to respawn, that just fixes the vehicle when it gets under 250 health... Thanks for trying to help tho..
  17. Hello guys, I am making an insurance system, and I got some problems with the respawn function on which I use onVehicleExplode. The vehicle respawns, but it explodes, and it keeps respawning and exploding... Any ideas? function onInsuredVehicleExplode() local dbid = tonumber(getElementData(source, "dbid")) if (dbid) then local thePlayer = getVehicleOwnerByDBid(dbid) if (getElementData(source, "insured") == 1) then respawnVehicle(source) fixVehicle(source) else destroyElement(source) end end end addEventHandler("onVehicleExplode", getRootElement(), onInsuredVehicleExplode) Thanks.
  18. I managed to do this, but it messes up at the first command, and sometimes it messes up on the second. function logPlayerCommands(cmd) local theFile = fileOpen("cmdslogs.txt") fileSetPos(theFile, 200) fileWrite(theFile, "CMD: /"..cmd.."\n") fileClose(theFile) end addEventHandler("onPlayerCommand", root, logPlayerCommands) I just want it to continue a new line for each command. something like: " CMD: /command1 CMD: /command2 " And so on...
  19. Hello guys, I am trying to monitor what commands players use the most and the least, and record the command itself and the arguments used, like (/cmdname arg1 arg2) and store them in an txt file. The thing is I don't know how to get what command and arguments the player typed... Any ideas? Thanks.
  20. I tried using destroyElement, but it gets numbers instead of the custom blip element. And no, those numbers are not the positions of the custom blips, I checked, they are not anywhere in my script.
  21. Well, I said that I am using the script's destroy function, but I get that Bad custom blip argument, error.. In which case find the exported function and values it takes, then write your call in accordance with it. I know... I am not stupid -.- It only has 1 argument, which is the blip itself... Even though the blip is created and shown on the map without any problems, if I do exports.customblips:destroyBlip(blipName), I get that error...
  22. [quote name=..&G:..] using it's destroy function, I keep getting "Bad 'custom blip' argument". Well, I said that I am using the script's destroy function, but I get that Bad custom blip argument, error..
  23. Hello guys, I am using the resource 'cutomblips', and when I try to destroy a custom blip, using it's destroy function, I keep getting "Bad 'custom blip' argument". markerIcon = exports.customblips:createCustomBlip( v[1], v[2], 25, 25, "tanker/truckericon.png", 25 )
  24. This is because client isn't defined (he 'appears' in the serverside when you use triggerServerEvent) this should work: triggerClientEvent ( thePlayer, "showConversionResult", thePlayer, from, to, tonumber ( amount ), results["rates"][to] ) I know, and I used triggerServerEvent: triggerServerEvent ( "convertCurrency", resourceRoot, currencyInitialsFrom, currencyInitialsTo, amountText ) Maybe it's because of the "resourceRoot" thing?
  25. I tried to use "client" as I saw on wiki, but it doesn't work, it says "String expected got nil" or something like that..
×
×
  • Create New...