ReGo
Members-
Posts
30 -
Joined
-
Last visited
Everything posted by ReGo
-
i am noobie on images and draw text, so i have no idea
-
any ideas how i can put image on this? Client side toBeShowed = toBeShowed.."Tralala: "..anotherone(this is for the text which will come on that image)).."\n" So basiacly i need to put image on that anotherone ( so the text will be on image)
-
Hey, where is show mta sdk password? define('SDK_IP', ""); define('SDK_PORT', "22003"); define('SDK_USER', "where is this?"); define('SDK_PASSWORD', "and this");
-
-- new clothing stuff values.id = exports.mysql:query_insert_free("INSERT INTO clothing (skin, url, description, price) VALUES (" .. tonumber(values.skin) .. ", '" .. exports.mysql:escape_string(values.url) .. "', '" .. exports.mysql:escape_string(values.description) .. "', " .. tonumber(values.price) .. ")") if values.id then savedClothing[values.id] = values outputChatBox('Drēbes pievienotas ar ID ' .. values.id .. '.', client, 0, 255, 0) else outputChatBox('Neizdevās pievienot drēbes.', client, 255, 0, 0) end else -- old clothing stuff local existing = savedClothing[values.id] if existing then if exports.mysql:query_free('UPDATE clothing SET skin = ' .. tonumber(values.skin) .. ', description = "' .. exports.mysql:escape_string(values.description) .. '", price = ' .. tonumber(values.price) .. ' WHERE id = ' .. tonumber(values.id)) then outputChatBox('Apģērbs saglabats.', client, 0, 255, 0) existing.skin = tonumber(values.skin) existing.description = tostring(values.description) existing.price = tonumber(values.price) else outputChatBox('Apģērbs netika saglabāts.', client, 255, 0, 0) end else outputChatBox('Neizdevās atrast apģērbus.', client, 255, 0, 0) end end end end, false)
-
[center]function collectMoney(thePlayer, shopElement) local pedName = getPedName(shopElement) local playerName = getPlayerName(thePlayer):gsub("_", " ") local sPendingWage = tonumber(getElementData(shopElement, "sPendingWage")) local sIncome = tonumber(getElementData(shopElement, "sIncome")) local profit = sIncome - sPendingWage if profit >= 0 then if sIncome > 0 then if exports.global:giveMoney(thePlayer, sIncome) then setTimer(function () exports.global:sendLocalText(thePlayer, "* "..pedName.." gives "..playerName.." a couple of dollar notes and a jar of coins.", 255, 51, 102, 30, {}, true) storeKeeperSay(thePlayer, "This is what we've got so far, boss. Keep it please.", pedName) setElementData(shopElement, "sIncome", 0, true) mysql:query_free("UPDATE `shops` SET `sIncome`='0' WHERE id='"..tostring(getElementData(shopElement, "dbid")).."' ") playCollectMoneySound(shopElement) --triggerClientEvent(thePlayer, "shop:toggleGuiElement:bCollectProfit", thePlayer, false, shopElement) return true end, 3000, 1) end end if sPendingWage > 0 then if not solvePendingWage(thePlayer, shopElement) then --triggerClientEvent(thePlayer, "shop:toggleGuiElement:bCollectProfit", thePlayer, true, shopElement) return false end end else if sPendingWage > 0 then if not solvePendingWage(thePlayer, shopElement) then --triggerClientEvent(thePlayer, "shop:toggleGuiElement:bCollectProfit", thePlayer, true, shopElement) return false end end if sIncome > 0 then if exports.global:giveMoney(thePlayer, sIncome) then setTimer(function () exports.global:sendLocalText(thePlayer, "* "..pedName.." gives "..playerName.." a couple of dollar notes and a jar of coins.", 255, 51, 102, 30, {}, true) storeKeeperSay(thePlayer, "This is what we've got so far, boss. Keep it please.", pedName) setElementData(shopElement, "sIncome", 0, true) mysql:query_free("UPDATE `shops` SET `sIncome`='0' WHERE id='"..tostring(getElementData(shopElement, "dbid")).."' ") playCollectMoneySound(shopElement) --triggerClientEvent(thePlayer, "shop:toggleGuiElement:bCollectProfit", thePlayer, false, shopElement) return true end, 3000, 1) end end end return false end addEvent("shop:collectMoney", true ) addEventHandler("shop:collectMoney", getRootElement(), collectMoney)[/center] Please add command '/collectmoney' help me please
-
local _vehiclecache = {} local function findVehicleName( value ) if _vehiclecache[value] then return _vehiclecache[value] end for _, theVehicle in pairs( getElementsByType( "vehicle" ) ) do if getElementData( theVehicle, "dbid" ) == value then local vehID = getElementModel( theVehicle ) if (vehID==603) then return " (1980 Pontiac Trans Am) " end if (vehID==474) then return " (1950 Mercury) " end if (vehID==403) then return " (Scania Elite) " end if (vehID==490) then return " (BMW X5) " end if (vehID==579) then return " (1992 Land Rover) " end if (vehID==429) then return " (1992 Dodge Viper RT) " end if (vehID==589) then return " (1992 Volkswagen Golf GTI) " end if (vehID==554) then return " (1992 Chevy 1500) " end if (vehID==533) then return " (Renault Cleo Sport) " end if (vehID==445) then return " (1989 Mercedes Benz 300D) " end if (vehID==489) then return " (1980 Ford Branco) " end if (vehID==419) then return " (1975 Cadillac Eldorado) " end if (vehID==471) then return " (ATV Honda) " end if (vehID==411) then return " (1992 Acura NSX) " end if (vehID==574) then return " (Ford Street Cleaner) " end if (vehID==412) then return " (1960 Chevy Impala) " end if (vehID==496) then return " (1985 Honda CRX) " end if (vehID==404) then return " (1967 Chevy Nova Wagon) " end if (vehID==507) then return " (1992 Buick Roadmaster) " end if (vehID==400) then return " (1992 Jeep Cheorokee) " end if (vehID==526) then return " (1992 Ford Thunderbird) " end if (vehID==555) then return " (1961 Jaguar E-Type) " end if (vehID==402) then return " (1987 Camaro Iroc) " end if (vehID==480) then return " (1990 Porsche 911) " end if (vehID==551) then return " (92 Ford Crown Victoria) " end if (vehID==550) then return " (1991 Honda Accord sedan) " end if (vehID==436) then return " (1985 Honda Prelude) " end if (vehID==541) then return " (1990 Ford GT40) " end if (vehID==506) then return " (1992 Mitsubishi 3000GT) " end if (vehID==466) then return " (1961 Dodge Polara) " end if (vehID==475) then return " (970 Chevy Chevelle) " end if (vehID==479) then return " (1977 Ford LTD Wagon) " end if (vehID==405) then return " (1991 BMW 525i) " end if (vehID==602) then return " (1992 Dodge Stealth) " end if (vehID==470) then return " (AM General HMMWV) " end if (vehID==587) then return " (1992 Nissan 300x) " end if (vehID==542) then return " (1969 Pontiac GTO) " end if (vehID==565) then return " (90 Honda Civic Hatch) " end if (vehID==451) then return " (90 Ferrari F40) " end if (vehID==559) then return " (92 Toyota Supra) " end if (vehID==576) then return " (57 Chevy Bel Air) " end if (vehID==467) then return " (58 Dodge Coronet) " end if (vehID==567) then return " (63 Chevrolet Bel-Air) " end if (vehID==410) then return " (1980 Dodge Aries) " end if (vehID==575) then return " (1954 Caddilacdo) " end if (vehID==566) then return " (1984 Chevrolet MonteCarlo) " end if (vehID==598) then return " (1990 Chevrolet Caprice) " end if (vehID==428) then return " (GMC TopKick) " end if (vehID==523) then return " (Police Kawasaki KZ1000) " end if (vehID==534) then return " (P76 Lincoln Mark 5) " end if (vehID==493) then return " (Jetmax) " end if (vehID==571) then return " (Kart) " end -- [428]="Securicar", [523]="HPV1000" end end return " (Invalid vehicle name\nplease report to an admin!)" end Other cars dont working, only this car's, please help
-
Please help me.....
-
dont working, this script, vehicle key [car name] is "?"
-
CarNames = {[603] = "1980 Pontiac Trans Am", [474] = "1950 Mercury", [403] = "Scania Elite", [490] = "BMW X5", [579] = "1992 Land Rover", [429] = "1992 Dodge Viper RT", [589] = "1992 Volkswagen Golf GTI",[554] = "1992 Chevy 1500", [533] = "Renault Cleo Sport", [445] = "1989 Mercedes Benz 300D", [489] = "1980 Ford Branco", [419] = "1975 Cadillac Eldorado", [471] = "ATV Honda", [411] = "1992 Acura NSX", [574] = "Ford Street Cleaner", [412] = "1960 Chevy Impala", [496] = "1985 Honda CRX", [404] = "1967 Chevy Nova Wagon", [507] = "1992 Buick Roadmaster", [400] = "1992 Jeep Cheorokee", [526] = "1992 Ford Thunderbird", [555] = "1961 Jaguar E-Type", [402] = "1987 Camaro Iroc", [480] = "1990 Porsche 911", [551] = "92 Ford Crown Victoria", [550] = "1991 Honda Accord sedan", [436] = "1985 Honda Prelude", [541] = "1990 Ford GT40", [506] = "1992 Mitsubishi 3000GT", [466] = "1961 Dodge Polara", [475] = "970 Chevy Chevelle", [479] = "1977 Ford LTD Wagon", [405] = "1991 BMW 525i", [602] = "1992 Dodge Stealth ", [470] = "AM General HMMWV", [587] = "1992 Nissan 300x", [542] = "1969 Pontiac GTO", [565] = "90 Honda Civic Hatch", [451] = "90 Ferrari F40", [559] = "92 Toyota Supra", [576] = "57 Chevy Bel Air", [467] = "58 Dodge Coronet", [567] = "63 Chevrolet Bel-Air", [410] = "1980 Dodge Aries", [575] = "1954 Caddilac", [566] = "1984 Chevrolet MonteCarlo", [598]="1990 Chevrolet Caprice", [428]="GMC TopKick", [523]="Police Kawasaki KZ1000", [534] = "76 Lincoln Mark 5" } function findVehicleName(vehicle) if (type(CarNames[getElementModel(vehicle)]) == "string") then return CarNames[getElementModel(vehicle)] else return getVehicleNameFromModel(getElementModel(vehicle)) end end local _vehiclecache = {} local function findVehicleName( value ) if _vehiclecache[value] then return _vehiclecache[value] end for _, theVehicle in pairs( getElementsByType( "vehicle" ) ) do if getElementData( theVehicle, "dbid" ) == value then _vehiclecache[value] = getVehicleName( theVehicle ) return _vehiclecache[value] end end return "?" end Please help, dont working
-
can you please create the C_side like this when it excluded the car engine automatically switches off the radio?
-
radio = 0 lawVehicles = {596, 597, 598, 599, 407, 544, 601} local totalStreams = 18 --Update this with the number of streams local theTimer local streams = { } --Template: streams[Next Number In Order] = { "Link to Stream", "Name of Stream" } streams[1] = {"http://relay.181.fm:8098", "87.9 - Salsa FM"} streams[2] = {"http://80.232.162.149:8000/spin96mp3", "90.0 FM - Spin FM"} streams[3] = {"http://lr2mp1.latvijasradio.lv:8002", "91.5 FM - Latvijas Radio 2"} streams[4] = {"http://195.13.200.164:8000", "91.9 FM - TOP Radio"} streams[5] = {"http://www.larocca.lv:8000/larocca.m3u", "92.5 FM - LaRocca"} streams[6] = {"http://195.3.145.11:9006/", "93.1 FM - PlayHard Radio"} streams[7] = {"http://listen.radionomy.com/goth-n-metal", "94.0 FM - Goth 'n' Metal"} streams[8] = {"http://radio1.clubradio.lv:8000/live128", " 101.1 FM - Club Radio"} streams[9] = {"http://play.russianradio.eu/", " 101.5 FM - Russian Radio"} streams[10] = {"http://listen.radionomy.com/a2r-rap-us", "102.6 FM - A2R Rap US"} streams[11] = {"http://stream.europeanhitradio.com:8000/ehr64", "104.3 FM - Eiropas Hitu Radio"} streams[12] = {"http://80.232.162.149:8000/swh96mp3", "105.2 FM - SWH"} streams[13] = {"http://72.13.91.147:8000", " 106.2 FM - Dubstep Radio"} streams[14] = {"http://skonto.ls.lv:8002/mp3", "107.2 FM - Radio Skonto"} streams[15] = {"http://mms-live.online.no/p4_nrj_mp3_hq", "107.5 FM - NRJ HMO FM"} streams[16] = {"http://blackbeats.fm/listen.asx", "107.6 FM - Beats FM"} streams[17] = {"http://relay.181.fm:8034", "107.7 FM - Country FM"} streams[18] = {"http://radio2.capitalfm.lv:8000/listen.pls", "107.9 FM - Capital FM"} streams[19] = {"http://relay.181.fm:8068","181.2 - Old School 181 FM"} streams[20] = {"http://relay.181.fm:8132", "181.5 - Oldies 181 FM"} streams[21] = {"http://108.61.73.119:8054", "106.2 FM - The Beat"} local soundElement = nil local soundElementsOutside = { } function check(thePlayer) outputChatBox(getElementData(getLocalPlayer(), "streams"), 255, 0, 0) end addCommandHandler("checkme", check, false, false) function setVolume(commandname, val) if tonumber(val) then val = tonumber(val) if (tonumber(val) >= 0 and tonumber(val) <= 100) then triggerServerEvent("car:radio:vol", getLocalPlayer(), tonumber(val)) outputChatBox("Radio skaļums nomainīts uz: "..tonumber(val).."%") return end end outputChatBox("Nē.") end addCommandHandler("setvol", setVolume) local textShowing = false function showStation() local screenwidth, screenheight = guiGetScreenSize () local width = 300 local height = 100 local x = (screenwidth - width)/2 local y = screenheight - (screenheight/8 - (height/8)) local meta = getSoundMetaTags(source) local theVehicle = getPedOccupiedVehicle(getLocalPlayer()) if (theVehicle) then local streamID = getElementData(theVehicle, "vehicle:radio") local streamTitle if tonumber(streamID) ~= 0 then streamTitle = streams[tonumber(streamID)][2] else streamTitle = "Radio ir atslēgts" end dxDrawText (streamTitle, 46, screenheight - 41, screenwidth, screenheight, tocolor ( 0, 0, 0, 255 ), 0.6, "bankgothic" ) dxDrawText (streamTitle, 44, screenheight - 43, screenwidth, screenheight, tocolor ( 255, 255, 255, 255 ), 0.6, "bankgothic" ) end end function saveRadio(station) local radios = 0 if (station == 0) then return end if exports.vgscoreboard:isVisible() then cancelEvent() return end local vehicle = getPedOccupiedVehicle(getLocalPlayer()) local modelid = getElementModel(vehicle) for k, v in ipairs(lawVehicles) do if v == modelid then radio = 0 outputChatBox("Smieklīgi... Tavs magnetafons ir aizstāts ar rācijas iekārtu.", 255, 0, 0) cancelEvent() return end end if getVehicleType(vehicle) == "BMX" or getVehicleType(vehicle) == "Bike" or getVehicleType(vehicle) == "Quad" then cancelEvent() outputChatBox("Šim transportlīdzeklim nav radio!", player, 255, 0, 0) return end if (vehicle) then if getVehicleOccupant(vehicle) == getLocalPlayer() or getVehicleOccupant(vehicle, 1) == getLocalPlayer() then if not getVehicleEngineState(vehicle) then cancelEvent() outputChatBox("Radio ekrāns ir tumšs, varbūt tas nav ieslēgts? ((Transportlīdzekļa dzinējs nav iedarbināts.))", 255, 0, 0) radio = 0 return end if (station == 12) then if (radio == 0) then radio = #streams + 1 end if (streams[radio-1]) then radio = radio-1 else radio = 0 end elseif (station == 1) then if (streams[radio+1]) then radio = radio+1 else radio = 0 end end if not textShowing then addEventHandler("onClientRender", getRootElement(), showStation) if (isTimer(theTimer)) then resetTimer(theTimer) else theTimer = setTimer(removeTheEvent, 10000, 1) end textShowing = true else removeEventHandler("onClientRender", getRootElement(), showStation) addEventHandler("onClientRender", getRootElement(), showStation) if (isTimer(theTimer)) then resetTimer(theTimer) else theTimer = setTimer(removeTheEvent, 10000, 1) end end triggerServerEvent("car:radio:sync", getLocalPlayer(), radio) end cancelEvent() end end addEventHandler("onClientPlayerRadioSwitch", getLocalPlayer(), saveRadio) addEventHandler("onClientPlayerVehicleEnter", getLocalPlayer(), function(theVehicle) stopStupidRadio() radio = getElementData(theVehicle, "vehicle:radio") or 0 updateLoudness(theVehicle) end ) addEventHandler("onClientPlayerVehicleExit", getLocalPlayer(), function(theVehicle) stopStupidRadio() radio = getElementData(theVehicle, "vehicle:radio") or 0 updateLoudness(theVehicle) end ) function stopStupidRadio() removeEventHandler("onClientPlayerRadioSwitch", getLocalPlayer(), saveRadio) setRadioChannel(0) addEventHandler("onClientPlayerRadioSwitch", getLocalPlayer(), saveRadio) end addEventHandler ( "onClientElementDataChange", getRootElement(), function ( dataName ) if getElementType ( source ) == "vehicle" and dataName == "vehicle:radio" then local enableStreams = getElementData(getLocalPlayer(), "streams") if enableStreams == 1 then local newStation = getElementData(source, "vehicle:radio") or 0 if (isElementStreamedIn (source)) then if newStation ~= 0 then if (soundElementsOutside[source]) then stopSound(soundElementsOutside[source]) end local x, y, z = getElementPosition(source) newSoundElement = playSound3D(streams[newStation][1], x, y, z, true) soundElementsOutside[source] = newSoundElement updateLoudness(source) setElementDimension(newSoundElement, getElementDimension(source)) setElementDimension(newSoundElement, getElementDimension(source)) else if (soundElementsOutside[source]) then stopSound(soundElementsOutside[source]) soundElementsOutside[source] = nil end end end end elseif getElementType(source) == "vehicle" and dataName == "vehicle:windowstat" then if (isElementStreamedIn (source)) then if (soundElementsOutside[source]) then updateLoudness(source) end end elseif getElementType(source) == "vehicle" and dataName == "vehicle:radio:volume" then if (isElementStreamedIn (source)) then if (soundElementsOutside[source]) then updateLoudness(source) end end end -- end ) addEventHandler( "onClientPreRender", getRootElement(), function() if soundElementsOutside ~= nil then for element, sound in pairs(soundElementsOutside) do if (isElement(sound) and isElement(element)) then local x, y, z = getElementPosition(element) setElementPosition(sound, x, y, z) setElementInterior(sound, getElementInterior(element)) getElementDimension(sound, getElementDimension(element)) end end end end ) addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), function() local vehicles = getElementsByType("vehicle") for _, theVehicle in ipairs(vehicles) do if (isElementStreamedIn(theVehicle)) then spawnSound(theVehicle) end end end ) addEventHandler("onClientResourceStop", getResourceRootElement(getThisResource()), function() local vehicles = getElementsByType("vehicle") for _, theVehicle in ipairs(vehicles) do if (isElementStreamedIn(theVehicle)) then spawnSound(theVehicle) end end end )
-
Where is ressource **Vg Gamemode**
-
Hello, does anyone knows where you can exchange it for Gamemode: Roleplay occurring search
-
When I leave I do not maintain a server machine,
-
Hello, How do I put my my Handlingeditoram it keeps the machine when the server shuts down and turning on multiple machines is no longer handling editors, please help
-
LINE NUMBER ON/OFF | EXPAND/CONTRACT | SELECT ALL addEventHandler("onClientResourceStart", resourceRoot, function() txd = engineLoadTXD("wheel.txd", id) engineImportTXD(txd, id) dff = engineLoadDFF("wheel.dff", id) engineReplaceModel(dff, id) end ) This ir Car mods Settings Please Give Car Wheels mod Settings
-
or someone could tell how to put the machine disk mod For Roleplay Server