Jump to content

βurak

Members
  • Posts

    370
  • Joined

  • Last visited

  • Days Won

    21

βurak last won the day on August 16 2023

βurak had the most liked content!

6 Followers

Recent Profile Visitors

6,225 profile views

βurak's Achievements

Mack

Mack (28/54)

161

Reputation

2

Community Answers

  1. can you try this local pedVoices = {} local pedIds = {} local updateTimer local currentSkinIndex = 0 function configureTable() local skinids = getValidPedModels() for i=1,#skinids do pedIds[skinids[i]] = true end end function writeTableDataToFile() local voiceFile = fileCreate("voices.csv") -- file located mods/deathmatch/resources folder fileWrite(voiceFile, "PEDMODEL, VOICETYPE, VOICENAME;\n") for _,v in pairs(pedVoices) do local formattedData = string.format("%s %s %s;\n", v.model_id, v.voice_type, v.voice_name) fileWrite(voiceFile, formattedData) end fileClose(voiceFile) pedVoices = {} pedIds = {} currentSkinIndex = nil end function setPlayerSkinAndAssignTable() if pedIds[currentSkinIndex] then setElementModel(localPlayer, currentSkinIndex) local voiceType, voiceName = getPedVoice(localPlayer) if voiceType and voiceName then data = {model_id=currentSkinIndex, voice_type=voiceType, voice_name=voiceName} table.insert(pedVoices, data) print(data.model_id, data.voice_type, data.voice_name) else data = {model_id=currentSkinIndex, voice_type="none", voice_name="none"} table.insert(pedVoices, data) print(data.model_id, data.voice_type, data.voice_name) end end if currentSkinIndex == 312 then if isTimer(updateTimer) then killTimer(updateTimer) updateTimer = nil end print("saving finished now writing file...") writeTableDataToFile() return end currentSkinIndex = currentSkinIndex + 1 end addCommandHandler("gv", function() if isTimer(updateTimer) then killTimer(updateTimer) updateTimer = nil end configureTable() updateTimer = setTimer(setPlayerSkinAndAssignTable, 1000, 0) end)
  2. I think this function takes into account things like the player's video settings and the size of the object, so try to set a low value. from wiki
  3. The object ID you use in your code cannot be used in mta, maybe that is why these inconsistencies
  4. https://community.multitheftauto.com/index.php?p=resources&s=details&id=1873
  5. No, this is a code sample, it will not work directly, you need to edit the admin panel.
  6. here is an example onPlayerScreenShot event does not carry who took the screenshot addCommandHandler("takess", function(player,_,targetName) if not targetName then return end local targetPlayer = getPlayerFromName(targetName) if not targetPlayer then return end local isScreenShot = takePlayerScreenShot(targetPlayer, 1920, 1080) if isScreenShot then outputChatBox(getPlayerName(player).." taked screenshot to "..targetName) end end)
  7. I'm not sure but check this out https://wiki.multitheftauto.com/wiki/CreateLight
  8. Yes, ids up to 1938 are working, 1938 is not working I think the situation is like this, I created this in a second variable and it worked thanks problem solved
  9. Hello, I am adding texture to the models using engineImportTXD, but when I enter the 8th id, no texture is assigned to this model. What is the reason for this? local txd = engineLoadTXD ("burlova_city.txd") engineImportTXD(txd, 1879,1947,1881,1902,1930,1880,1905,1938) --not working local txd = engineLoadTXD ("burlova_city.txd") engineImportTXD(txd, 1938) --working bug image https://ibb.co/2gJRrJm
  10. marker = createMarker(2169.62500, -1983.23706, 13.55469, "cylinder", 1) vehicles = {} addEventHandler("onMarkerHit", marker, function(player) vehicles[player] = createVehicle(408, 2169.62500 + 3, -1983.23706, 13.55469) end) addEventHandler("onPlayerQuit", root, function(type) if (type == "Quit") then destroyElement(vehicles[source]) --change player to source end end)
  11. you can handle it with toggleControl or showChat toggleControl(player,"chatbox", false) --or showChat(player, false)
  12. local lamppostList = { [1126] = true --enter lamp post ids } setTimer( function() local pVeh = getPedOccupiedVehicle(localPlayer) -- Get the players vehicle for i,v in pairs(getElementsByType("object", root, true)) do if (isElement(v)) and (getElementType(v) == "object") and (lamppostList[getElementModel(v)]) then if(pVeh) then setElementCollidableWith(pVeh,v, false) setElementCollidableWith(v,pVeh, false) end end end end, 500, 0) can you try this
  13. triggerServerEvent("attemptLogin", resourceRoot, Data[1][1], hashedPass) local passVerified = passwordVerify(passHashFromDB, pass) you are comparing hash to hash this function asks for the password in plain text so don't encrypt it on client side --local hashedPass = passwordHash(Data[1][2], "bcrypt",{}) --this
×
×
  • Create New...