Jump to content

Search the Community

Showing results for tags 'randomize'.

  • 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. Hello everyone I currently have this function that develops, and some time and I wanted to make a change most do not know it as good is simple. local positions = { { 371, -2040, 8 }, { 2274, -1036, 52 }, { -2245, -1723, 482 }, { -155, -2889, 428 }, } function DisappearPlayer (NamePlayer, Admin) local azar = math.random ( #positions ) local veh = getPedOccupiedVehicle(NamePlayer) if (veh) then setElementPosition(veh, unpack ( positions [ azar ] ) ) else setElementPosition(NamePlayer, unpack ( positions [ azar ] ) ) end end addEvent("random",true) addEventHandler("random",getRootElement(),DisappearPlayer) This teleports the player into a random position map using a table of coordinates. Ok everything works perfectly. But I wanted it stores up the item from the table that has already been used and not used again until the last was used or the successor. Ex local positions = { { 1 }, { 2 }, { 3 }, { 4 }, } function DisappearPlayer (NamePlayer, Admin) local azar = math.random ( #positions ) local veh = getPedOccupiedVehicle(NamePlayer) if (veh) then setElementPosition(veh, unpack ( positions [ azar ] ) ) else setElementPosition(NamePlayer, unpack ( positions [ azar ] ) ) end end addEvent("random",true) addEventHandler("random",getRootElement(),DisappearPlayer) so that happens. 3,3,2,1,3,4,4 way I wanted it occurs. 3.1.2.4 or 3.2.3.1.3 in a way that the same n repeita then! Anyone know how to do?
×
×
  • Create New...