Leaderboard
Popular Content
Showing content with the highest reputation on 08/05/17 in all areas
-
احترامي لك يبرووس ومو مصدق انك تطلب طلبات ******* وانت اللي سويت لوحة التسجيل الدي اكس بدون اخطاء ومشاكل وعلى ما اظن يمديك ترد برد لائق ونهى سبحانه وتعالى عن السخرية من الآخرين فقال: (يَا أَيُّهَا الَّذِينَ آمَنُوا لَا يَسْخَرْ قَومٌ مِّن قَوْمٍ عَسَى أَن يَكُونُوا خَيْرًا مِّنْهُمْ وَلَا نِسَاء مِّن نِّسَاء عَسَى أَن يَكُنَّ خَيْرًا مِّنْهُنَّ وَلَا تَلْمِزُوا أَنفُسَكُمْ وَلَا تَنَابَزُوا بِالْأَلْقَابِ بِئْسَ الاِسْمُ الْفُسُوقُ بَعْدَ الْإِيمَانِ وَمَن لَّمْ يَتُبْ فَأُوْلَئِكَ هُمُ الظَّالِمُونَ)2 points
-
Automatic compile your whole resource. Do what you want with it, but keep the formal credits. Don't forget that compiling isn't just for protection, it was also meant for optimization! Version for universal resource compiler: (NEW) resourceCompiler/meta.xml <meta> <info author="IIYAMA" type="script" name="Resource compiler" version="1.3.0" /> <script src="scripts/compiler_s.lua" /> <export function="compileResource" type="server"/> <aclrequest> <right name="function.fetchRemote" access="true" /> <right name="general.ModifyOtherObjects" access="true" /> </aclrequest> </meta> resourceCompiler/scripts/compiler_s.lua ------------------ -- by IIYAMA -- function compileResource (player, resourceName) if hasObjectPermissionTo ( player, "function.shutdown", false ) and getResourceFromName ( resourceName ) then if not hasObjectPermissionTo ( getThisResource (), "function.fetchRemote", false ) then outputChatBox(" ", player) outputChatBox("Require fetchRemote to compiling this resource!", player, 255, 0, 0) outputChatBox(" ", player) else local meta = xmlLoadFile(":" .. resourceName .. "/meta.xml") if meta then local folderName = "compiled/".. resourceName --.. "_compiled" local newMeta = xmlCopyFile(meta, folderName .. "/meta.xml") if newMeta then local metaNotes = xmlNodeGetChildren(meta) for i=1, #metaNotes do local metaNote = metaNotes[i] local scriptName = xmlNodeGetAttribute(metaNote, "src") if not scriptName or not string.match(scriptName, "compiler.lua") then if xmlNodeGetName(metaNote) == "script" then if scriptName and scriptName ~= "" then local FROM = ":" .. resourceName .. "/" .. scriptName local TO = folderName .. "/" .. scriptName .. "c" local scriptFile = fileOpen(FROM) fetchRemote( "https://luac.multitheftauto.com/?compile=1&debug=0&obfuscate=2", function(data) local newscriptFile = fileCreate ( TO ) if newscriptFile then fileWrite(newscriptFile, data) fileFlush(newscriptFile) fileClose(newscriptFile) end end, fileRead(scriptFile, fileGetSize ( scriptFile )) , true )--fileLoad(FROM) --https://luac.multitheftauto.com/api/ fileClose(scriptFile) end else local fileName = xmlNodeGetAttribute(metaNote, "src") if fileName then fileCopy (":" .. resourceName .. "/" .. fileName, folderName .. "/" .. fileName, true ) end end end end local newMetaNotes = xmlNodeGetChildren(newMeta) for i=1, #newMetaNotes do local newMetaNote = newMetaNotes[i] if xmlNodeGetName(newMetaNote) == "script" then local scriptName = xmlNodeGetAttribute(newMetaNote, "src") if not string.match(scriptName, "compiler.lua") then if scriptName and scriptName ~= "" then xmlNodeSetAttribute ( newMetaNote, "src", scriptName .. "c" ) end else xmlDestroyNode(newMetaNote) end end end xmlSaveFile(newMeta) xmlUnloadFile(newMeta) end xmlUnloadFile(meta) outputChatBox("Compiling done!", player, 0, 200, 0) end end end return true end addCommandHandler("compile", function (player, commandName, resourceName ) compileResource (player, resourceName) end) Installation: Put everything inside the folder resourceCompiler. (see file path for file name and sub folders) Use the commando: /refresh Give the resource the required rights(login as admin before you use this commando): /aclrequest allow resourceCompiler all This commando will give the resource all the rights that are defined in the meta.xml. (those are required to make the resource work) Rights: Usage: /compile [resourceName] There is an export function you can use. Now you are ready to go! Don't forget to leave a like! EXCLUDED (but can be included) Do you want to compile resources it in your admin panel as well? That would be nice right? (This source code is only on request because I do not want to be responsible for releasing a version of admin panel. My credits isn't on it as well) Like this post + send me a PM to get a look at the adminpanel adjustments! A PM with just: 'yes I want this!' is enough! Installation: Usage: Version for compiling inside the same resource: (OLD, but still useful)1 point
-
I made a 3D GUI System in MTA:SA. You can place 3D GUI Elements (Buttons, Textboxes, Labels, Lists, Checkboxes, Sliders, etc.) wherever you want. It's not public yet.1 point
-
1 point
-
1 point
-
1 point
-
1 point
-
1 point
-
صاروخ مره حسبي الله على stc هذا المود سويته يوم كان نتي زين لكن الان وربي يا بروس تخيل صفحة قياس سرعة الانترنت تقولي فشل السهم ما يتحرك من تحت الصفر يوصل لنص الفحص وربي والسهم تحت الصفر هههههههههههه وش نقول1 point
-
onClientRender - an event that runs at every frame. For example if you have 60 fps, it will run 60 times per second. That is a lot... Anything you have in the onClientRender will be called over and over again including the creation of the marker. If you run your script for 1 minutes with 60 fps, you will have 3600 marker on top of each other, that is causing the lag. You should also consider whether it has to be create on each frame or not, in this case, the marker will need to be created only once. Most of the times you only do GUI / DX parts in the onClientRender anyway. So, to fix the lag, move your local kamuszef... and setElementAlpha outside the onClientRender, possibly before the function1 point
-
Having onClientRender inside another onClientRender is the easiest way to kill your fps/game. Do not, ever, ever put onClientRender inside onClientRender, because you're adding the event again and again at every single frame. This should be enough: function drawSzef_alap_renderer() if isElementWithinMarker (localPlayer, kamuszefmarker) then local x, y = guiGetScreenSize() dxDrawImage ("fajlok/kepanyag/szef[0].png", x/2, y/2, 500, 300) end end addEventHandler ("onClientRender", getRootElement(), drawSzef_alap_renderer) But that will not work anyway, as the server-side variables (kamuszefmarker) are not shared between the server and client. You should either trigger to client with the marker element and hook the event to that element or add an element data to it i.e. "safeMarker_1" and check in the onClientRender if the player is inside a marker with the element data "safeMarker_1".1 point
-
1 point
-
Because you use a player argument but its not defined. ¿Understand?. When you trigger to server, take sure you send the getLocalPlayer in the server too, something like this, see: -- Client triggerServerEvent( "m4", resourceRoot, getLocalPlayer( ) ) -- Server addEvent( "m4", true ) addEventHandler( "m4", root, function ( player ) local p_coins = exports.coinsystem:getPlayerCoin(player) if tonumber( p_coins ) >= 400 then giveWeapon(player, 31, 2000) exports.coinsystem:takePlayerCoin(player, 400) outputChatBox("you bought a M4.", player, 0, 255, 0, false) else outputChatBox("you don't have enough coins!", player, 255, 0, 0, false) end end )1 point
-
Uou get this error because the Export, returns nil. So you can try this: function buyWeapon( player, command ) local p_coins = exports.coinsystem:getPlayerCoin( player ) if tonumber( p_coins ) >= 1 then giveWeapon(player, 31, 2000) exports.coinsystem:takePlayerCoin(player, prize) outputChatBox("you bought a M4.", player, 0, 255, 0, false) else outputChatBox("you don't have enough coins!", player, 255, 0, 0, false) end end1 point
-
1 point
-
1 point
-
1 point
-
1 point
-
1 point
-
Sounds to me you forgot my tutorial in your credits. As I said in the tutorial, you must add credits if you use my tutorial for your code. I left a watermark, that's how I know you used it. So add credits and re-upload it, thank you! ?1 point
-
addEventHandler("onClientGUIClick",root, function () if ( source == guest ) then guiSetVisible(wnd,false) showCursor(false) guiSetInputEnabled(false) setCameraTarget(localPlayer) end end )1 point
-
1 point
-
1 point
-
تبي الصراحة ي بروس ؟, بهالأيام أحسك شايف نفسك مبرمج كبير , خفف !, واترك التعليقات السلبية والسخرية بدل م تشجع ,! بالتوفيق لك ..1 point
-
1 point
-
1 point
-
1 point
-
* Client Side : local screenW, screenH = guiGetScreenSize() addEventHandler("onClientRender",root,function ( ) if ( getElementHealth ( localPlayer ) <= 25 ) then dxDrawRectangle(0, 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawRectangle(screenW * 0.0000, screenH * 0.0065, screenW * 1.0000, screenH * 0.9870, tocolor(63, 0, 0, 159), false) dxDrawText("You Will Dead", screenW * 0.3469, screenH * 0.8815, screenW * 0.7680, screenH * 0.9206, tocolor(255, 255, 255, 255), 1.00, "bankgothic", "left", "top", false, false, false, false, false) end end );1 point
-
@#BrosS لا صحيح ممكن الاعب يطلع ويجي مثلا انا احدد على الي طلع راح يصير فيه بقات فلازم يكون فيه تحديث عند الخروج والدخول والى اخره @Deativated عندك خبصة بالسيرفر1 point
-
Obrigado, consegui dar killtimer pelo server, não esta exatamente desses jeito que vc quis dizer mas pelo menos me ajudou a refazer a parte server e funcionou. Muito obrigado mesmo @Pedro861 e @DNL291.1 point
-
"onClientResourceStart" "onClientPlayerJoin" "onClientPlayerChangeNick" guiGridListClear getElementsByType guiGridListAddRow guiGridListSetItemText -- 2 "onClientGUIClick" guiGridListGetSelectedItem guiGridListGetItemText getPlayerFromName setElementPosition لايغرك الفنكنشات كثيرة لكن تركيبها ماياخذ 5 دقايق اذا كنت فاهمها كلها بالتوفيق1 point
-
دخلت سيرفر ولي اقدر اقول عليه انو روعة ولكن ليه ما تسوي بدل gui dx ادري ان المبرمجين يميلون لل gui ولكن زوار يميلون لل dx بنسبة للمابات شوف لكم حدا محترف تصميم و تيكسدات يسوي لكم مابات وبتنجحون بسيرفر انشاء الله بنسبة لو كانت هناك مودات كتيرة ومهمات مرة تقدرون تضيفونها في لوحة متل تحميل مخفي لما زائر يدخل بعدين يحمل مهمات لي يبي بدل ما يجيه تحميل طويل وبتوفيق مرة اخرى1 point
-
Thank you , I fixed my problem , I didn't even know that I have AVG installed on my computer I removed it and then my game didn't crash.1 point
-
Como assim meu xará setTimer dentro de onClientRender? o correto seria crie um setTimer dentro da função onde esta ligado o evento someRoda1 após isso criar um outro evento dando kill no timer, tipo esse: addEvent("eventName",true) addEventHandler("eventName",root, function() timers = getTimers ( 5000 ) -- obtém os milissegundo (ms) existentes for timerKey, timerValue in ipairs(timers) do killTimer ( timerValue ) outputChatBox("tempo cancelado!") end end) e ai sim chamar quando você quiser cancelar o tempo.1 point
-
Verifique se o timer já está ativo, na linha 9. Fora isso, também tem um loop em todos veículo - a velocidade verificada será dos veículos do server e não do veículo do jogador local (se é isso que você quer fazer).1 point
-
1 point