Jump to content

"(" expected near Linha 71


Recommended Posts

Marker_Aleatorios = -- ADICIONE AQUI OS LOCAIS QUE O JOGADOR DEVE PASSAR
 {   
   {658.48792, -546.98334, 16.33594},
   {-2124.44043, 208.22417, 35.22341},
   {249.56505, 1420.55273, 10.56574},
   {1427.32214, 708.58142, 10.82031},
-- AS MESMA POS DE CIMA PRA EVITAR SAIR O MESMO TODA HORA
   {658.48792, -546.98334, 16.33594},
   {-2124.44043, 208.22417, 35.22341},
   {249.56505, 1420.55273, 10.56574},
   {1427.32214, 708.58142, 10.82031},
 }
 
Iniciar = createMarker ( -1867.4390869141,-1668.8072509766,21, "cylinder", 1.5, 16, 111, 231, 50)
local BlipI = createBlipAttachedTo( Iniciar, 59 )
local Random_Pos = math.random ( #Marker_Aleatorios )
local Entrega = createMarker ( Marker_Aleatorios, "cylinder", 1.5, 16, 111, 231, 50)
BlipEntrega = createBlipAttachedTo( Entrega, 0 )
setElementVisibleTo ( Entrega, root, false )
setElementVisibleTo ( BlipEntrega, root, false )
setElementData(BlipI,"blipName", "Emprego Sucateiro")
setBlipVisibleDistance(BlipI, 150)

 --[[
         ><><><><><><><><><><><><><><><><><><><><
         ><             Infos Trab             ><
         ><><><><><><><><><><><><><><><><><><><><
--]]
local Blip_Marcar = createBlipAttachedTo( Iniciar, 0 )
setElementVisibleTo ( Blip_Marcar, root, false )
function Infos_Emprego ( source )
	local Emprego = getElementData ( source, "Emprego" )
	if Emprego == "Sucateiro" then
		if isElementVisibleTo ( Blip_Marcar, source ) then
			setElementVisibleTo ( Blip_Marcar, source, false )
			triggerClientEvent(source, "addNotification", root, " Seu Local de Trabalho foi Desmarcado do Mapa")
		else
			setElementVisibleTo ( Blip_Marcar, source, true )
			triggerClientEvent(source, "addNotification", root, " Seu Local de Trabalho foi Marcado no Mapa")
		end
	end	
end    
addCommandHandler ( "infos", Infos_Emprego )

function Pegar_Pampa (source)
local Emprego = getElementData ( source, "Emprego" )
	if Emprego == "Sucateiro" then
		Bicicleta = createVehicle(509, -1867.4390869141,-1668.8072509766,21)
		warpPedIntoVehicle ( source, Bicicleta )
	else
		triggerClientEvent(source, "addNotification", root, "INFO: Apenas Sucateiros podem pegar cargas", "info")
	end
end	
addEventHandler("onMarkerHit", Iniciar, Pegar_Pampa)

function Comecar_Sucata (source)
local Emprego = getElementData ( source, "Emprego" )
	if (Bicicleta) and Emprego == "Sucateiro" then	
		setElementVisibleTo ( Entrega, source, true )
		setElementData(source, "Carga", true)
		setElementVisibleTo ( BlipEntrega, sorce, true)
	else
	triggerClientEvent(source, "addNotification", root, "INFO: Apenas Sucateiros podem pegar cargas", "info")
	end
end
addEventHandler ("onVehicleEnter", root, Comecar_Sucata)

local Recompensa = math.random(1000, 2000)

function Entregar_Sucata
local Emprego = getElementData (source, "Emprego")
	if getElementData(source, "Carga") == true then
		setElementVisibleTo (Entrega, source, false)
		setElementVisibleTo (BlipEntrega, source, false)
		setElementData(source, "Carga", false)
		givePlayerMoney(source, Recompensa)
		triggerClientEvent(source, "addNotification", root, "INFO: Você entregou a sucata e ganhou R$:"..getElementData(source, "Recompensa").."", "info")
	else
		triggerClientEvent(source, "addNotification", root, "INFO: Você não esta com a sucata na bicicleta, "info")
end
addEventHandler("onMarkerHit", Entrega, Entregar_Sucata)

--[[
         ><><><><><><><><><><><><><><><><
         ><          Anti_Bugs         ><
         ><><><><><><><><><><><><><><><><
--]]
addEventHandler( "onPlayerQuit", root,)
	function()
		if getElementData ( source, "Carga" ) == true then
			if isElement(Entrega) then destroyElement(Entrega) end
			if isElement(Bicicleta) then destroyElement(Bicicleta) end
			if isElement(BlipEntrega) then destroyElement(BlipEntrega) end
		end
	end)
  
addEventHandler( "onPlayerWasted", root,)
	function()
		if getElementData ( source, "Carga" ) == true then
			if isElement(Entrega) then destroyElement(Entrega) end
			if isElement(Bicicleta) then destroyElement(Entrega) end
			if isElement(BlipEntrega) then destroyElement(BlipEntrega) end
			setElementData( source, "Carga", false )	
		end
	end)

 

alguem pode me ajudar, esta linha 71, esta dando erro

local Emprego = getElementData (source, "Emprego")

 

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