Jump to content

Script de Spawnar veiculo em Painel!


Recommended Posts

Posted

Alguém poderia me ajudar nessa parte? Sou meio novo no mundo dos scripters, gostaria de saber como poderia setar o veiculo pelo painel! poder ter algo errado, se tiver pfv me corrijam, peço ajuda!

 

function Botao2 (_,state)
  if painel == true then
    if state == "down" then
    if isCursorOnElement ( screenW * 0.3937, screenH * 0.5759, screenW * 0.5276, screenH * 0.6435 ) then
       createVehicle(441, x,y,z)
                end
            end
        end
   end
 addEventHandler ("onClientClick", root, Botao2 )

  • Human Resources Staff
Posted

Hi, welcome to the forums!

I've moved your thread to a more language-specific section so that you can get help into your native language.

Please keep in mind that sections such as Scripting (that are international) require you to post in English. ?

Posted
On 28/08/2021 at 12:12, Byakuya said:

Alguém poderia me ajudar nessa parte? Sou meio novo no mundo dos scripters, gostaria de saber como poderia setar o veiculo pelo painel! poder ter algo errado, se tiver pfv me corrijam, peço ajuda!

 

function Botao2 (_,state)
  if painel == true then
    if state == "down" then
    if isCursorOnElement ( screenW * 0.3937, screenH * 0.5759, screenW * 0.5276, screenH * 0.6435 ) then
       createVehicle(441, x,y,z)
                end
            end
        end
   end
 addEventHandler ("onClientClick", root, Botao2 )

Aonde está a posição X,Y,Z ?

Posted
function Botao2 (_,state)
  if painel == true then
    if state == "down" then
    if isCursorOnElement ( screenW * 0.3937, screenH * 0.5759, screenW * 0.5276, screenH * 0.6435 ) then
       local x,y,z = getElementPosition(localPlayer)
       createVehicle(441, x+10,y,z)
                end
            end
        end
   end
 addEventHandler ("onClientClick", root, Botao2 )

X, Y, Z are where you want them to be

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