Jump to content

random spawn مساعدة


Recommended Posts

سلام علليكم عايز اضيف

كذا رسباون للتيمات ويختار الرسبون عشوائى

حد يدينى مثال على تيم البوليس وانا هعمل اللى ا

الباقى  انا عارف ان مواضيعى كتير بس عايز افتح سيرفرى مرة اخرى الى لى الاسف موداتة اتحذفت كلها

 

المهم انا قررت السطور على اساس يختار عشوائى منفعشى

اعتقد دة جدول صح

Spawns = { 
	['Police'] = { 1558.52722, -1631.61255, 13.38281, '0, 0, 255' },
	['Criminal'] = { 331.63, -1517.37, 35.87, 231, '255, 0, 0' },
	['Doctor'] = { 1185.84, -1324.18, 13.56, 267, '24, 198, 238' },
	['Grove Street'] = { 2522.69, -1669.59, 14.96, 89, '0, 128 , 0' },
	['Aztecas'] = { 1791.86, -1926.86, 13.39, 357, '0, 128, 255' },
	['Vagos'] = { 2224.91, -1088.39, 30.7, 119, '255, 200, 0' },
	['Ballas'] = { 2202.66, -1364.02, 25.86, 180, '128, 0, 128' }
}

 

Edited by ايهاب
Link to comment
  • Scripting Moderators

مثال بسيط

 

local teams = {
  ["SWAT"] = {
		spawn = {
		{222,222,222},
		{222,222,222},
		{222,222,222},
		{222,222,222},
		{222,222,222},
      	},
		color = {0,0,255}
    }
  },
  ["Grove"] = {
		spawn = {
		{222,222,222},
		{222,222,222},
		{222,222,222},
		{222,222,222},
		{222,222,222},
      	},
		color = {0,255,0}
    }
  }
}

local spawns = teams["SWAT"].spawn
local x,y,z = unpack ( spawns[ math.random (#spawns) ] )

 

  • Like 1
Link to comment
  • 2 years later...
  • 3 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...