Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 24/02/19 in all areas

  1. https://community.multitheftauto.com/index.php?p=resources&s=details&id=14785
    1 point
  2. yeeees, that's what i needed, thanks a lot
    1 point
  3. function onPlayerSaveSkin() local playerAcc = getPlayerAccount(source) if not isGuestAccount(playerAcc) then local playerSkin = getElementModel(source) setAccountData(playerAcc, "skin", tostring(playerSkin)) end end addEventHandler("onPlayerQuit", root, onPlayerSaveSkin) function onPlayerLoadSkin(thePlayer) local playerAcc = getPlayerAccount(thePlayer) local playerSkin = tonumber(getAccountData(playerAcc, "skin")) triggerClientEvent(thePlayer, "createSkinLogin", root, playerSkin) end function onPlayerCheckSkin(playerSkin) createPed(playerSkin or 0,-1600.9000244141,-1620.6999511719,36.599998474121,241.908905,0,0) end addEvent("createSkinLogin", true) addEventHandler("createSkinLogin", root, onPlayerCheckSkin)
    1 point
  4. منور ثلاث مجانين و احد منهم أسمة محدش و الثاني أسمه ياسر و الثالث أسمة مجنون… محدش و ياسر أضاربوا راح مجنون يبلغ الشرطة قال: محدش و ياسر يضاربوا قال الشرطي: أنت مجنون قال :كيف عرفت أسمي؟
    1 point
  5. -- server side function onPlayerQuitSaveSkin() local playeraccount = getPlayerAccount(source) if playeraccount and not isGuestAccount(playeraccount) then setAccountData(playeraccount, "player.skin", getElementModel(source)) end end addEventHandler("onPlayerQuit", getRootElement(), onPlayerQuitSaveSkin ) addEventHandler("onPlayerLogin", root, function(_,playeraccount) local playerSkin = tonumber(getAccountData(playeraccount, "player-skin")) triggerClientEvent ( source, "makePed", source, playerSkin or 0 ) end ) -- client side addEvent( "makePed", true ) addEventHandler( "makePed", localPlayer, function(skin) createPed(skin,-1600.9000244141,-1620.6999511719,36.599998474121,241.908905,0,0) end end Edit: I did not read it right, you want to create the ped before the player logs in ?
    1 point
  6. Código meio incompleto, shoes é o que exatamente ? se for único valor tente: local shoesC = getElementData(localPlayer, "Roupas") if table.find(shoesC.tenis,shoes) then dxDrawButton ("JA POSSUI", x*1230, y*795, x*300, y*35, tocolor(255, 148, 0, 200), tocolor(255, 148, 0, 255), tocolor(255, 148, 0, 255),x*1) else dxDrawButton ("COMPRAR", x*1230, y*795, x*300, y*35, tocolor(255, 148, 0, 200), tocolor(255, 148, 0, 255), tocolor(255, 148, 0, 255),x*1) end function table.find(t,e) for _,v in ipairs(t) do if (v == e) then return true end end return false end
    1 point
  7. Create a table for each player pinfo[player] = { money = 6969, login = "loki", level = 9000, exp = 94, online = "Probably" } Use passwordHash/passwordVerify when saving passwords to a database for security reasons.
    1 point
  8. v = {} function Comprar (_,state) if dxRoupa == false then if state == "down" then if isCursorOnElement (x*115, y*277, x*95, y*15) then if tonumber(dxCamisas) then local money = getPlayerMoney(localPlayer) elseif tonumber(dxCalcas) then elseif tonumber(dxTenis) then elseif tonumber(dxBone) then local money = getPlayerMoney(localPlayer) if money >= tonumber(bone[dxBone]) then takePlayerMoney(bone[dxBone]) outputChatBox(bone[dxBone]) setElementFrozen(localPlayer, false) setCameraTarget(localPlayer) removeEventHandler ("onClientRender", root, dxRoupas) removeEventHandler ("onClientRender", root, dxRoupasComprar) showCursor (false) dxRoupa = false if dxBone == 1 then if getElementData(localPlayer, "BoneClothes") then local c = getElementData(localPlayer, "BoneClothes") local v = split(c, ',') if v[1] == "1" then outputChatBox("OLA") else setElementData(localPlayer, "BoneClothes", "1,"..v[2]..","..v[3]..","..v[4] ) end else setElementData(localPlayer, "BoneClothes", "1,0,0,0" ) end elseif dxBone == 2 then if getElementData(localPlayer, "BoneClothes") then local c = getElementData(localPlayer, "BoneClothes") local v = split(c, ',') if v[2] == "1" then outputChatBox("OLAA") else setElementData(localPlayer, "BoneClothes", ""..v[1]..",1,"..v[3]..","..v[4] ) end else setElementData(localPlayer, "BoneClothes", "0,1,0,0" ) end elseif dxBone == 3 then if getElementData(localPlayer, "BoneClothes") then local c = getElementData(localPlayer, "BoneClothes") local v = split(c, ',') if v[3] == "1" then outputChatBox("OLAB") else setElementData(localPlayer, "BoneClothes", ""..v[1]..","..v[2]..",1,"..v[4] ) end else setElementData(localPlayer, "BoneClothes", "0,0,1,0" ) end elseif dxBone == 4 then if getElementData(localPlayer, "BoneClothes") then local c = getElementData(localPlayer, "BoneClothes") local v = split(c, ',') if v[4] == "1" then outputChatBox("OLAC") setElementData(localPlayer, "BoneClothes", false) else setElementData(localPlayer, "BoneClothes", ""..v[1]..","..v[2]..","..v[3]..",1" ) end else setElementData(localPlayer, "BoneClothes", "0,0,0,1" ) end end end end end end end end addEventHandler ("onClientClick", root, Comprar) Observe como uma função facilita totalmente a criação de um script.
    1 point
  9. لو كل العرب مثلك .. اعتقد كنت تقدر تدخل الويكي وتشوف امثاله ( لو تبى تتعلم ) .
    1 point
  10. Visualmente não vi erro na tabela. Então fui testar e funcionou, dei kill e ele printou o elemento veículo e seu id. Obs: Se ficar um tempo fora do veículo o f1 tem um sistema para destruir o veículo, ai vai dar erro. (verificando um veículo que já foi destruído)
    1 point
  11. // // blackwhite.fx // texture screenSource; float fIntesity; // the value set must be between in the range [-1, 1], so set it like this: urValue / 255, ex.: dxSetShaderValue(thisShader, "fIntesity", 128/255); this will make the image brighter. sampler TextureSampler = sampler_state { Texture = <screenSource>; }; float4 PixelShaderFunction(float2 TextureCoordinate : TEXCOORD0) : COLOR0 { float4 color = tex2D(TextureSampler, TextureCoordinate); return float4((color.r + color.g + color.b) / 3 + fIntesity); } technique BlackAndWhite { pass Pass1 { PixelShader = compile ps_2_0 PixelShaderFunction(); } }
    1 point
  12. Substitua as funções onPlayerWasted e onSoltarWasted por essa: function onPlayerDied(totalAmmo, killer, killerWeapon, bodypart, stealth) -- Não use nome de evento como nome de função. if isPlayerPolice(source) then local vtr = carros[source] print(vtr) -- retorna a tabela print(getElementModel(vtr)) -- da erro e retorna false if vtr and isElement(vtr) then local pregados = getAttachedElements(vtr) for _, preso in ipairs(pregados) do if preso and isElement(preso) then detachElements(preso, vtr) setPedAnimation(preso) if getElementData(preso, "navtr") then removeElementData(preso, "navtr") end removeEventHandler('onPlayerCommand', preso, onPlayerCommand) toggleAllControls(preso, true) local x,y,z = getElementPosition(preso) setElementPosition(preso,x+1.5,y+1.5,z+1) end end end end end addEventHandler("onPlayerWasted", root, onPlayerDied)
    1 point
  13. تقدر تسويلي ياها ع لوحة عادية عشان اشوف اكوادها ؟و اعرف كيف طريقة عملها يعني
    1 point
  14. Something like this local lastSkinTable = {} addEventHandler( "onPlayerQuit", root, function( ) local serial = getPlayerSerial( source ) lastSkinTable[serial] = getElementModel( source ) end ) local filePath = "skinDB.json" addEventHandler( "onResourceStart", resourceRoot, function( ) local db = fileExists( filePath ) and fileOpen( filePath ) if not db then return end lastSkinTable = fromJSON( fileRead( db, fileGetSize( db ) ) ) fileClose( db ) end ) addEventHandler( "onResourceStop", resourceRoot, function( ) local db = fileExists( filePath ) and fileOpen( filePath ) or fileCreate( filePath ) fileWrite( db, toJSON( lastSkinTable ) ) fileClose( db ) end ) Then use triggers to pass the data to the client when you need it.
    1 point
  15. a simple way is using setAccountData to save it when the player leaves the server onPlayerQuit then when the player logs in use getAccountData to get the skin model and add it to your spawnPlayer function in your login panel.
    1 point
  16. @N3xT @!#NssoR_) واحد منكم ي حلوين يقفل هالموضوع العظيم
    1 point
  17. نسيت اذكر حاجة جدا مهمة , اعضاء فريق مجتمع العرب كان شرف كبير لنا دخولكم معنا وكان من اجمل الاوقات صراحة قضيناها معكم والعلاقه بتكون مستمرة ان شاء الله بالسيرفر او بدونه احلى تحية لاعضاء فريق مجتمع العرب .
    1 point
  18. اغلاق مجتمع العرب بشكل رسمي والسبب حاولنا اننا نبحر في عالم الانترنت ونستقطب جميع انواع الهوايات من القيمنق والبرمجة والتصميم وغيرها كان مجتمع العرب من افضل الاشياء اللي سويتها صراحه ومن انجح المشاريع لي شخصيا لكن للاسف فيه سببين غالبا هو السبب باغلاق مجتمع العرب اولا : انا وسترونق اصحاب مجتمع العرب , تقريبا الظروف ماساعدتنا اننا نطوره اكثر واكثر من الرغم اننا سوينا اشياء كثيرة وحاولنا نطلع مجتمع العرب لاجهزه الجوال وحاولنا نسوي منصه اجتماعية ولكن للاسف فشلنا ليس في البرمجة وانما الظروف هزمتنا , فحيث ان كلاً مننا له دراسته الخاصه وله اهتماماته ولقد بذل كل منا مجهود كبير جدا عشان نطلع مجتمع العرب مب بس في هالمنتدى حاولنا اكثر من مره سوينا تطبيقات سوينا الالعاب سوينا برامج سوينا مواقع سوينا استضافات سوينا متاجر وسوينا وسوينا ... الخ لكن لاتجري الرياح كما تشتهي السفن السبب الثاني غالبا يجي عدم اهتمام الناس فينا حاولنا اكثر من مره نسوي اشياء مفيدة ك مشروع سابق لنا وهو موقع للافلام والمسلسلات ومشروع مجتمع العرب بلس لكن للاسف مافي تفاعل يحمسنا اننا نسوي اكثر حتى بعد ماطلقنا المنتدى يرجل مافي احد سجل وغالبا هالشيء يجي من عدم اهتمام الاشخاص في جالسين نسويه , حاولنا ندعم افكاركم قلنا لكم عطونا افكاركم نعطيكم فلوس عطونا افكاركم نصف الربح بيكون لك سوينا مسابقات كثيرة وغالبا اكبر مسابقة في رمضان اللي راح , وللاسف تفاعل جدا ميت لذلك ردة الفعل بالنسبة لنا بتكون ميته ولكن حاولنا اكثر من مره اننا نطلع بشيء كويس , على سبيل المثال لعبه سبع ابواب واللي بالمناسبة هو مشروع حي جالسين نشتغل عليه , لكن بيطلع باسم غير مجتمع العرب عالعموم هالمشروع كان من المفترض انه يكون من اكبر المشاريع في مجتمع العرب ولكن للاسف مافي اي تفاعل , تقريبا بتقول معكم هالمشاريع وجاي تنشرها عندنا بمنتدى اللعبه ؟ غالبا ان هنا يوجد اصدقاء اعرفهم واريد اخذ ارائهم وتم نشر موضوع اللعبه في انداي قوقو اللي هي غالبا تدعم المشاريع وبرضو مافي اي اهتمام من المجتمع العربي ولا في اي اهتمام هنا , على سبيل المثال والله مافي احد تعب نفسه وجاني خاص ي خالد وش الفكرة وش بتسوون مافي اي اهتمام يرجل , لذلك قررنا اغلاق مجتمع العرب تحياتي . ادارة مجتمع العرب - خالد العمري - سترونق
    1 point
  19. Se for mais do que 2 grupos, é melhor utilizar uma table do que ficar entupindo de condição or. -- (Essa table deve ficar fora da função) local allGroups = {"WP", "Group2", "Group3", "Group4"} -- (Isso deve ficar dentro da função pegarArma, no lugar daquela linha 30) local access = false -- Por padrão, o jogador não tem acesso. for i, groupName in ipairs (allGroups) do -- Para cada item da table allGroups, faça: if aclGetGroup (groupName) then -- Se o grupo com esse nome existe, então: if isObjectInACLGroup ("user."..getAccountName(acc), aclGetGroup(groupName) then -- Se o jogador está neste grupo, então: access = true -- Permite o acesso. break -- Cancela o loop, pois não precisa verificar o resto. end else -- Se não existe uma ACL Group com esse nome, então: outputDebugString ("Erro, grupo '"..groupName.."' não existe.", 2) -- Manda essa mensagem de Warning no Server Console end end if access then -- Isso é o mesmo que: if access == true then -- (O resto do código aqui)
    1 point
  20. function onPlayerCheckSkin() triggerServerEvent("makePed", localPlayer, playerSkin) createPed(playerSkin or 0,-1600.9000244141,-1620.6999511719,36.599998474121,241.908905,0,0) end addEventHandler("onClientResourceStart", resourceRoot , onPlayerCheckSkin) function onPlayerSaveSkin() local playerAcc = getPlayerAccount(source) if not isGuestAccount(playerAcc) then local playerSkin = getElementModel(source) setAccountData(playerAcc, "skin" , tostring(playerSkin)) end end addEventHandler("onPlayerQuit", root, onPlayerSaveSkin) function onPlayerLoadSkin(thePlayer) local playerAcc = getPlayerAccount(thePlayer) local playerSkin = tonumber(getAccountData(playerAcc, "skin")) end addEvent("makePed", true) addEventHandler("makePed", root, onPlayerLoadSkin) Oh i see i will help you
    0 points
  21. Although we hear all kinds of excuses, there is simply no valid one for attempting to use hacks, besides running the DLL injector you also tried using a known (but detected) MTA hack, a so-called anti cheat bypass. Too bad you got caught, and now you'll do the time. There'll be no early unban, sorry.
    0 points
  22. Use getAccountData setAccountData triggerClientEvent addEvent addEventHandler
    0 points
  23. Server because the player would be able to edit the file if it were on the client.
    0 points
  24. You can create a database dbConnect, fileCreate, xmlCreateFile to store their skin when they disconnect using their serial. The simplest of the 3 is using fileCreate with the toJSON and fromJSON functions to save the tables.
    0 points
×
×
  • Create New...