Dumper Posted April 15, 2018 Share Posted April 15, 2018 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
idarrr Posted April 19, 2018 Share Posted April 19, 2018 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
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