Jump to content

Search the Community

Showing results for tags 'custom event'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Multi Theft Auto: San Andreas 1.x
    • Support for MTA:SA 1.x
    • User Guides
    • Open Source Contributors
    • Suggestions
    • Ban appeals
  • General MTA
    • News
    • Media
    • Site/Forum/Discord/Mantis/Wiki related
    • MTA Chat
    • Other languages
  • MTA Community
    • Scripting
    • Maps
    • Resources
    • Other Creations & GTA modding
    • Competitive gameplay
    • Servers
  • Other
    • General
    • Multi Theft Auto 0.5r2
    • Third party GTA mods
  • Archive
    • Archived Items
    • Trash

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Gang


Location


Occupation


Interests

Found 1 result

  1. Today, I've made a event, for checking if player have mooved. At first, after success of detecting players' moovement, it was displaying a message for player, who have mooved.Then, I tried to trigger the event, and the problems started. Any idea? Code's here: ----------------------------------------- ---------------VaporZ (c)---------------- ----------------------------------------- toggleOnPlayerMove = true addEventHandler("onResourceStart", root, function() if(toggleOnPlayerMove == true) then addEvent("onPlayerMove", true) setTimer( function() for _, player in ipairs(getElementsByType("player")) do local x, y, z = getElementPosition(player) setTimer( function() local x_, y_, z_ = getElementPosition(player) if(x ~= x_) and (y ~= y_) and (z ~= z_) then triggerEvent("onPlayerMove", root, player) end end, 1, 1) end end, 1, 0) end end) function dispMsg(player) outputChatBox("You've mooved!", player, math.random(1, 255), math.random(1, 255), math.random(1, 255), true) end addEventHandler("onPlayerMove", root, dispMsg) It is just giving me no errors and no message. Idk wut is wrong.
×
×
  • Create New...