Jump to content

طلب رسبنة


Recommended Posts

Just now, #_iMr,[E]coo said:

table 
unpack
math.random

عشوائي دون ترتيب

ممكن تصحيح

local RespawnPositions = {
	[ 383.83469, 1912.90173, 17.64063 ] = true,
	[ 319.83218, 1906.50525, 17.64063 ] = true,
}

addEventHandler( 'onPlayerWasted', root,
function()
spawnPlayer ( source, RespawnPositions[math.random (#RespawnPositions) 180, 46, 0, 0)
end
)

 

Link to comment
6 minutes ago, Mr.Mostafa said:

ممكن تصحيح


local RespawnPositions = {
	[ 383.83469, 1912.90173, 17.64063 ] = true,
	[ 319.83218, 1906.50525, 17.64063 ] = true,
}

addEventHandler( 'onPlayerWasted', root,
function()
spawnPlayer ( source, RespawnPositions[math.random (#RespawnPositions) 180, 46, 0, 0)
end
)

 

local RespawnPositions = {
	{383.83469, 1912.90173, 17.64063 },
	{319.83218, 1906.50525, 17.64063 },
}

addEventHandler( 'onPlayerWasted', root,
function()
    local x, y, z = unpack(RespawnPositions[math.random(#RespawnPositions)])
    spawnPlayer ( source,x, y, z,180, 46, 0, 0)
end
)

 

Link to comment
4 minutes ago, #BrosS said:

local RespawnPositions = {
	{383.83469, 1912.90173, 17.64063 },
	{319.83218, 1906.50525, 17.64063 },
}

addEventHandler( 'onPlayerWasted', root,
function()
    local x, y, z = unpack(RespawnPositions[math.random(#RespawnPositions)])
    spawnPlayer ( source,x, y, z,180, 46, 0, 0)
end
)

 

شكرا + جاري التجربة

 

Link to comment
22 minutes ago, #_iMr,[E]coo said:

isPlayerDead -- تتحقق اذا اللاعب ميت
'onPlayerWasted' -- لما يموت اللاعب

 

 

 This function is deprecated. This means that its use is discouraged and that it might not exist in future versions.
 Please use isPedDead instead.
  • Like 1
Link to comment
3 hours ago, N3xT said:

اطرح اكوادك

local RespawnPositions = {
{-3487.27246+math.random(1,5), -3020.19141+math.random(1,5), 4.96875, },
{-3487.65552+math.random(1,5), -3038.20850+math.random(1,5), 4.96875, },
}

addEventHandler( 'onPlayerWasted', root,
function()
    local x, y, z = unpack(RespawnPositions[math.random(#RespawnPositions)])
    spawnPlayer ( source,x, y, z,180, 46, 0, 0)
end
)

 

Link to comment

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...