Jump to content

DreaM40BG

Members
  • Posts

    44
  • Joined

  • Last visited

Everything posted by DreaM40BG

  1. I open the youtube browse,r everything is ok for 2 seconds and wants to accept cookies - I click on accept and nothing happens.
  2. If u like the video - like, subscribe, comment, share Thanks
  3. Hello guys, how to make a banlist, mutelist and chat logs from my MTA server into my site ( https://dixiklo-servers.xyz/forum/index.php ) , I tried with a resource "webbans" or something like that and it didn't work.
  4. Ok nvm I found an another way, you can lock the topic but if anybody wants to make it for free, do it ;d
  5. Hello, I have a car shop resource, but people throw away they cars in the ocean or the car shop and there are 10+ cars in one and they explode, this is a problem. Can you edit this mod so people who not join in 48 hours get their cars despawned but it must stay in F2 and they can get it back by clicking on "Bring it here", the resource has this function. Or every 48 hours - despawn all cars but pls make function that spawn the car when it explode or something on the last place where it was (position bring it here) Also, can you make a function that outputchatbox when you try to enter the car its owner? It is really important, the resource cause lags because of the too many cars, I need it very soon. I can pay € from PayPal, I really need it and I can't code it. Download : https://drive.google.com/file/d/1r67hdUy8EoOi3WKOfb0GbgjSDjdqvCGc/view?usp=sharing
  6. It shows 1.XXXXXXXXXXXXXXX and the owner but when the owner leave the server it resets and doesn't show the owner, or when join again - doesn't show
  7. Apf, I was sleepy and I defined client.Lua as a server, now It is working but it has a bug: If the owner leave the server and connect again when I write /owner it shows that this car doesn't have an owner.
  8. The script is not working. :[ @VenomNX
  9. I will check it tomorrow and I will write. Thank you
  10. Like triggerserverevent or what? And how to make a "radar" for these cars, I mean how to see the driver list of the car in front of me, not to all in the server?
  11. Hello, I'm new at Lua and I want help - can you give me a script which when I'm near a car write /owner and it shows a GUI or idk outputchatbox with the last 5 drivers for example.
  12. I think I fixed it, lock the topic. Thanks
  13. https://drive.google.com/file/d/1BeqND1xf3iuCvATVB28ofkg1njb-5IPT/view There are too much scripts
  14. I don't see errors from this resource. https://imgur.com/a/RIMWh6M
  15. I've added a gas station mod but it cause lags and I couldn't understand why are these lags. It's important, can you please help me? Mod: https://drive.google.com/file/d/1BeqND1xf3iuCvATVB28ofkg1njb-5IPT/view?usp=sharing
  16. Please watch the full video and give your opinion here. If you like the video like, subscribe & comment In honor of jesse_pinkman & HenyKucT
  17. Hello dear MTA:SA players, Everything is OK with the voice chat except unmuting when reconnect (I tried with OnPlayerLogin but I couldn't do it successfully) and how to add mute duration? Also, how to make something like if players are talking only players near them to hear and for aclcheck for example "ChatControl" can talk to all the players on all the map? sPlayerMuting.Lua if isVoiceEnabled() then function setPlayerVoiceMuted ( player, muted ) if not checkValidPlayer ( player ) then return false end muted = not not muted or nil globalMuted[player] = muted return setPlayerVoiceBroadcastTo ( player, (not muted) and root or nil ) end function isPlayerVoiceMuted ( player ) if not checkValidPlayer ( player ) then return false end return not not globalMuted[player] end --Returns a list of players of which have muted the specified player function getPlayerVoiceMutedByList ( player ) if not checkValidPlayer ( player ) then return false end return tableToArray(mutedBy[player] or {}) end function updateMuted ( player ) setPlayerVoiceIgnoreFrom ( player, getPlayerVoiceMutedByList ( player ) ) end function addPlayerMutedBy () mutedBy[client] = mutedBy[client] or {} mutedBy[client][source] = true updateMuted ( client ) end addEventHandler ( "voice_mutePlayerForPlayer", root, addPlayerMutedBy ) function removePlayerMutedBy () if mutedBy[client] then mutedBy[client][source] = nil --Refresh the player updateMuted ( client ) end end addEventHandler ( "voice_unmutePlayerForPlayer", root, removePlayerMutedBy ) function addPlayerMutedByTable (players) --Single packet for multiple muted players for i,player in ipairs(players) do source = player addPlayerMutedBy() end end addEventHandler ( "voice_muteTableForPlayer", root, addPlayerMutedByTable ) addEventHandler ( "onPlayerQuit", root, function() mutedBy[source] = nil globalMuted[source] = nil end ) else setPlayerVoiceMuted = outputVoiceNotLoaded isPlayerVoiceMuted = outputVoiceNotLoaded getPlayerVoiceMutedByList = outputVoiceNotLoaded end -- Functions for backward compatibility only -- DO NOT USE THESE AS THEY WILL BE REMOVED IN A LITTLE WHILE -- function isPlayerMuted ( player ) return isPlayerVoiceMuted ( player ) end function setPlayerMuted ( player, muted ) return setPlayerVoiceMuted ( player, muted ) end function getPlayerMutedByList ( player ) return getPlayerVoiceMutedByList ( player ) end -- DO NOT USE THESE AS THEY WILL BE REMOVED IN A LITTLE WHILE -- addCommandHandler("vmute", function(player, cmd, targetname) local accName = getAccountName ( getPlayerAccount ( player ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "ChatControl" ) ) then local target = getPlayerFromPartialName(targetname) if not target then return outputChatBox("[DIXIKLO-Servers] * Player not found! ("..targetname..")", player) end setPlayerVoiceMuted(target, true) outputChatBox("[DIXIKLO-Servers] An administrator has muted "..targetname.."", player) end end) addCommandHandler("vunmute", function(player, cmd, targetname) local accName = getAccountName ( getPlayerAccount ( player ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "ChatControl" ) ) then local target = getPlayerFromPartialName(targetname) if not target then return outputChatBox("[DIXIKLO-Servers] Player not found! "..targetname.."", player) end setPlayerVoiceMuted(target, false) outputChatBox("[DIXIKLO-Servers] An administrator has unmuted "..targetname.."", player) end end) -- https://wiki.multitheftauto.com/wiki/GetPlayerFromPartialName function getPlayerFromPartialName(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 All the scripts: https://drive.google.com/file/d/1MgkDtkhr5dKaMZqx3iTTZeA1fLSPehA9/view?usp=sharing
  18. I didn't expect that it wouldn't be closed, but you are right. Thanks, lock the topic it is working now.
  19. Okay it takes money but don't give to the 2nd player. Not working, also no messages. function findPlayer(name) local matches = {} for i,v in ipairs(getElementsByType("player")) do if getPlayerName(v) == name then return v end local playerName = getPlayerName(v):gsub("#%x%x%x%x%x%x", "") playerName = playerName:lower() if playerName:find(name:lower(), 0) then table.insert(matches, v) end end if #matches == 1 then return matches[1] end return false end addCommandHandler("give", function(player, cmd, name, amount) local amount = tonumber(amount) if name and amount and amount > 0 and math.floor(amount) == amount then -- bugfix local targetid = findPlayer(name) local money = getPlayerMoney(player) if targetid ~= false then if money >= amount then takePlayerMoney(player, amount) givePlayerMoney(target, amount) outputChatBox("You gave " .. getPlayerName(target) .. " $" .. amount .. ".", player, 0, 255, 0, false) outputChatBox(getPlayerName(player) .. " gave you $" .. amount .. ".", target, 0, 255, 0, false) else outputChatBox("You do not have enough money.", player, 255, 0, 0, false) end end end end )
  20. [20-04-18 17:10:26] WARNING: givemoney/server.Lua:25: Bad argument @ 'getPlayerFromName' [Expected string at argument 1, got player] Not working. :< function findPlayer(name) local matches = {} for i,v in ipairs(getElementsByType("player")) do if getPlayerName(v) == name then return v end local playerName = getPlayerName(v):gsub("#%x%x%x%x%x%x", "") playerName = playerName:lower() if playerName:find(name:lower(), 0) then table.insert(matches, v) end end if #matches == 1 then return matches[1] end return false end addCommandHandler("give", function(player, cmd, name, amount) local amount = tonumber(amount) if name and amount and amount > 0 and math.floor(amount) == amount then -- bugfix local target = findPlayer(name) local money = getPlayerMoney(player) local targetid = getPlayerFromName(target) if targetid ~= false then if money >= amount then takePlayerMoney(player, amount) givePlayerMoney(target, amount) outputChatBox("You gave " .. getPlayerName(target) .. " $" .. amount .. ".", player, 0, 255, 0, false) outputChatBox(getPlayerName(player) .. " gave you $" .. amount .. ".", target, 0, 255, 0, false) else outputChatBox("You do not have enough money.", player, 255, 0, 0, false) end end end end )
  21. Yep, I did. Still not working, it doesn't send to anybody. function findPlayer(name) local matches = {} for i,v in ipairs(getElementsByType("player")) do if getPlayerName(v) == name then return v end local playerName = getPlayerName(v):gsub("#%x%x%x%x%x%x", "") playerName = playerName:lower() if playerName:find(name:lower(), 0) then table.insert(matches, v) end end if #matches == 1 then return matches[1] end return false end addCommandHandler("give", function(player, cmd, name, amount) local amount = tonumber(amount) if name and amount and amount > 0 and math.floor(amount) == amount then -- bugfix local target = findPlayer(name) local money = getPlayerMoney(player) local targetid = getPlayerFromName(target) if targetid then if money >= amount then takePlayerMoney(player, amount) givePlayerMoney(target, amount) outputChatBox("You gave " .. getPlayerName(target) .. " $" .. amount .. ".", player, 0, 255, 0, false) outputChatBox(getPlayerName(player) .. " gave you $" .. amount .. ".", target, 0, 255, 0, false) else outputChatBox("You do not have enough money.", player, 255, 0, 0, false) end end end end )
  22. Hello, I was trying for 30 minutes to fix that problem and I couldn't. I tried to see the MTA wiki, still I didn't get it. The problem is: For example ,there is no player "test" online in the server and I write /give test 2 and it takes 2$ from me and gives to nobody. How to fix that? function findPlayer(name) local matches = {} for i,v in ipairs(getElementsByType("player")) do if getPlayerName(v) == name then return v end local playerName = getPlayerName(v):gsub("#%x%x%x%x%x%x", "") playerName = playerName:lower() if playerName:find(name:lower(), 0) then table.insert(matches, v) end end if #matches == 1 then return matches[1] end return false end addCommandHandler("give", function(player, cmd, name, amount) local amount = tonumber(amount) if name and amount and amount > 0 and math.floor(amount) == amount then -- bugfix local target = findPlayer(name) local money = getPlayerMoney(player) local targetid = getPlayerFromName(target) or outputChatBox("Player not found", player) if money >= amount then takePlayerMoney(player, amount) givePlayerMoney(target, amount) outputChatBox("You gave " .. getPlayerName(target) .. " $" .. amount .. ".", player, 0, 255, 0, false) outputChatBox(getPlayerName(player) .. " gave you $" .. amount .. ".", target, 0, 255, 0, false) else outputChatBox("You do not have enough money.", player, 255, 0, 0, false) end end end ) I tried with "playerid" and others and still not working.
×
×
  • Create New...