-
Posts
1,058 -
Joined
-
Last visited
-
Days Won
1
Everything posted by Saml1er
-
I search how to add a background image to panel Freeroam
Saml1er replied to Furious^ONE!'s topic in Scripting
wndMain = { 'wnd', text = 'FR GUI', x = 10, y = 150, width = 280, controls = { {'img', src='test.png'}, {'lbl', text='Local player'}, {'br'}, {'btn', id='kill', onclick=killLocalPlayer}, {'btn', id='skin', window=wndSkin}, {'btn', id='anim', window=wndAnim}, {'btn', id='weapon', window=wndWeapon}, {'btn', id='clothes', window=wndClothes}, {'btn', id='playergrav', text='grav', window=wndGravity}, {'btn', id='warp', window=wndWarp}, {'btn', id='stats', window=wndStats}, {'btn', id='bookmarks', window=wndBookmarks}, {'br'}, {'chk', id='jetpack', onclick=toggleJetPack}, {'chk', id='falloff', text='fall off bike', onclick=toggleFallOffBike}, {'br'}, {'lbl', text='Pos:'}, {'lbl', id='xpos', text='x', width=45}, {'lbl', id='ypos', text='y', width=45}, {'lbl', id='zpos', text='z', width=45}, {'btn', id='setpos', text='map', window=wndSetPos}, {'btn', id='setinterior', text='int', window=wndSetInterior}, {'br'}, {'br'}, {'lbl', text='Vehicles'}, {'br'}, {'lbl', text='Current:'}, {'lbl', id='curvehicle'}, {'br'}, {'btn', id='createvehicle', window=wndCreateVehicle, text='create'}, {'btn', id='repair', onclick=repairVehicle}, {'btn', id='flip', onclick=flipVehicle}, {'btn', id='upgrades', window=wndUpgrades}, {'btn', id='color', onclick=openColorPicker}, {'btn', id='paintjob', window=wndPaintjob}, {'br'}, {'chk', id='lightson', text='Lights on', onclick=forceLightsOn}, {'chk', id='lightsoff', text='Lights off', onclick=forceLightsOff}, {'br'}, {'br'}, {'lbl', text='Environment'}, {'br'}, {'btn', id='time', window=wndTime}, {'chk', id='freezetime', text='freeze', onclick=toggleFreezeTime}, {'btn', id='weather', window=wndWeather}, {'btn', id='speed', window=wndGameSpeed} }, oncreate = mainWndShow, onclose = mainWndClose } -
So you want this script to work for a specific (1) player only? There are client side exported functions as well so: function click() if ( source == checkboxmoney ) then if guiCheckBoxGetSelected(checkboxmoney) then exports.scoreboard:scoreboardRemoveColumn ( 'Money') else exports.scoreboard:scoreboardAddColumn ('Money') end end end addEventHandler("onClientGUIClick",root,click) source: https://wiki.multitheftauto.com/wiki/Re ... scoreboard
-
I'm phone so I can't help but anyway try this: function deleteexportmoney() exports.scoreboard:removeScoreboardColumn('Money') end addEvent("deleteexportmoney",true) addEventHandler("deleteexportmoney",root,deleteexportmoney) function addexportmoney() exports.scoreboard:addScoreboardColumn('Money') end addEvent("addexportmoney",true) addEventHandler("addexportmoney",root,addexportmoney
-
Tss! Make them cirlced These rectangles look really good when animating ( moving in a circular path ).
-
I had the same problem when making my lobby script but I solved it using colshapes and createObject and using custom model for pickups.
-
It's easy, all you need to do is to increase text size and alpha when player's cursor enters a specific area on screen. You can simply calculate a rectangle using getCursorPosition EDIT: Use onClientRender to check cursor position every frame.
-
Yes, you'll have to read those files from server side and send them back to client side. I did this in my lobby script and I had no problems with it. @Bons: I stole your idea http://imgur.com/Xkfhe8q
-
function createFile ( file ) local createdFile = fileCreate(file) if createdFile then fileWrite( createdFile,file) fileClose( createdFile) end end local resName = "YOURresourceName" if not fileExists(":"..resName.."/model.txd") then local file = fileOpen(":"..resName.."/model.txd",true) if file then local txdFile = fileRead ( file, fileGetSize(file) ) fileClose(file) createFile ( txdFile) end end
-
Becaude we néed to see this function as well: FILEGetFile(what) , but if we ask you for more then you might think that we're trying to leak... Pm me your code if you want help.
-
please if u cant help then shut up He actually gave you a good advice. Learn how to respect.
-
Just like myonlake said that if someone is ready to run a million of queries on a computer ( not a big deal) then yes it is possible to decompile the script. ^
-
function pedLoad () APed = createPed ( 83, 2353, 2143, 11 ) if APed and isElement( APed ) then setTimer(setPedRotation,5000,1,APed,270 ) setTimer(setPedAnimation,5000,1,APed,"DANCING","DAN_Down_A",-1,true,true,true ) else outputChatBox("ERROR: Could not create ped") end end addEventHandler ( "onResourceStart", resourceRoot, pedLoad )
-
Try this local object = nil function object1() object = createObject ( 3095, 2276.4716796875,-3781.8464355459,41.400001525879, 0, 0, 270 ) if object and isElement (object) then setElementAlpha (object, 0) end end addEventHandler("onResourceStart", getRootElement(), object1)
-
I received a message in skype "Can you help me? can you make it for me?" I said no then he asks "Why man?". My my, people sure are unpredictable. stop lie man picture ? You deleted messages in skype, lol.
-
I received a message in skype "Can you help me? can you make it for me?" I said no then he asks "Why man?". My my, people sure are unpredictable.
-
is it another one for server side ? Nope but why don't you script it in client side?
-
I was searching hard for this one ;d @Max: Right.
-
Kind hearted bons Good job.
-
isKeyBound getFunctionsBoundToKey isControlEnabled -- depends on you if you want to use this or no.
-
You can do all this with 1 event handler but I don't got much time to anyway here: local Marker,Marker1 = createMarker ( -2235.21, -1736.60, 479.80, "cylinder", 2.5, 0, 0, 255, 170 ), nil function paraquedismo ( thePlayer, matchingDimension ) if isElementWithinMarker( thePlayer, Marker) then outputChatBox("Para pular de paraquedas digite /pular!", thePlayer, 255, 0, 0) end end addEventHandler ("onMarkerHit", Marker, paraquedismo) function pular ( playerSource, matchingDimension ) if isElementWithinMarker( playerSource, Marker) then setElementPosition( playerSource, -2235.21, -1736.60, 1300.80 ) giveWeapon ( playerSource, 46 ) setPedWeaponSlot(playerSource, getSlotFromWeapon(46)) outputChatBox("Caia no Alvo para ganhar 5000$!", thePlayer, 255, 0, 0) Marker1 = createMarker ( -2407.97, -596.58, 131.80, "cylinder", 7.0, 0, 0, 255, 170 ) local blip1 = createBlip( -2407.97, -596.58, 132.64, 0, 0, 0, 255, 255 ) setBlipSize ( blip1, 5 ) else outputChatBox("Você não está na área de Paraquedismo!", thePlayer, 255, 0, 0) end end addCommandHandler ( "pular", pular ) function cairmarker ( thePlayer, matchingDimension ) if isElementWithinMarker( thePlayer, source) then if Marker1 == nil and source ~= Marker1 then return end setPlayerMoney(thePlayer, 5000) outputChatBox("Você ganhou 5000$ por cair no alvo!", thePlayer, 255, 0, 0) else outputChatBox("Você não conseguiu cair no Alvo!", thePlayer, 255, 0, 0) end end addEventHandler ("onMarkerHit",resourceRoot, cairmarker)
-
local resp = get ( "*race.racerespawn" ) if resp and resp == "true" then set ( "*race.racerespawn","false" ) end Not tested but if you do it in this way then it should help, fix bugs if you find'em.
-
MYSQL Database [Solved] Anyone Who Has MYSQL PROBLEM COME
Saml1er replied to 3B00DG4MER's topic in Scripting
function testing( allnames ) local playerList = guiCreateGridList ( 0.80, 0.10, 0.15, 0.60, true ) local column = guiGridListAddColumn( playerList, "Player", 0.85 ) for k,v in pairs(allnames) do local row = guiGridListAddRow ( playerList ) guiGridListSetItemText ( playerList, row, column, v[1], false, false ) end end addEvent("onStart",true) addEventHandler("onStart",localPlayer,testing) -
local handler = Connection.create ( "sqlite", "file.db", "", "", "share=0" ) handler:exec(...) handler:query(...)