Mr.Loki

Members
  • Content Count

    667
  • Joined

  • Last visited

  • Days Won

    3

Mr.Loki last won the day on September 16 2017

Mr.Loki had the most liked content!

Community Reputation

164 Celebrity

About Mr.Loki

  • Rank
    Crime Partner
  • Birthday 04/08/1993

Details

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

Recent Profile Visitors

4,099 profile views
  1. Mr.Loki

    [HELP] How to sync the sound for all players?

    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. Mr.Loki

    [HELP] How to sync the sound for all players?

    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 )
  3. Mr.Loki

    [HELP] How to sync the sound for all players?

    Post the changes you made using the triggers. you are probably using localPlayer and not source from the play event
  4. Mr.Loki

    Question about Dx

    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. Mr.Loki

    getOffsetFromXYZ

    findRotation
  6. Mr.Loki

    [Help] Funcion

    i suggest you just move it to the client and use some triggers
  7. Mr.Loki

    [Help] Funcion

    @IIYAMA he did use the last args of those functions which sets the visibility to thePlayer
  8. Mr.Loki

    [Question] File download

    It's mostly just mods
  9. Mr.Loki

    Zombies spawning in anti zombie zone

    Check if the player is in a zone Disable the spawning of zombies for the player ???? Profit
  10. Mr.Loki

    [HELP] voice chat push to talk

    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.
  11. Mr.Loki

    [HELP] voice chat push to talk

    You can't unbind it for everyone because it a default MTA bind you just have to tell them to use the unbind command.
  12. Mr.Loki

    [help]getplayerserial

    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.
  13. Mr.Loki

    [HELP] voice chat push to talk

    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!
  14. Mr.Loki

    disable deathmatch in some cities

    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.
  15. Mr.Loki

    [HELP] Moving All Objects At Once

    NeXTreme's Editor Tools perfect for the job, plus lots more features.