Jump to content

Command block in Las Venturas


BlackWhite

Recommended Posts

local spawns = {
{ 1936.1899414063, 1622.6533203125, 72.2578125, 90 },
{ 2155.63671875, 1483.9974365234, 24.140625, 90},
{ 2023.1564941406, 1436.7003173828, 10.8203125, 90 },
{ 2121.4245605469, 1484.5670166016, 10.8203125, 90 },
{ 2170.0751953125, 1679.1960449219, 10.8203125, 90 },
{ 2095.324218755, 1282.2322998047, 10.8203125, 90 },
} 
function spawn( player )
local rnd = math.random( 1, #spawns )
setElementPosition( player, spawns[rnd][1], spawns[rnd][2], spawns[rnd][3] )
end
addCommandHandler("pvp",spawn)

Hi all, 

ı created some warp coordinates for pvp in las venturas.but players using abusing in pvp.ı need block /pvp command in just  Las Venturas.which must ı add codes ? can you help me please ?

Link to comment
  1. function spawn( player )
    if not (getElementData(player, "player:warped") == true) then 
    local rnd = math.random( 1, #spawns )
    setElementPosition( player, spawns[rnd][1], spawns[rnd][2], spawns[rnd][3] )
    setElementData(player, "player:warped", true)
    end
    end
    addCommandHandler("pvp",spawn)
Link to comment

A quick and easy way would be to add this

if (getZoneName(player.position, true) == "Las Venturas") then
	return
end

-->

function spawn( player )
	if getZoneName(player.position, true) == "Las Venturas" then
		return
	end
	local rnd = math.random( 1, #spawns )
	setElementPosition( player, spawns[rnd][1], spawns[rnd][2], spawns[rnd][3] )
end
addCommandHandler("pvp",spawn)

 

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