Jump to content

[HELP]Trigger


Dumper

Recommended Posts

Server.lua
 

addEvent("oyuncuBilgisi", true)
addEventHandler("oyuncuBilgisi", getRootElement(), function(hedef, theVehicle)
	 for key, value in ipairs(exports.pool:getPoolElementsByType("vehicle")) do
		local owner = tonumber(getElementData(value, "owner"))
		
				local dbid2 = getElementData(theVehicle, "dbid")
	    local fetchData = mysql:query_fetch_assoc( "SELECT `fiyat` FROM `vehicles` WHERE `id`='"..mysql:escape_string(getElementData(value, "dbid")).."'" )
        local fiyat = fetchData["fiyat"] or 0


	end
		triggerClientEvent(source, "oyuncuBilgisiDevam", source, hedef, fiyat )
end)

 

how do i attract this to the client

 

Client.lua
 

function showText(hedef,fiyat)
                        local fiyat = getElementData(theVehicle, "fiyat") or 0
									toBeShowed = toBeShowed.."Arac Fiyatı: "..fiyat.."\n"
									lines = lines + 1

 

Link to comment
function showText(hedef,fiyat)
  local fiyat = getElementData(theVehicle, "fiyat") or 0
  toBeShowed = toBeShowed.."Arac Fiyatı: "..fiyat.."\n"
  lines = lines + 1
end
addEvent("oyuncuBilgisiDevam", true)
addEventHandler("oyuncuBilgisiDevam", root, showText)

 

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