Jump to content

localtion problem


orcun99

Recommended Posts

local spawns = {
{ 1936.1899414063, 1622.6533203125, 72.2578125, 90 },  --1
{ 2155.63671875, 1483.9974365234, 24.140625, 90},   --2
{ 2023.1564941406, 1436.7003173828, 10.8203125, 90 },  --3
{ 2121.4245605469, 1484.5670166016, 10.8203125, 90 },  --4
{ 2170.0751953125, 1679.1960449219, 10.8203125, 90 }, --5
{ 2095.324218755, 1282.2322998047, 10.8203125, 90 }, --6
} 

   

   
   
function spawn( player )
local rnd = math.random( 1, #spawns )
setElementPosition( player, spawns[rnd][1], spawns[rnd][2], spawns[rnd][3] )
end
addCommandHandler("pvp",spawn)

if the player is in the field that I set as spawns, I want the player to be unable to use the /PvP command again.


I Want This command not to be used in Las venturas.

Edited by orcun99
Link to comment
1 hour ago, orcun99 said:

local spawns = {
{ 1936.1899414063, 1622.6533203125, 72.2578125, 90 },  --1
{ 2155.63671875, 1483.9974365234, 24.140625, 90},   --2
{ 2023.1564941406, 1436.7003173828, 10.8203125, 90 },  --3
{ 2121.4245605469, 1484.5670166016, 10.8203125, 90 },  --4
{ 2170.0751953125, 1679.1960449219, 10.8203125, 90 }, --5
{ 2095.324218755, 1282.2322998047, 10.8203125, 90 }, --6
} 

   

   
   
function spawn( player )
local rnd = math.random( 1, #spawns )
setElementPosition( player, spawns[rnd][1], spawns[rnd][2], spawns[rnd][3] )
end
addCommandHandler("pvp",spawn)

if the player is in the field that I set as spawns, I want the player to be unable to use the /PvP command again.


I Want This command not to be used in Las venturas.

Just change or delete the positions !

Link to comment
local spawns = {
{ 1936.1899414063, 1622.6533203125, 72.2578125, 90 },  --1
{ 2155.63671875, 1483.9974365234, 24.140625, 90},   --2
{ 2023.1564941406, 1436.7003173828, 10.8203125, 90 },  --3
{ 2121.4245605469, 1484.5670166016, 10.8203125, 90 },  --4
{ 2170.0751953125, 1679.1960449219, 10.8203125, 90 }, --5
{ 2095.324218755, 1282.2322998047, 10.8203125, 90 }, --6
} 

   

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

i

Link to comment
25 minutes ago, <~kamikaze~> said:

Just change or delete the positions !

I think you don't understand

 

for example
   lvcol = createColCircle (  1796.6412353516,1740.2864990234, 1250 )


   function qwe(thePlayer)
   outputChatBox("you can't use /pvp cause you in lv.")
end 
addEventHandler( "onColShapeHit", lvcol, qwe )

 

function qwe2 (thePlayer) 
   outputChatBox("ayrıldın")
local rnd = math.random( 1, #spawns )
setElementPosition( player, spawns[rnd][1], spawns[rnd][2], spawns[rnd][3] )
end
addEventHandler ( "onColShapeLeave", root, qwe2 ) 
addCommandHandler("pvp",qwe2)
 

21 minutes ago, ÆBKV said:

local spawns = {
{ 1936.1899414063, 1622.6533203125, 72.2578125, 90 },  --1
{ 2155.63671875, 1483.9974365234, 24.140625, 90},   --2
{ 2023.1564941406, 1436.7003173828, 10.8203125, 90 },  --3
{ 2121.4245605469, 1484.5670166016, 10.8203125, 90 },  --4
{ 2170.0751953125, 1679.1960449219, 10.8203125, 90 }, --5
{ 2095.324218755, 1282.2322998047, 10.8203125, 90 }, --6
} 

   

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

i

solved thanks all

Edited by orcun99
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...