• Content count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About vx89

  • Rank
    Punk-@ss B*tch
  • Birthday 16/07/89
  1. Object as image

    They just replicate the images, instead of really showing face of an object
  2. KWK 3D Radio

    I tried to create a similar resource a while ago, but got stopped on the problem, that I found no stable way to play one track after another one without any clipping between (e.g intro & song; or song & outro). I see you just start the next part before 50ms - haven't tried this script yet, but is it always stable on your machine - i.e you don't hear any delay or overlapping when next track part is started?
  3. Wiki OOP - mt structure

    It describes how *they* have implemented OOP for MTA builtin functions. Element = { create = createElement, setPosition = setElementPosition, ... } -- Hidden in lua registry, applied to userdata ElementMT = { __index = CLuaClassDefs::Index, -- accessing missing key with element[key] or element.key will call CLuaClassDefs::Index. This will call __class or __get __newindex = CLuaClassDefs::NewIndex, -- setting element[key] = value or element.key = value will call CLuaClassDefs::NewIndex. This will call __set. __class = Element, -- private field, so __call can use it and maybe something else as well __call = __class.create, -- calling element(foo) will call __class.create(element, foo), which is Element.create(element, foo) __set = { -- not in Lua specs, MTA handles it somehow - creates setters for contained names type = CLuaClassDefs::ReadOnly, -- setting Element type is not allowed (but getting is) health = setElementHealth, ... }, __get = { -- same as __set, only for getters type = getElementType, health = getElementHealth, ... }, } It's important to look at https://github.com/multitheftauto/mtasa ... ssDefs.cpp to see what's going on. Also see http://lua-users.org/wiki/MetatableEvents I am not sure though why they have in that wiki example setPosition in Element instead of ElementMT.__set.position
  4. dxDrawText problem

    On 7th line you are setting statusfunctions to a new value and on next frame (when xsManager() is called again) you try to get getElementData(localPlayer,statusfunctions), which now returns false instead. But the error probably comes when getElementData returns true as boolean as then the "Disabled" is not returned instead. Also, is this elementData synced with server or is only local? If only local then I guess it should be ok to ask it every frame, though it would make more sense to just keep the values in a separate table as per descriptions they don't change often. If synced, then you should definitely keep them cached and not ask updates from server on each frame.
  5. engineRemoveShaderFromWorldTexture doubt

    It should find all shader elements created by the map resource script. My example is a starting point for you to experiment with.
  6. engineRemoveShaderFromWorldTexture doubt

    Maybe you could try local mapResourceDynamicRoot = getResourceDynamicElementRoot(mapResource) local shaders= getElementsByType( 'shader', mapResourceDynamicRoot) Just an idea.
  7. Hope You Help me :'(

    I understand it can be hard to make up a topic title, but I just see it too much https://forum.mtasa.com/viewtopic.php?f=31&t=15740 Example: How to change jail position in Nerd Gaming GameMode?
  8. Race_toptime addons. Need Help!

  9. resourceRoot element > resource element

    Weird that you get empty string as resource id. You could try non-oop methods and see if there's a bug with any of the oop ones. Or pehaps vehicle.parent.parent is not resource root element in this case (though it looks correct from the diagram in 1st post). getResourceFromName("") not returning false is also weird.
  10. Using table to create spawn points

    What are you trying to achieve XeroxMTA? Overriding a function "globally" overrides it only in his resource, which means he could just call his function - no need to override the spawnPlayer.
  11. Using table to create spawn points

    Show me what you tried
  12. Using table to create spawn points

    Almost there. local randomSpawn = spawns[math.random( #spawns)] local sX, sY, sZ = unpack(randomSpawn)
  13. luac.mtasa.com and us

    Revolt is quite right, despite being an ass. Only thing that can corrupt this system is creating a decrypter for public, so anyone can use it.
  14. luac.mtasa.com and us

    People should just give out the source of their scripts. If you are worrying somebody duplicates your server then keep in mind most other games dont even have such scripting. Good server is made from community and financial resources to keep connection fast.
  15. Problem with opening ports.

    Perhaps your ISP is blocking them additionally? In which case you could ask your ISP about the solution.