Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 04/04/19 in Posts

  1. A poor demonstration of custom face morphing
    1 point
  2. العفو يغالي بالتوفيق
    1 point
  3. شكرا علي التنبية ?
    1 point
  4. اطفاء وليس رستره
    1 point
  5. (كل بني آدم خطاء, وخير الخطّائين التوابون". (الترمذي وابن ماجه والحاكم وصححه"
    1 point
  6. oop بعد تجربة فعلية واطفاء معه oopأيّ ان اي فنكشن يجي من اللعبة بحد ذاتها يمكن استخدام الـ ,:find اشتغل سطر
    1 point
  7. https://wiki.multitheftauto.com/wiki/SetElementCollisionsEnabled ركز بالنوتس حق الفنكشن
    1 point
  8. 1 point
  9. Verifiquei aqui e detectei alguns erros na parte server-side. Aparentemente o onPlayerMarkerHit só funciona anexado ao root mesmo, o que é bem estranho... Também havia problemas com o timer, que não é capaz de obter source de outro evento, sendo necessário passar o source por parâmetro nele. Então ficou assim: local theTimers = {} local theMarker = createMarker (1409.666, -1790.515, 12.6, "cylinder", 1.2, 200, 50, 0, 150) function DeltaSCRAbrir (marker, matchingDimension) if marker == theMarker then if getPedOccupiedVehicle(source) == false then if isTimer(theTimers[source]) then outputChatBox ("╔═════════════════════════════════════════════════╗", source, 200, 50, 0) outputChatBox ("ERRO: #FFFFFFVocê já resgatou seu bônus diário, aguarde para resgatar o próximo", source, 200, 50, 0, true) outputChatBox ("╚═════════════════════════════════════════════════╝", source, 200, 50, 0) else theTimers[source] = setTimer (function (theSource) theTimers[theSource] = nil end, 60000, 1, source) -- 1 minuto. triggerClientEvent (source, "DeltaSCR:Abrir", source) end end end end addEventHandler ("onPlayerMarkerHit", getRootElement(), DeltaSCRAbrir) addEventHandler ("onPlayerLogout", getRootElement(), function (thePreviousAccount, theCurrentAccount) local timerDetails = getTimerDetails (theTimers[source]) -- Nesta função, source = player que deslogou. setAccountData (thePreviousAccount, "DeltaSCR:Timers", timerDetails) end) addEventHandler ("onPlayerQuit", getRootElement(), function() -- OnPlayerQuit não chama o evento onPlayerLogout, vc deve salvar a data aqui também. if isTimer(theTimers[source]) then -- Nesta função, source = player que quitou do server. local timerDetails = getTimerDetails (theTimers[source]) setAccountData (getPlayerAccount(source), "DeltaSCR:Timers", timerDetails) -- Salva a data na conta do player que quitou. killTimer(theTimers[source]) -- Cancela o timer. end theTimers[source] = nil -- Anula a variável do timer, para liberar espaço na memória. end) addEventHandler ("onPlayerLogin", getRootElement(), function (thePreviousAccount, theCurrentAccount) local dataTimer = getAccountData (theCurrentAccount, "DeltaSCR:Timers") if dataTimer then setAccountData (theCurrentAccount, "DeltaSCR:Timers", false) -- Remove o tempo restante da conta do player. Ela será salva novamente caso o player deslogue ou quite do server. theTimers[source] = setTimer (function (theSource) -- Nesta função, source = player que logou. theTimers[theSource] = nil end, dataTimer, 1, source) -- Recria o timer com o tempo restante que estava salvo. end end)
    1 point
  10. destroyElement( element or object )
    1 point
  11. input "shader" to "shader" for blur and output result "dxDrawImage(...,shader)" local grayShdr = ... dxSetShaderValue(grayShdr, "ScreenSource", screen); local blur = ... dxSetShaderValue(blur, "ScreenSource", grayShdr) dxDrawImage(..., gray) or use pass0, pass1 in shader
    1 point
  12. For vehicles in MTA, the functions below exist, and some more: https://wiki.multitheftauto.com/wiki/Vehicle_component_manipulation https://wiki.multitheftauto.com/wiki/Vehicle_Components https://wiki.multitheftauto.com/wiki/SetVehicleComponentVisible For peds, I'm not sure man. It'd involve mostly shaders like @IIYAMA said above, and a serious wide range skill set, as the same with vehicles.
    1 point
  13. وانا وش قلت ؟+_+ الفنكشن ناقص تعريفات التيبلات ما قلت انت غلطان صباح الفل +_+ +لصاحب الموضوع تاكد من تفعيل ال oop من الميتا
    1 point
  14. ضيفني ع ديسكورد ♔ Ahmed ?? ❥#6818
    1 point
  15. Na sua linha 4. playerTraficante não faz sentido. Onde ele foi declarado?
    1 point
  16. --client-side yasaklilar = { --"command", "useitem", "say", ... } addEventHandler("onClientKey", root,function(button, press) local komut = getBinds(button) if komut and press then if not guiGetInputEnabled() and not isChatBoxInputActive() then cancelEvent() outputChatBox("This button has an inappropriate command. To remove: #FFFFFF/unbind #CC0000"..button.." #FFFFFF"..komut, 255,0,0, true) end end end) function getBinds(buton) for i,v in pairs(yasaklilar) do local butons = getBoundKeys ( v ) if type(butons) ~= "boolean" and butons[buton] then return v end end return false end
    1 point
  17. I think you can't make difference between bind and command use. (not sure) But you can block function use, when command is binded to any key. -- CLIENT ONLY function useitem(cmd) if not getKeyBoundToCommand(cmd) then outputChatBox("Item used!") else outputChatBox("Unbind this command first!") end end addCommandHandler("useitem", useitem)
    1 point
  18. addCommandHandler - Para fazer o comando /192 funcionar. getElemenstByType - Para obter todos os elementos de tal tipo no servidor (no caso, "players") getPlayerAccount - Para obter a conta do jogador, para usar na função abaixo: getAccountName - Para obter o nome da conta do jogador, para usar na função abaixo: isObjectInACLGroup - Para verificar qual ACL Group cada jogador está. outputChatBox - Para mandar o texto no chat.
    1 point
  19. Porque 350 loops pra fazer a mesma coisa? Faça assim: local chat_range = 70 function isPlayerInRangeOfPoint (player, x, y, z, range) local px, py, pz = getElementPosition (player) return ( (x-px) ^ 2 + (y-py) ^ 2+ (z-pz) ^ 2) ^ 0.5 <= range end addEventHandler ("onPlayerChat", root, function (msg, type) if type == 0 then -- < ---- cancelEvent () local px, py, pz = getElementPosition (source) local r, g, b = getPlayerNametagColor (source) local everybody = getElementsByType ("player") for k, v in ipairs (everybody) do if isPlayerInRangeOfPoint (v, px, py, pz, chat_range) then outputChatBox ("᠉ #00FF00 ChatLocal - #FFFFFF"..getPlayerName(source).."#00ff00 - #ffffff"..msg, v, r, g, b, true) end end end end ) function MensagemTwitter (source, cmd, ...) local MessagemT = table.concat ( { ... }, " " ) local everybody = getElementsByType ("player") for _, v in ipairs (everybody) do outputChatBox ("᠉ #00BFFFTwitter - #ffffff"..getPlayerName(source).."#00BFFF - #FFFFFF"..MessagemT, v, 255, 255, 255, true) end end addCommandHandler ("twitter", MensagemTwitter) function Mensagemfrp (source, cmd, ...) local Messagemr = table.concat ( { ... }, " " ) local everybody = getElementsByType ("player") for _, v in ipairs (everybody) do outputChatBox ("᠉ #87CEFAFora do RP - /frp - #ffffff"..getPlayerName(source).."#00BFFF - #FFFFFF"..Messagemr, v, 255, 255, 255, true) end end addCommandHandler ("frp", Mensagemfrp) function Mensagemrp (source, cmd, ...) local Messagemp = table.concat ( { ... }, " " ) local everybody = getElementsByType ("player") for _, v in ipairs (everybody) do outputChatBox ("᠉ #1E90FFDentro RP - /rp - #ffffff"..getPlayerName(source).."#00BFFF - #FFFFFF"..Messagemp, v, 255, 255, 255, true) end end addCommandHandler ("rp", Mensagemrp) addCommandHandler ("deepweb", function (source, cmd, ...) local message2 = #{...} > 0 and table.concat({...}," ") or nil if message2 then local everybody = getElementsByType ("player") for _, p in ipairs (everybody) do if hasObjectPermissionTo(p, "command.mute", true) then outputChatBox ("᠉ #696969 DeepWeb - #ffffff"..getPlayerName(source).."#696969 - #696969"..message2, p, 255, 255, 255, true) else outputChatBox ("᠉ #696969 DeepWeb - #696969"..message2, p, 255, 255, 255, true) end end end end ) addEventHandler ("onPlayerJoin", getRootElement(), function () bindKey (source, "y", "down", "chatbox", "twitter") bindKey (source, "i", "down", "chatbox", "frp") bindKey (source, "o", "down", "chatbox", "rp") bindKey (source, "u", "down", "chatbox", "deepweb") end ) addEventHandler ("onResourceStart", resourceRoot, function () local everybody = getElementsByType ("player") for index, player in pairs (everybody) do bindKey (player, "y", "down", "chatbox", "twitter") bindKey (player, "i", "down", "chatbox", "frp") bindKey (player, "o", "down", "chatbox", "rp") bindKey (player, "u", "down", "chatbox", "deepweb") end end ) OBS: Não aconselho usar 4 binds assim, as vezes o jogador aperta uma tecla do teclado sem querer e abre o chat, ainda mais com 4 chats diferente assim, aconselho tirar e deixar somente pelo chat local "T"
    1 point
  20. Ma bucur sa vad ca resursele de la comunitatea mea se plimba nestingherit printre voi. "Scripturi originale". Jesus.
    1 point
  21. Most likely. Unless that person is really good with shaders and can do it without. But I have never created a shader in my life, so I do not know their limits as well. (Which is of course also limited to the hardware, but textures and objects will work on 99%of the video cards unless they run out of vram.)
    1 point
  22. One of the two points I noted before and most likely a combination of both. (You can attach objects as well to peds with bone attach resource)
    1 point
  23. Technical it is not possible. The rule is: 1 model, per 1 model ID. There is only one thing that can overrule the visualization in game without changing models and that is: `shaders`. Unless you find somebody who is a professional with shaders + willing to help you, it will remain an impossible. Another approach I have seen before to create custom cars, is by attaching custom objects to the vehicle which look like vehicle components. That will require a good modeller.
    1 point
  24. احتاجك بالديسكورد ضروري
    1 point
  25. جارحتك يا بيضة ؟ ??
    1 point
×
×
  • Create New...