Jump to content

XaskeL

Members
  • Posts

    246
  • Joined

  • Last visited

  • Days Won

    5

Everything posted by XaskeL

  1. give me full resource in pm
  2. what letter do you need to send? It is possible that your Hosting is blocking outgoing fetchRemote, or you forgot to issue admin rights to the resource to call fetchRemote
  3. check if the php function is called - email
  4. maybe the message is in spam?
  5. Example: https://community.multitheftauto.com/index.php?p=resources&s=details&id=11231
  6. Then try what @ShayF suggested
  7. Does another player have a different monitor resolution than yours?
  8. Так для работы с всякими Discord ботами нужны сокеты. И? Естественно в модуле самом нужно регистрировать Lua функции (пример не приведу, под рукой не осталось ни одного модуля что я писал) но можешь изучать чужие. require в mta заблокирована, как и многие обычные функции Lua.
  9. XaskeL

    Drag'n'Drop

    click (working area) - get item to memory - move to new area - release the mouse button - overwrite data. if i can access my computer, i will show you an example
  10. this is possibly the bug of the game GTA itself. I once exploited a similar bug in a single player in order to get more beautiful lighting like in cut-scenes games. Such a bug appears only if you do not touch the car (rarely, it is not clear why). Just put the game mode in the window without a frame, for me this is the most stable game mode. This happens when you turn off the game in "Standart" as well as when switching between interiors in a minimized game. I am not a moderator, but I just expressed my guess on this issue. Try to freeze the car and give it a velocity and then defrost it. maybe even a floating problem between clients and game settings.
  11. it is written: that it is deleted and will appear only in 1.6
  12. Try to overwrite all positions taking into account your offset in * .map or test it http://mta.dzek.eu/mmove/ author: varez
  13. better to go through a few hundred players on the server. rather than creating an element, every message that will be synchronized with all clients regardless of distance and then destroyed by itself or one of the slowest functions in the MTA. This may lead to a drop in FPS for players with a large number of players and messages at the same time.
  14. this code will bury the server. Use it: -- define our chat radius local chatRadius = 20 --units -- define a handler that will distribute the message to all nearby players function sendMessageToNearbyPlayers(message, messageType) -- we will only send normal chat messages, action and team types will be ignored if messageType == 0 then -- get the chatting player's position local posX1, posY1, posZ1 = getElementPosition(source) -- loop through all player and check distance for id, player in ipairs(getElementsByType("player")) do local posX2, posY2, posZ2 = getElementPosition(player) if getDistanceBetweenPoints3D(posX1, posY1, posZ1, posX2, posY2, posZ2) <= chatRadius then outputChatBox(message, player) end end end -- block the original message by cancelling this event cancelEvent() end -- attach our new chat handler to onPlayerChat addEventHandler( "onPlayerChat", getRootElement(), sendMessageToNearbyPlayers )
  15. XaskeL

    MultiLanguage

    This is a ready resource, as I understood loadText is responsible for loading data about translations from * .xml, look at the resource, there should be examples. Also in the description of the resource shows how to display the text.
  16. XaskeL

    MultiLanguage

    Give me full resource/gamemode where did gets this
  17. XaskeL

    MultiLanguage

    di usually use message keys, not the message itself for translation. I don’t really like Xml so I’ll show an example on Lua Tables local __locale = { ["en"] = { ["welcome_message"] = "Hello, brother!", }, ["ru"] = { ["welcome_message"] = "Привет, брат!", } } addEventHandler("onPlayerJoin", root, function() local lang = getElementData(source, "Language") outputChatBox(__locale[lang]["welcome_message"], source, 0, 255, 0, true) end );
  18. Test it please. I did not check this code, I wrote it directly in the editor without testing. I tried to find on the Internet already ready for 2014-2015, but I could not find it. -- enable OOP in meta.xml -- <oop>true</oop> -- Author: XaskeL. 13 mar., 2019 local levels = { [1] = 1000, -- EXP needed to get this level } local function getPlayerLevel() return localPlayer:getData('level') or 0 end local function getPlayerExp() return localPlayer:getData('exp') or 0 end local function getPlayerNext() local level = getPlayerLevel() local current = getPlayerExp() local next = levels[level + 1] return next-current end local function givePlayerExp(i) assert(type(i) == "number", "invalid argument type in function givePlayerExp. Was expected integer.") local level = getPlayerLevel() local current = getPlayerExp() local next = levels[level + 1] - current if current+i >= next then next = (current+i)-next localPlayer:setData('level', level + 1) localPlayer:setData('exp', next) else localPlayer:setData('exp', current + i) end return true end
  19. It so bad method, very bad
  20. function Player(who, cmd, playah) if hasObjectPermissionTo(who, "command.HERE_COMMAND_NAME", false) then local targetPlayer = getPlayerFromNamePart(playah) local targetSerial = getPlayerSerial(targetPlayer) local searchForANicks = executeSQLQuery("SELECT `nicks` from `aliases` WHERE `serial`=?", targetSerial) if #searchForANicks == 1 then outputChatBox("#FFD330History of nicks for "..getPlayerName(targetPlayer)..":#FAFAFA "..searchForANicks[1].nicks, who, 0, 0, 0, true) end end end addCommandHandler("command", Player, true, true) and add in acl for your group right "command.HERE_COMMAND_NAME" and change name of command on name your command
  21. XaskeL

    timestamp

    local target = os.time() + 86399 local current = os.time() local remaining_time = target - current local hours = math.floor((remaining_time % 86400) / 3600) local mins = math.floor((remaining_time % 3600) / 60) local secs = math.floor(remaining_time % 60) local msg = string.format("%02d:%02d:%02d", hours, mins, secs) You can also format the code from the solution above using this method with string.format. result: 23:59:59
  22. Test it please example elseif source == can then if getTickCount() < (__FIRST_TICK_DELAY or 0) then return outputChatBox("please wait!", 0, 255, 0, true) end if getPlayerMoney() >= 5000 then if getElementHealth(localPlayer) ~= 100 then setElementHealth(localPlayer,100) triggerServerEvent("TakeMoney",localPlayer) outputChatBox("#888888 5000$ #FFFFFFkarşılığında canın dolduruldu!",0,255,0,true) __FIRST_TICK_DELAY = getTickCount() + 500 -- timed out (delay) else outputChatBox("Canın zaten dolu!",255,0,0,true) end else outputChatBox("Paran yetmiyor!",255,0,0,true) end setTimer(guiSetPosition,50,5,canimg,g-132,2,false) setTimer(guiSetPosition,60,5,canimg,g-128,1,false) and rewrite the code manually, can sometimes give errors that there is some kind of symbol (but visually it is not visible). I got from this rofl when I copied my own, the lost code from here
×
×
  • Create New...