BlackWhite Posted February 11, 2018 Share Posted February 11, 2018 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
itHyperoX Posted February 11, 2018 Share Posted February 11, 2018 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
BlackWhite Posted February 11, 2018 Author Share Posted February 11, 2018 bro where is block the command in Las venturas :C Link to comment
Tails Posted February 11, 2018 Share Posted February 11, 2018 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
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now