Jump to content

KariiiM

Members
  • Posts

    1,312
  • Joined

  • Last visited

Everything posted by KariiiM

  1. Are you looking for suggestions or for scripters?
  2. Try that, it may works and tell me the result --client side addEventHandler("onClientVehicleExplode", getRootElement(), function() -- or root, or getLocalPlayer setElementData( localPlayer, "neon", 0 ) -- Zerar local theVehicle = getPedOccupiedVehicle ( localPlayer ) triggerServerEvent ("detachNeon", getLocalPlayer(), theVehicle) end) --server side local neons = {} function detachNeon( theVehicle ) for index, v in pairs(neons[theVehicle]) do if v and isElement(v) then destroyElement(v) end end end addEvent( "detachNeon", true ) addEventHandler( "detachNeon", getRootElement(), detachNeon ) function onPlayerQuit() local playeraccount = getPlayerAccount ( source ) if ( playeraccount ) and not isGuestAccount ( playeraccount ) then local getNeonType = getElementData(source, "neon") if ( getNeonType ) then setAccountData ( playeraccount, "neon", getNeonType) local theVehicle = getPedOccupiedVehicle ( source ) if ( getNeonType ~= 0 ) and ( theVehicle ) then detachNeon( theVehicle ) end end end end addEventHandler ( "onPlayerQuit", getRootElement ( ), onPlayerQuit ) function onPlayerLogin (_, playeraccount ) if ( playeraccount ) then local getNeonTypeAccData = getAccountData ( playeraccount, "neon" ) if ( getNeonTypeAccData ~= 0 ) then setElementData(source, "neon", getNeonTypeAccData) end end end addEventHandler ( "onPlayerLogin", getRootElement ( ), onPlayerLogin )
  3. When the vehicle explode or when the player quit?
  4. His topic title says (problem with "return") ,so I focused on what he wants to do, which value wants to return let's wait his answer
  5. Not correct, What do you want to make?
  6. KariiiM

    Solved

    Use toJSON fromJSON
  7. You're in the wrong section which it's an english section, you can post your problem in the Spanish section. So you can clearly explain your problem better and what you want to do in a language you're master in and actually it's your main. Here you go: https://forum.multitheftauto.com/viewforum.php?f=122
  8. Good point, I hope he start make some efforts.
  9. Should works, copy the whole code carefully. function fly(_,target) if target then local targetplayer = getPlayerFromParticalName(target) if targetplayer then local vehicle = getPedOccupiedVehicle(targetplayer) if (isVehicleOnGround(vehicle) == true) then local sx, sy, sz = getElementVelocity (vehicle) setElementVelocity( vehicle ,sx+0.5, sy, sz+0.6 ) outputChatBox(getPlayerName(targetplayer).." #CFECEC was KICKED #ffcc33UP UP #00ff33", 213, 255, 255, true) end end end end addCommandHandler("flyman",fly) function getPlayerFromParticalName (name) local name = name and name:gsub("#%x%x%x%x%x%x", ""):lower() or nil if name then for _, player in ipairs(getElementsByType("player")) do local name_ = getPlayerName(player):gsub("#%x%x%x%x%x%x", ""):lower() if name_:find(name, 1, true) then return player end end end end
  10. Currently I am kinda busy and what you need isn't really easy it will take from me minutes to do it correctly
  11. KariiiM

    Solved

    Glad to hear that.
  12. Contacte moi pour beaucoup des informations.
  13. What about try doing it by yourself? and post what you've done with and keep your money to you.
  14. KariiiM

    Solved

    Try that, addEventHandler("onClientRender", getRootElement(), function () local x, y, z = -2844.7275390625,1290.7978515625,7.1015625 local mx, my, mz = getCameraMatrix() local distance = getDistanceBetweenPoints3D(x,y,z,mx,my,mz) local X, Y = getScreenFromWorldPosition(x,y,z+1.1,0.05) if (distance < 10) then if (X and Y) then dxDrawText("Mechanic", X, Y, X, Y, tocolor(255,255,255,255), 1, "default", "center", "center", false, false, false, false, false) end end end )
  15. KariiiM

    Solved

    Yes it's possible, you've to get the object's position and apply that on your code
  16. Show a full code because the problem is on onClientRender event the error says ,this event is already handled
  17. Try that, function(thePlayer) local owner = getAccountName(getPlayerAccount(thePlayer)) local check = dbPoll(dbQuery(connection,"SELECT Id FROM purchasedCars WHERE Owner = ? AND Slot = ?",tostring(owner),1),-1) if type(check) == "table" and #check > 0 then local id = tostring(check[1]["Id"]) local x,y,z = getElementPosition(thePlayer) createVehicle(id,x+5,y+5,z) end end
  18. KariiiM

    Solved

    You're welcome
  19. KariiiM

    Solved

    It should works correctly, try it and tell me the result addEventHandler("onClientRender", getRootElement(), function () for k,veh in pairs(getElementsByType("vehicle")) do if isElementOnScreen(veh) then local x, y, z = getElementPosition(veh) local X, Y = getScreenFromWorldPosition(x,y,z) local px, py, pz = getElementPosition(getLocalPlayer()) local dist = getDistanceBetweenPoints3D(x,y,z,px,py,pz) if dist < 40 then if X and Y then dxDrawText("TEXT", X, Y, X, Y, tocolor(255,255,0,255),1.5, "bankgothic", "center") end end end end end)
  20. KariiiM

    Solved

    Which warning? post it here
  21. KariiiM

    Solved

    Yeah now I got you, try that addEventHandler("onClientRender", getRootElement(), function () for k,veh in pairs(getElementsByType("vehicle")) do if isElementOnScreen(veh) then local x, y, z = getElementPosition(veh) local X, Y = getScreenFromWorldPosition(x,y,z) local px, py, pz = getElementPosition(getLocalPlayer()) local test = getDistanceBetweenPoints3D(x,y,z,px,py,pz) if test < 40 then dxDrawText("TEXT", X, Y, X, Y,tocolor(255,255,0,255),1.5,"bankgothic", "center")) end end end end)
  22. KariiiM

    Solved

    addEventHandler("onClientRender", getRootElement(), function () for k,veh in pairs(getElementsByType("vehicle")) do if isElementOnScreen(veh) then local x, y, z = getElementPosition(veh) local X, Y = getScreenFromWorldPosition(x,y,z) local px, py, pz = getElementPosition(getLocalPlayer()) local test = getDistanceBetweenPoints3D(x,y,z,px,py,pz) if test < 40 then dxDrawText("TEXT",353,675,671,713,tocolor(255,255,0,255),1.10,"arial","left","top",false,false,false) end end end end)
×
×
  • Create New...