• Content Count

  • Joined

  • Last visited

  • Days Won


Mr.Loki last won the day on September 16 2017

Mr.Loki had the most liked content!

Community Reputation

168 Celebrity

About Mr.Loki

  • Rank
    Crime Partner
  • Birthday 04/08/1993


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

Recent Profile Visitors

5,323 profile views
  1. 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.
  2. requestBrowserDomains({""}) 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(""..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("[""]") if (data) then outputChatBox("Title: " outputChatBox("Length: " outputChatBox("Link: " loadBrowserURL( browser, ) end end addEventHandler( "onClientBrowserNavigate", browser, function( link ) if not link:find("") then triggerServerEvent( 'play' , localPlayer , link ) -- trigger the event when the script actially gets the playable link! end end )
  3. Post the changes you made using the triggers. you are probably using localPlayer and not source from the play event
  4. 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.
  5. i suggest you just move it to the client and use some triggers
  6. @IIYAMA he did use the last args of those functions which sets the visibility to thePlayer
  7. Check if the player is in a zone Disable the spawning of zombies for the player ???? Profit
  8. 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.
  9. You can't unbind it for everyone because it a default MTA bind you just have to tell them to use the unbind command.
  10. Either you didn't type the player's name correctly or your "getPlayerNameFromPart" function is bad. Add a check after the function to check if targetPlayer exists then continue the code.
  11. You don't need any special script to make it toggleable. the Z key has 2 binds on it when the key is "down" it calls "voiceptt 1" to enable voice and when it is "up" it calls "voiceptt 0" to disable voice using the voiceptt command without the 1 or 0 will make it toggle so you can simply bind voiceptt to any key and it will work as you want it. to remove voiceptt bind on z do this /unbind z down voiceptt /unbind z up voiceptt to bind to another key /bind your_key voiceptt The client must change the bind themselves. Also not everyone will like the same keys and shouldnt enforce everyone to use the same keys because not all keyboards are the same layout!
  12. Removing the check that checks if the attacker is an element before checking if the attacker is a player will cause errors because taking fall damage will call this event which does not have an attacker. Edit: It will work as intended but will leave your debug very messy.
  13. NeXTreme's Editor Tools perfect for the job, plus lots more features.