• 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

103 Excellent

About Mr.Loki

  • Rank
    Playa Partner
  • Birthday 04/08/1993


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

Recent Profile Visitors

1,877 profile views
  1. Hydra lock on fire missiles

    addEventHandler( "onClientVehicleDamage", root, function( att, dtype ) if att and and == localPlayer then if source.controller == localPlayer and localPlayer.vehicle.model == 520 then local chance = math.random(100) <= 90 and true or false if chance and dtype == 20 then blowVehicle( localPlayer.vehicle ) -- you might not want to use this if you want to see who killed the player end end end end ) Just an idea (Not tested)
  2. You should be fine using onClientColShapeHit. It is used for physical stuff in the server (that you can see) players, objects, vehices etc... Also it is worded as "Hit" for a reason. You don't hit your desk by putting your hand inside of it.
  3. [BUG] How to fix this bug in my nametag script?

    This isn't the whole code... how can we work with this? Also.. why do you have a timer inside of a render function?
  4. [Help]problems with CarSell

    local sellMarker = createMarker( -1545.0999755859, 126.80000305176, 2.5, "cylinder", 22, 255, 0, 0, 120) local myBlip = createBlip( -1545.0999755859, 126.80000305176, 3.5999999046326, 55, 1.5, 255, 0, 255, player ) function sellVehicle(player) if (getElementType(player) == "player") then if (not getPedOccupiedVehicle(player)) then outputChatBox("You need to be in a Vehicle to sell it.", player, 255, 0, 0) return end local vehicle = getPedOccupiedVehicle(player) local prices = math.random(4000, 10000) givePlayerMoney(player, prices) outputChatBox("You have sold the "..getVehicleName(vehicle).. " for "..prices.."!", player, 0, 255, 0 ) setVehicleLocked ( vehicle, true ) removePlayerFromVehicle ( player ) setTimer(function(veh) respawnVehicle(veh) setVehicleLocked(veh,false) end,5000,1,vehicle) end end end addEventHandler("onMarkerHit",sellMarker, sellVehicle, carRespawn)
  5. [HELP]Random Spawn

    Create a table with with spawn points then just spawn the forms randomly with it.
  6. setElementData

    You need to read and modify the data before overwriting it getElementData Modify the table and add new stuff Then setData
  7. [Question] Animating dxDrawMaterialLine3D

    Try this local size = 1 local img = point(100,-1) local rot = 0 function createIMG(dt) local x,y,z = getElementPosition( localPlayer ) local rx = math.sin(rot)*size local rz = math.cos(rot)*size dxDrawMaterialLine3D( x-rx, y, 1+z-rz, x+rx, y, 1+z+rz, img, size*2, -1, x, y+1, 1+z ) rot = rot +(.01*dt/17) end addEventHandler("onClientPreRender", root, createIMG)
  8. [Question] Animating dxDrawMaterialLine3D

    For it to rotate you need to use the lookAt args and and use sine and cosine to rotate around the x and y. Also the way u calculated the size made the image oval and i fixed that. local size = 3 local img = point(500,-1) local rot = 0 function createIMG() local x,y,z = local rx = math.sin(rot)*1 local ry = math.cos(rot)*1 dxDrawMaterialLine3D( x, y, z, x, y, z+size, img, size, -1, x+rx, y+ry, z ) rot = rot +.01 end addEventHandler("onClientRender", root, createIMG)
  9. Timer

    Store the timer in a table for each player for example Table[player]= Timer(function ()end,3000,1) And to check you simply do if isTimer(Table[player]) then Output you deny message else Let them in end
  10. [QUESTION] Possible convert Vice City map to MTA?

    Yes check the mapping section of the forums
  11. [HELP] Browser

    That's because there are other domains that the site uses for resources like media. Use this event to capture all of them that were blocked and store them in a table somewhere Then requestBrowserDomains of that table with the blocked domains You may need to refresh and repeat before all domains can be unblocked so save them somewhere and when someone tries to go to that site in the server use the request domains function and send a table of all the domains that should be whitelisted.
  12. [HELP] Browser

    Yeah you can but you'd need to whitelist a bunch of domains that the site uses.
  13. Help Me!!

  14. creating vehicle

    You will need to use triggerServerEvent and create the vehicle on the server then you can use warpPedIntoVehicle to teleport the player instantly into the vehicle on creation.
  15. Clickable dx rectangle/text

    You need to add the dxVisible var to your clicking event so it only executes if dxVisible is true. Like this: function onClick(button, state) if dxVisible and (button == "left") and (state == "up") then -- check if dx-rectangle is showing here if isMouseInPosition( 490, 284, 116, 47 ) then outputChatBox ( "Машина заспавнена!" ) --car spawn createVehicle(434,x,y,z) y = y + 5 elseif isMouseInPosition( 737, 284, 116, 47 ) then outputChatBox ( "Вы сменили скин!" ) --skin change setElementModel ( player, 25) end end end addEventHandler( "onClientClick", root, onClick )