Jump to content

albers14

Members
  • Posts

    73
  • Joined

  • Last visited

Everything posted by albers14

  1. Owh ye thats true. Thanks for your help man!
  2. local sW, sH = guiGetScreenSize() local browser = createBrowser(sW,sH,false,false) function renderYt() dxDrawImage(0,0,sW,sH,browser,0,0,0,tocolor(255,255,255,255),true) showCursor(true) end function createIt() loadBrowserURL(source,"https://www.youtube.com/watch?v=RgKAFK5djSk") focusBrowser(browser) addEventHandler("onClientRender", root, renderYt) end addEventHandler("onClientBrowserCreated", browser, createIt) addEventHandler("onClientClick", root, function(button, state) if state == "down" then injectBrowserMouseDown(browser, button) outputChatBox("Injected") else injectBrowserMouseUp(browser, button) outputChatBox("InjectedUp") end end) So that is my code. Seems like it doesnt detect my clicks on the website, but mta detects it fine? (Outputting to chat) Any ideas how to fix this?
  3. Yep and banning for money is just not cool mate...
  4. Make an account system. Their account name shouldnt change when they donate. But their nickname should change.
  5. Draw a big fat dxDraw rectangle over it, with an lowered alpha and the grey color, lol.
  6. Nop Hypex, onClientElementStreamIn should do the job. https://wiki.multitheftauto.com/wiki/On ... ntStreamIn Together with "getElementType(streamedInObject) == "vehicle" then " then you use isElementWaitingForGroundToLoad(streamedInObject) in case thats true freeze and setTimer else do nothing.
  7. Use onClientElementStreamIn and freeze the vehicle clientsided incase its ground arent loaded. Then check with a timer or smth, if the vehicle is still waiting on ground to load, if it isnt waiting then unfreeze the element and stop the timer.
  8. Is thePlayer a string or a player element? And how are you going to use it? Uhm and why is server better than client?
  9. albers14

    SQLITE

    If this is the case then I fucking love you (no homo) lol gonna post with a edit tomorrow
  10. albers14

    SQLITE

    Please guys? Else any ideas to set a specific ID of the awl row?
  11. albers14

    SQLITE

    Bump any solution on this?
  12. It automaticly calculate that when you insert the positions.
  13. albers14

    SQLITE

    Hey guys, I am wondering how I retrieve the row id in a SQLite table? My script looks like this function createDB() executeSQLQuery("CREATE TABLE IF NOT EXISTS spawncar(id INT, x TEXT, y TEXT, z TEXT, xr TEXT, yr TEXT, zr TEXT, r INT, g INT, b INT, r2 INT, g2 INT, b2 INT, nitro TEXT, lockType TEXT, lockedTo TEXT)") createMarkers() end addEventHandler("onResourceStart", resourceRoot, createDB) function createMarkers() SQLmarker = executeSQLQuery("SELECT * FROM spawncar") markers = {} for i,v in ipairs(SQLmarker) do local marker = createMarker(v.x,v.y,v.z-1, "cylinder", 2, 255,0,0,150) setElementData(marker,"row",v.rowid) -- At here I wanted to retrieve the data about the rowid and assign the ID to the marker, but how can I do that? setElementData(marker, "carspawner",true) setElementData(marker, "carid", v.id) setElementData(marker, "x",v.x) setElementData(marker, "y",v.y) setElementData(marker, "z",v.z) setElementData(marker, "xr",v.xr) setElementData(marker, "yr",v.yr) setElementData(marker, "zr",v.zr) setElementData(marker, "r",v.r) setElementData(marker, "g",v.g) setElementData(marker, "b",v.b) setElementData(marker, "r2",v.r2) setElementData(marker, "g2",v.g2) setElementData(marker, "b2",v.b2) setElementData(marker, "nitro",v.nitro) setElementData(marker, "lock",v.lockType) setElementData(marker, "lockedTo",v.lockedTo) end end
  14. Hey guys, wanna know how to report a server for stealing resources. Can we report it to MTA devs or smth? - Albers
  15. THAT GUY SHOULD GET A MEDAL! HE IS TOTALLY RIGHT Good luck with your little rpg damien...
  16. First of all your from DK? Next, there is no ID in MTA. So unless you had somewhere set the ID of the player then you cant do that stuff.. use getPlayerFromName instead, it finds the player element based on the name.
  17. Is it possible to get a script to output a .txt file or something with all running resources? If so what function does I need to get all the running resources?
  18. Heya I got a question about if its possible to remove a single player from the scoreboard even if the player is online? If so could someone please explain how it would be able thanks
  19. getVehicleSirens is bugged it returns nil.
  20. Hey all I tried to make this script for outputting all the information about all siren points at my vehicle but unsuccesfull function getSirens(thePlayer) if thePlayer and isPedInVehicle(thePlayer) then sirenData = getVehicleSirens(getPedOccupiedVehicle(thePlayer)) parm = getVehicleSirenParams(getPedOccupiedVehicle(thePlayer)) int = parm.SirenCount for i = 1,int do outputChatBox("setVehicleSirens(getPedOccupiedVehicle(thePlayer),"..i..","..tostring(sirenData[i][4])..","..tostring(sirenData[i][5])..","..tostring(sirenData[i][6])..","..tostring(sirenData[i][1])..","..tostring(sirenData[i][2])..","..tostring(sirenData[i][3])..")") end end end addCommandHandler("specs", getSirens) The outputchatbox 6 last arguments outputs nil where they should give me a number. Any solution? The for i = 1, int do works fine as it outputs the number find
  21. And how to do those shaders? Any place I can read about it ?
  22. Heya all. I am going to work abit with dxDraw and thought about the possibility to put a text on a object? Which functions should I use and how should I use them? I am not asking for a full code as I want to learn something from it not just have it Thanks
  23. Post the code where the element get created. Else let me explain. What I can see is you already got a table with the objects whatever.. Create a new table called objectOwner, and everytime you create a new object you use the code objectOwner[theObject] = thePlayer Which means you are saying the object owner of the theObject, is a player data. The player which created theObject. And then you check if the clicked element is owned by thePlayer with, addEvent( 'onDestroyElement',true ) addEventHandler( 'onDestroyElement',root, function( ) if source then if objectOwner[source] == thePlayer then destroyElement( source ) end end ) Should be working but not tested
  24. With debug he means using outputChatBox at all if functions to check if they pass through the restriction.
×
×
  • Create New...