Jump to content

JeViCo

Members
  • Posts

    605
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by JeViCo

  1. JeViCo

    exports

    you can also give acl rights for resource where you paste exports. function. Everything have to work
  2. JeViCo

    exports

    atm/meta.xml <export function="createBanking" type="client"/> another script where you want to add an export exports.atm:createBanking(marker,money) information
  3. you can use tables to write xyz marker positions like that: markers = { {x,y,z}, {x2,y2,z2}, } Then you can detect markers with onClientMarkerHit or onMarkerHit. This events gives you a possibility to move to the next step (create next marker). You can use here setElementData to select next marker. Example: markers = { {x,y,z}, {x2,y2,z2}, } function next_mark(pl) if not pl then pl = localPlayer local num = getElementData(pl,"currentMarker") or 1 local cur_x,cur_y,cur_z = unpack( markers[num] ) checkpoint = createMarker(cur_x,cur_y,cur_z,"checkpoint",2) num = num + 1 setElementData(pl,"currentMarker",num) end addEventHandler("onClientMarkerHit",getRootElement(),function(player) destroyElement(checkpoint) next_mark(player) end) I'm not sure that it works\\ But i hope that you understood me
  4. http://www.mta-resource.ru/load/resource/id/3653 feel free to use it buddy. Well-made russian level system
  5. I guess you're in wrong language section buddy. Also paste code using this button next time: Your code works perfectly. Make sure you wrote meta.xml correct like this where sv.lua - your lua file with your code
  6. Thank you! Using non mrt shader solved my problem But now i can't place any image on the background. I used dxDrawImage. As the game ordering says i should use onClientPreRender to draw the image (before fx) but it becomes invisible then. I can also create an object, draw an image on it and set player's camera position facing toward the object. But i don't think that this is a good idea\ p.s. PostGUI and second render target options don't work with this shader for some reason
  7. i got a problem today. I use dgsImageSetImage to change image when i click on button. Then i click other button to destroy current image. Then i create video. I click on button again and video element destroys but now images change by themselves each 0.5 second without button clicking. I have no setTimer functions in my script - only dgsImageSetImage and onDgsMouseClick i hope you everyone understood me
  8. Thank you and @Ren_712 for this script. I was looking for it but This is a shader or vehicle problem? I can simply draw something on back to hide holes but can i fix it somehow?
  9. my fault. I wrote "checkpoint" instead of "cylinder"
  10. i don't want to take picture of each vehicle . I'm going to make little dxCreateScreenSource (image) of this vehicle and i need some sort of advice for this action --- i haven't done it before
  11. Hello everyone! I have a little problem createMarker(0,0,3,"checkpoint",2,255,255,255,0) i know that color goes r,g,b,a and when i output alpha(a) i see number "0". But why markers still visible?
  12. Hello everyone. Can i draw somehow gta objects in 3D? I mean i spawn a vehicle somewhere and i show it in my window like this: https://auto.ndtvimg.com/car-images/medium/mercedes-amg/gla-45/mercedes-amg-gla-45.jpg I don't want to spawn a car in front of player especially when i want to display several cars p.s. sorry for my bad english
  13. your library is awesome! Keep it up -- aaand 1 question: What is ellipce detect area and how can i use it? Maybe it's hard to understand for me because i'm not from english-speaking country.... i guess...
  14. Hello community! How can i detect the time when a player downloaded all resources? I mean players can play a minigame while they are loading. When the downloading was finished, This game hides and a login-panel appears. Any ideas?
  15. yeah... i guess i picked the wrong website\
  16. JeViCo

    [HELP] Script

    I think you trigger events with getRootElement() server-side. If you use triggerServerEvent("someEvent",root,args) your local player here is source. BUT if you trigger client use this: triggerClientEvent("some_client_event", root, args). If you use getRootElement() instead of root , it will trigger for ALL player. Make sure u read wiki properly
  17. very useful. It was so hard to trigger client many times to get a vehicle with isElementStreamedIn. But still this function may have problems. For example when 2 cars were spawned at the same time. Also it might reduce server perfomance when it has more than 200 players
  18. JeViCo

    Spoiler

    as @Patrick2562 said use this + onClientRender event to make the mooving smoother example: addEventHandler("onClientRender",getRootElement(),function() veh = getPedOccupiedVehicle(localPlayer) x,y,z = getVehicleComponentPosition(veh,"spoiler_part") setVehicleComponentPosition(veh,"spoiler_part",x,y,z+0.01) end)
  19. hello everyone! I have a problem with sfx. I got a looped sfx but each loop has a little delay before it starts so you can hear it clearly. I tried to find some more sfx but got the same result. Is that an MTA limitation? I really don't want to make 10 minutes loop for 1-2 seconds sfx. Help me please
  20. JeViCo

    "str" to str

    thank you both. Both codes work perfect.
  21. JeViCo

    "str" to str

    Hello everyone! How can i transform a string to variable? For example i have "text" string and i want to make text variable. Is That possible? I need it for guiRadioButtonGetSelected I know that i can make it with third variable but code become longer then\\
  22. Hello everyone! i'm making a login panel and met a little(maybe not) problem. All following letters appear on a new line. Code: addEventHandler("onClientCharacter", root, function(key) if guiGetVisible(backimg) then if string.match(key, '%a') or string.match(key, '%d') then if edit_l then local text = guiGetText(edit_login) --outputChatBox(text) --outputChatBox(key) guiSetText(edit_login,text..key) elseif edit_p then local text = guiGetText(edit_pass) guiSetText(edit_pass,text..key) elseif edit_conf_p then local text = guiGetText(edit_conf_pass) guiSetText(edit_conf_pass,text..key) end end end end)
  23. текст сохранять, который написал - избежать длинных функций (лучше не пиши сюда, для этого языка спец раздел есть)
×
×
  • Create New...