Jump to content


  • Posts

  • Joined

  • Last visited

  • Days Won


Mr.Loki last won the day on September 23 2020

Mr.Loki had the most liked content!

About Mr.Loki

  • Birthday 04/08/1993


  • Gang
  • Location
  • Occupation
  • Interests
    Give me an apple... and I'll eat it!

Recent Profile Visitors

6,328 profile views

Mr.Loki's Achievements

Crime Partner

Crime Partner (30/54)



  1. Use the code button when posting code: getElementData(thePlayer, "ID") is returning a bool(true/false) Most likely the element data for ID isn't set for the player so it returns false which gives you the error that it is trying to combine a string and a bool. You can output the bool as a string by changing it to this: tostring(getElementData(thePlayer, "ID"))
  2. You would need to import that house model to a 3D modeling software like blender/3ds max (with the plugins that support modifying dff objects) or zmodeler and remove the box and create a new custom collision for the house.
  3. addEventHandler( "onPlayerChat", root, function( msg, ch ) cancelEvent() -- disable default chat and run our code instead. if ch == 0 then local newMsg = string.gsub(msg, '#%x%x%x%x%x%x', '') -- remove color codes from message local newName = string.gsub(getPlayerName(source), '#%x%x%x%x%x%x', '')-- remove color codes from name outputChatBox( newName..': '..newMsg, root, 255, 255, 525) end end )
  4. client is only predefined when calling a custom event from the client. Change it to source. Also you are destroying the element before detaching it which will cause an error.
  5. requestBrowserDomains({"www.convertmp3.io"}) local browser = createBrowser( 1, 1, false ) local currentSound = {} addEvent( 'Play' , true ) addEventHandler( 'Play' , root , function( link ) local vehicle = getPedOccupiedVehicle ( source ) local x, y, z = getElementPosition(vehicle) currentSound[source] = playSound3D( link, x, y, z ) attachElements(currentSound[source],vehicle) setSoundMaxDistance(currentSound[source],30) setSoundVolume(currentSound[source],50) end ) function fetch(_,url) if url and url ~= "" then fetchRemote("http://www.convertmp3.io/fetch/?format=JSON&video="..url, callback) end end addCommandHandler("p",fetch) function callback(data, error) if (error ~= 0) then return outputChatBox(error) end if (data == "ERROR") then return outputChatBox("data error") end local data = fromJSON("["..data.."]") if (data) then outputChatBox("Title: "..data.title) outputChatBox("Length: "..data.length) outputChatBox("Link: "..data.link) loadBrowserURL( browser, data.link ) end end addEventHandler( "onClientBrowserNavigate", browser, function( link ) if not link:find("www.convertmp3.io") then triggerServerEvent( 'play' , localPlayer , link ) -- trigger the event when the script actially gets the playable link! end end )
  6. Post the changes you made using the triggers. you are probably using localPlayer and not source from the play event
  7. You can use a loop inside another loop. 1 loop for rows and the other for columns. local cols,rows = 4,6 local size = 45 local space = size + 5 addEventHandler( "onClientRender", root, function( ) for row=0,rows-1 do for col=0,cols-1 do dxDrawRectangle( 10+(space*row), 300+(space*col), size, size ) end end end ) Or instead of calculating the positions in real-time you can store it in a table then draw them.
  8. i suggest you just move it to the client and use some triggers
  9. @IIYAMA he did use the last args of those functions which sets the visibility to thePlayer
  10. Check if the player is in a zone Disable the spawning of zombies for the player ???? Profit
  11. Once you unbind it and relaunch the client it will be bound to the z key unfortunately. Maybe you can make an issue here and hope that the team can add it.
  12. You can't unbind it for everyone because it a default MTA bind you just have to tell them to use the unbind command.
  • Create New...