Jump to content

Search the Community

Showing results for tags 'fixing event script'.

  • 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. local spawnpoints1 = { {-2309.55859375, 2488.8388671875, 188}, {-2366.84765625, 2276.849609375, 188}, {-2566.3779296875, 2234.146484375, 188}, {-2704.232421875, 2390.80078125, 188}, {-2627.060546875, 2578.6552734375, 188}, {-2453.2021484375, 2611.2802734375, 188}, {-2311.50390625, 2474.6533203125, 188}, {-2368.353515625, 2270.7685546875, 188}, {-2533.52734375, 2225.6337890625, 188}, {-2669.2685546875, 2309.62890625, 188}, {-2680.62890625, 2501.0693359375, 188}, {-2592.1572265625, 2598.8330078125, 188}, {-2409.0634765625, 2594.9189453125, 188}, {-2323.4765625, 2475.3525390625, 188}, {-2367.91015625, 2287.9306640625, 188}, } warp_warpedUsers = {} warp_savePos = {} warp_warpLimit = 0 warp_warps = 15 warp_event = false wapx, wapy, wapz = unpack(spawnpoints1[math.random(1,#spawnpoints1)]) warp_dimension = 0 warp_interior = 0 function warpPerson(player) local team = getPlayerTeam(player) if (not team) then return end if (warp_event == false) then return end if ( doesPedHaveJetPack(player)) then outputChatBox("You can't join this event if you're using jetpack.",player, 255, 0, 0) end if (isPedInVehicle(player)) then outputChatBox("You can't join this event if you wasn't on foot.",player, 255, 0, 0) end if (exports.OSCprison:isPlayerJailed(player)) then return outputChatBox("You're in Jail! You can't join the event.", player, 255, 0, 0, true) end if (isPlayerInEvent(player)) then outputChatBox("You have already used the command, if you want to leave the event use the command /leaveevent .", player, 0, 255, 0, true) return end if (tonumber(warp_warps) < tonumber(warp_warpLimit) and warp_event) then if (not getPedOccupiedVehicle(player)) then if (not isPlayerInEvent(player)) then local px, py, pz = getElementPosition(player) local pint, pdim = getElementInterior(player), getElementDimension(player) warp_savePos[getAccountName(getPlayerAccount(player))] = {px, py, pz, pint, pdim} end if (warp_interior == 0) then if (getElementInterior(player) ~= 0 ) then outputChatBox("You should be at the main interior to join the event.",player, 255, 0, 0) end setElementPosition(player, wapx, wapy, wapz) else setElementInterior(player, warp_interior, wapx, wapy, wapz) end setElementDimension(player, warp_dimension) addPlayerToEvent(player) warp_warps = warp_warps + 1 if (tonumber(warp_warps) >= tonumber(warp_warpLimit)) then outputChatBox("The event is now full", root, 0, 255, 0, true) end end else exports.DENdxmsg:createNewDxMessage("The event has reached the limit of " .. (warp_warpLimit) .. " warps", player, 0, 255, 0, true) end end addCommandHandler("joinevent", warpPerson) function addPlayerToEvent(player) if (isElement(player)) then setElementData(player, "a", true) setElementPosition = wapx, wapy, wapz end end As you see I'm trying to make a event but I can't understand where I fail, because I'm not getting warped.. Any help please? And thanks.
×
×
  • Create New...