Jump to content

mafioz

Members
  • Posts

    81
  • Joined

  • Last visited

Everything posted by mafioz

  1. Line? Very little information. where did the variable "element" come from?
  2. veicletestdrive = {} addEvent("testdrive", true) addEventHandler("testdrive", getRootElement(), function(player,veicleid) veicletestdrive[player] = createVehicle(veicleid,-2422.01147, -605.47894, 132.56250) warpPedIntoVehicle(player,veicletestdrive[player]) setTimer(function(player) destroyElement(veicletestdrive[player]) setElementPosition(player, -2412.01294, -596.52393, 132.64844) end, 30000, 1, player) end )
  3. local cooldown = {} local tick = getTickCount() function dxConce() if exibindo_painelC == false then if cooldown[element] and tick - cooldown[element] < 5000 then return end cooldown[element] = tick addEventHandler("onClientRender", root, drawConce) exibindo_painelC = true bindKey('backspace','down', function() if exibindo_painelC == true then removeEventHandler("onClientRender", root, drawConce) setCameraTarget (localPlayer) exibindo_painelC = false end end) end end
  4. local cooldown = {} local tick = getTickCount() function dxConce() if exibindo_painelC == false then if cooldown[element] and tick - cooldown[element] < 5000 then return end cooldown = tick addEventHandler("onClientRender", root, drawConce) exibindo_painelC = true bindKey('backspace','down', function() if exibindo_painelC == true then removeEventHandler("onClientRender", root, drawConce) setCameraTarget (localPlayer) exibindo_painelC = false end end) end end
  5. You can create your own jump kick system. You need to make your own animation and write functions for the victim.
  6. If you have any further problems, please contact
  7. function giveV(player, car_id) if player then if car_id then local car_id = tonumber(car_id); local dados = getElementData(player, 'garagem'); for i,v in ipairs(dados) do if not v.id == car_id then table.insert(dados, {id = car_id, spawned = false}) else return false end end else return false end else return false end end
  8. Who is the source of events "meslek:basla"?
  9. Can you clarify what you want to do? I'm using a translator and didn't quite understand you
  10. I was prompted here that the text I need is drawn using CEF. Can someone explain this a little?
  11. Hello everyone i have a question for you. How to make beautiful text with your own font using different sizes? Usually text looks really bad, especially when resizing..
  12. local id = engineRequestModel("object")
  13. Are you asking if it's possible to create pickups for all the houses on the map without getting the coordinates manually? No, you need to manually get the coordinates.
  14. setElementInterior(player, int)
  15. No problem mafioz#2825
  16. function genRandomID() local rnumber = "" local chars = "1234567890" for i = 1, 5 do -- Here you define the number of digits, here a number with 5 digits will be generated local rand = math.random(#chars) rnumber = rnumber .. chars:sub(rand, rand) end return tonumber(rnumber) end function Start_Id ( _, acc ) if eventName == "onPlayerLogin" then local my_id = getAccountData(getPlayerAccount(source),"ID") if not my_id then my_id = genRandomID() setAccountData(getPlayerAccount(source),"ID",my_id) end setElementData(source, "ID", my_id or "N/A" ) outputChatBox ( "#838B83➲ #ff0000LOGIN #838B83➲ Nick: #ff0000 ( ".. getPlayerName(source) .." #ff0000) ID: ( "..(my_id or "N/A") .." )", root, 255,255,255,true) elseif eventName == "onPlayerLogout" then removeElementData( source, "ID" ) outputChatBox ( "#838B83➲ #ff0000LOGIN #838B83➲ Nick: #ff0000 ( ".. getPlayerName(source) .." #ff0000) Deslogou.", root, 255,255,255,true) --[[elseif eventName == "onResourceStart" then for _, player in pairs(getElementsByType("player")) do local acc = getPlayerAccount(player) if not isGuestAccount(acc) then setElementData(source, "ID", randomID or "N/A" ) end end--]] end end addEventHandler("onResourceStart", resourceRoot, Start_Id) addEventHandler("onPlayerLogout", root, Start_Id) addEventHandler("onPlayerLogin", root, Start_Id) function getPlayerID(id) v = false for i, player in ipairs (getElementsByType("player")) do if getElementData(player, "ID") == id then v = player break end end return v end --============================================================================================================================-- --=============================-- ----------- ID PLAYER ------------ --=============================-- function getnick(player, command, id, ...) if(id) then local playerID = tonumber(id) if(playerID) then local Player2 = getPlayerID(playerID) if(Player2) then outputChatBox ( "#838B83➲ #ff0000INFO #ff0000 ➲ #ff0000 Player name #ff0000" .. getPlayerName(Player2) .."", player, 255,255,255,true) else outputChatBox ( "#838B83➲ #ff0000ERRO #ff0000 ➲ #ff0000 The Player of ID: #ff0000( " .. id .. " ) #ff0000Was not found!", player, 255,255,255,true) end else outputChatBox ( "#838B83➲ #ff0000ERRO #ff0000 ➲ #ff0000 ID: #ff0000( " .. id .. " ) #ff0000Invalid!", player, 255,255,255,true) end else outputChatBox ( "#838B83➲ #ff0000 Use /id #ff0000[#ffffffID#00ff00]", player, 255,255,255,true) end end addCommandHandler("id", getnick) Try this * If you are already in the game, then you should re-sign in to get an ID
  17. https://community.multitheftauto.com/index.php?id=141&p=resources&s=details
×
×
  • Create New...