Jump to content

AJXB

Members
  • Posts

    367
  • Joined

  • Last visited

Posts posted by AJXB

  1.   
    if ( getTeamName(getPlayerTeam(thePlayer)) == "Delta Force" ) then 
      
    

    replace it with

      
    if ( getTeamName(getPlayerTeam(pla)) == "Delta Force" ) then 
      
    

    Your player var is "pla" not thePlayer, that's it.

    On line 32 aswell.

  2. So basically it's a dxDrawText exported from an SQLite database query, and a GUI to edit that query, it's a nice idea, but make sure not to query each time the window is drawn, only on resourceStart, and one more thing, add/delete menus can come in handy.

  3. So did you update it or did you just make a new thread only to link to your original one...? :?

    1. The original one was not for free, it costs $7.50

    2. Updated, added vehicle rotation, and vehicle colour, plus some more minor bug fixes.

  4. I don't help people who only care about the result, you should know that better then me.

    Why are you even posting here? for god sakes, did anyone tag you by mistake? if you're giving your opinion, I don't want to hear it, got something to say? PM, you're just wasting my time, if you're not here to help this guy, don't reply on his topic, that's simply wrong.

    You can reply again, I won't answer, I got a life.

  5. IVSE 1.3

    Features:

    Markers can be locked to:

    * Group

    * Team

    * Job

    * Nothing -- anyone can use them

    - You can define the rotation of the vehicle.

    - You can define the colour of the vehicle, and the marker.

    - Attached to a MySQL script, to connect and execute.

    - You can add as many vehicles as you want.

    Preview:

    viewtopic.php?f=108&t=82987

    ~ Updated 1.3:

    * You can now choose between MySQL or SQLite databases.

    * NOTE: You must import this structure into your database, MySQL or SQLite, it won't work without it.

    .SQL: https://mega.co.nz/#!YUJmGLBA!esiae4PNz ... U6R6ELE8yQ

    Download:

    https://community.multitheftauto.com/index.php?p= ... s&id=10589

  6. @ Mr.gSub

    Stop talking :~ and read the triggerClientEvent page yourself.

    root is the result from getRootElement() function, which is the first optional argument from this function. So you can use both or none because it is optional.

    Do you even hear yourself? gosh..

    Anyway, sshh, help him, don't lecture me.

  7.   
    triggerClientEvent ( [table/element sendTo=getRootElement()], string name, element sourceElement, [arguments...] ) 
      
    

    You can't use root in this case use source, or thePlayer element you're using.

      
    triggerClientEvent(source,"onLock",theVehicle) 
      
    

    One more note, the first argument is optional, you can use

      
    triggerClientEvent("onLock",theVehicle,thePlayer) 
      
    

    And that's it, your client event "onLock" will play https://wiki.multitheftauto.com/wiki/PlaySound3D using https://wiki.multitheftauto.com/wiki/GetElementPosition of the vehicle, and the source element is thePlayer or localPlayer.

  8.   
    guiCreateStaticImage -- one for the title, one for the body, and one for the buttons, the image will be a 1x1 png file, not much to download 
    guiCreateLabel -- for the Window title, and for the button title 
    onClientGUIClick 
    onClientClick 
      
    

  9. Or.. you can use custom CEGUI, though I heard it's heavy, I recommend it, how? using some png images to form a GUI window.

    However, it's not sufficient, you can use DX and it's more advance and lighter.

    It's your choice, I recommend the custom CEGUI, though it'll need work, DX is easier.

  10. 1. You don't need to check it it's ~= nil, skip it

      
    function showSpawnerWindow(spawnerType) 
            guiSetVisible(GUIEditor.window[1], true) 
    ... 
      
    

    2. Try to remove if dimensionMatch, just check elementData

      
    if (getElementData(source, "markType") == "vspawner") then 
      
    

    That's as far as I can help, the problem must be with onClientMarkerHit, as you say there are no errors and the marker is created.

  11. function isZombieBehindPlayer(zombie, player) 
        local px, py, pz = getElementPosition(player) 
        local zx, zy, zz = getElementPosition(zombie) 
        local zdx, zdy = zx-px, zy-py -- direction from player to zombie 
      
        local _, _, pr = getElementRotation(player) 
        pr = -math.rad(pr) 
        local fdx, fdy = math.sin(pr), math.cos(pr) -- player's front direction 
      
        return zdx*fdx+zdy*fdy < 0 -- dot product is less than 0 if vectors point to opposite directions 
    end 
    

    MTA 1.4 cut this code short, please check the OOP.

×
×
  • Create New...