Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 08/10/16 in all areas

  1. Hi there! Our next release is nearly done. However, to ensure that it meets our high quality standards, we would like to ask you guys to thoroughly test it before we release it. This release brings an important change to our release distribution system. Starting today, there will be two builds available for you to download: normal build - only works on Windows 7 and above legacy build - only works on Windows XP and Windows Vista A normal build is basically what we offered with our previous releases, with an exception that it now requires Windows 7 or above to run. The new thing is an legacy build, which only works on Windows XP and Windows Vista. This build uses the last CEF components version that works on XP/Vista, which is now outdated and insecure. To ensure that we will not leave some of our players in the dark, while keeping the rest of them secure, we decided to split the release into two builds. One which uses older CEF components and works on XP/Vista (legacy build), and the other one which has up-to-date CEF but only works on Windows 7 and above (normal build). We have elaborated more on this in a separate post which you can find here. MTA:SA 1.5.3 has a lot of other smaller bug fixes, tweaks and new features included and is a result of another change to our build system, which simplified the development and building process to us. This has also allowed us to back-port many of the smaller changes originally planned for the 1.6 release to 1.5.3. These changes should be compatible with the 1.5 series, but they still need to be tested to ensure that this is indeed the case. And this is where you guys come in. To help us testing the version, simply download the Release Candidate from links below, install it and play as you normally would. If you play on XP or Vista, download the legacy build, otherwise grab the normal one. This version is meant to be fully compatible with MTA:SA 1.5.2 or below, so just join your favourite server and give it a go. If you encounter a problem or spot a bug, you can report them to our bugtracker. Please use the search feature first to see if your problem was not already reported though... Updated Windows/Linux server packages are also available, and similarly, they are also compatible with 1.5.2 clients, so please test whether your servers work fine on 1.5.3 too. Click here to download MTA:SA 1.5.3 RC Normal Build (for Windows 7 and above) Click here to download MTA:SA 1.5.3 RC Legacy Build (Windows XP and Vista only) MTA:SA 1.5.3 RC Linux Server download page You can find the current list of changes for this version here. A summary of changes and credits list will be provided with the final release announcement post. Thank you for helping us make MTA great again awesome. --MTA Team
    6 points
  2. local restrictedTo = {[488]=true} function functionName() if isPedInVehicle(localPlayer) then local vehicle = getPedOccupiedVehicle (localPlayer) local model = getElementModel(vehicle) local seat = getPedOccupiedVehicleSeat(localPlayer) if (restrictedTo[model] and seat ~= 0) then local x,y,z = getElementPosition(localPlayer) createProjectile(localPlayer, 19, x, y, z + 2, 1, nil, nil, nil, nil, -1, -1, -1, 0) end end end bindKey ("o", "down",functionName)
    4 points
  3. اول واهم شئ 1- لازم تكون لك خلفية وفكرة عن ادارة السيرفرات 2- تشري لك دومين مع مساحة لانشاء موقع 3- تبدأ ببيع سيرفرات العاب الي ان تاخذ فكرة عن ادارة سيرفرات vps 4- لا تحط دعم خلك مسؤل عن كل شئ 5- اشتري الخادم من شركات مشهورة وذات حماية عالية كـ ovh وغيرها وبالتوفيق "
    3 points
  4. السلام عليكم ورحمة الله جبتلكم مود طبعا المود اول ما تشغله مش ح يشتغل كامل بعد ما تشغله اطلع من السيرفر وادخل طبعا تقدر تعدل ع المود كامل صورة للمود بعد الخروج من السيرفر والدخول التحميل http://up.top4top.net/downloadf-281zz821-zip.html الصورة http://b.top4top.net/p_2812gps1.png]http://b.top4top.net/s_2812gps1.png ياريت تقييم وقولولي لو نستمر ولا لا وشكرا
    2 points
  5. Believe me, LUA is one of the easiest languages you will learn (if you're planning to become a programmer, obviously). It's simple, you just have to practice to get familiar with the MTA functions, methods etc.
    2 points
  6. We usually don't just write the code for you without you making an effort, but because you said you just started, I wrote the code for you with heavy documentation. Hopefully you will get the gist of it -- Server Side local crimz = createTeam("Criminal", 255, 0, 0) local enfz = createTeam("Enforcer", 0, 0, 255) addEvent("onClientTeamPicked", true) -- its essential to enable the event so we can actually use it in this script file -- notice the name is same as we had client side -- the client is enabled, now lets assign a function to it addEventHandler("onClientTeamPicked", root, function(name) -- the variable "name" is coming from the client local team = getTeamFromName(name) -- this is where our variable comes in to play -- its gonna be either "Criminal" or "Enforcer" so we can find the team by its name -- we can be 100% that we found the team as we have hard coded names both end setPlayerTeam(client, team) -- client is a "predefined" variable that comes with the the event and it is the player element that triggered from client side -- we have the team element, we have the client, so we can enroll them to the team end) -- Client Side local sScreen, bCrim, bEnf local screenW, screenH = guiGetScreenSize() addEventHandler("onClientResourceStart", resourceRoot, function() -- basic stuff, I guess you already know this, as this is your code showCursor(true) sScreen = guiCreateStaticImage((screenW - 1366) / 2, (screenH - 768) / 2, 1366, 768, "images/scrn.png", false) bCrim = guiCreateButton(376, 369, 162, 63, "", false, sScreen) guiSetAlpha(bCrim, 0.00) bEnf = guiCreateButton(743, 369, 162, 63, "", false, sScreen) guiSetAlpha(bEnf, 0.00) function closePanel() destroyElement(sScreen) -- we can just destroy the image as the buttons are children removeEventHandler("onClientGUIClick", resourceRoot, guiClicked) -- remove the event listener for GUI clicks showCursor(false) end function guiClicked(btn, state) if btn == "left" and state == "up" then -- left mouse button, when user released it if source == bCrim then triggerServerEvent("onClientTeamPicked", localPlayer, "Criminal") -- pass "Criminal" with the trigger as string -- triggerServerEvent "triggerName", playerWeWantToSendItTo, variable closePanel() -- destroy the panel and remove event listener elseif source == bEnf then triggerServerEvent("onClientTeamPicked", localPlayer, "Enforcer") -- pass "Enforcer" with the trigger as string closePanel() end end end addEventHandler("onClientGUIClick", resourceRoot, guiClicked) -- add the GUI button click listener end ) This code tag is a bit messy, it's fine in Notepad++, but comes out with bad indent here...
    2 points
  7. getPedOccupiedVehicle returns the vehicle element or false - not the seat. To get the seat you need to use getPedOccupiedVehicleSeat. Also, you're not using bindKey properly. You're using the client-sided version which returns the key pressed and then the state. So in this case, thePlayer would return "o" and seat would return "down" or "up".
    2 points
  8. Your code is makes no sense in here from what i see also please use Code editor to post a code and select Lua.
    2 points
  9. منشور تمام لكن ماراح نبحث عنه لك ابحث بنفسك اذا كان عندنا بنعطيك اياه
    2 points
  10. فكرة جميلة ولكن لو الاصوات حقت باتل فيلد تكون مسموعه للقريبين منك تكون افضل من انك تسمعها لوحدك وبالتوفيق يالذيب
    2 points
  11. Multi Theft Auto: San Andreas 1.5.3 might be the last release that supports Windows XP and Windows Vista. This post should help you understand why this is so and what exactly does it mean for you. Background Google has announced last year that they will be dropping support for Windows XP and Windows Vista OSes from their Chrome browser and the Chromium/Blink platform. As some of you may know, this is already in effect as you can no longer install the newer Chrome builds on machines running XP or Vista. The oldest Windows version which can run Google Chrome is Windows 7. For 1.5.3 release, we had to make a special build for players using Windows XP/Vista that would have the last released version of CEF that is compatible with those older systems, and a normal one for players with newer systems (Windows 7 and above). This normally would not be a big problem, but unfortunately several exploits were discovered that can compromise systems running older versions of Chromium (including the last one that works in XP/Vista). To ensure that our players are safe, we have updated CEF components to their newest version for the regular build, but we also provide a special build with outdated and insecure, but XP/Vista compatible CEF components. Comparison table for MTA:SA 1.5.3 Here is a little comparison table to help you understand this change: Operating System Does MTA:SA 1.5.3 work on this OS? Will MTA:SA work on this OS in the future? Windows XP YES UNKNOWN Windows Vista YES UNKNOWN Windows 7 YES YES Windows 8/8.1 YES YES Windows 10 YES YES Questions and Answers Google is dropping XP/Vista support for Chrome browser? What does this even have to do with MTA:SA? As you may know from our previous news posts, MTA:SA uses CEF (Chrome Embedded Framework) components for providing some functionality for the mod since version 1.5. Being Chromium-based, CEF components are also being phased out for users of older Operating Systems and will simply not work on them. Does MTA:SA 1.5.3 work fine on Windows XP and Windows Vista? Yes, it works fine if you install it through the legacy build. We still can not really recommend using these systems anymore due to reasons listed below. CEF compatibility issue aside, these Operating Systems (XP especially) are really old nowadays. You are putting yourself at risk if you use them as they are either no longer supported by Microsoft (XP) or the support will be discontinued soon (April 2017 - Vista). What will happen if I try to use the regular build of 1.5.3 on Windows XP/Vista? MTA:SA installer will display an error and will not let you install the mod on such systems. You will be asked to download the legacy build from our website. And what will happen if I try to use the legacy build of 1.5.3 on Windows 7 and above? Similarly, MTA:SA installer will display an error and will not let you install the mod on such systems. You will be asked to download the regular build from our website. Why couldn't you just stick to the older version of CEF then so that XP/Vista would be still supported? What about releasing two versions of the mod? A regular one with newest CEF and a legacy one with the older CEF build that still works on XP/Vista? Hey, but we actually do provide a legacy build for MTA:SA 1.5.3 for XP/Vista users with an older version of CEF components. The problem with sticking with either of these options is that we would have to continue providing a version that is vulnerable to any present and future security exploits that exist in Chromium and are already widely used. We do not want to put our users at risk because of that. CEF developers themselves do not want to provide a long-term security support for such a build either: http://www.magpcss.org/ceforum/viewtopic.php?f=6&t=14187 I am playing the mod on Windows 7/Windows 8/Windows 8.1/Windows 10 or newer. Am I affected by this? No, you will not be affected at all. In fact, you will have a better experience with built-in web browser components than before due to security and performance fixes included in the newer CEF versions. I am using Windows XP/Vista and I would still like to play future versions of MTA:SA. What can I do about it? If you are using Windows XP or Windows Vista, you should upgrade your OS to a newer one. You will likely be required to do a clean install for that, so backup your stuff first. You should use these tools first to see if your PC is capable of upgrading to newer OS: Windows 7: Windows 7 Upgrade Advisor Windows 8/10: Windows 8 Upgrade Assistant Is your PC toaster-tier which does not support Windows 8 or even 7? That means it is probably the right time to buy something more modern. But fear not, if you are already using Windows 7 or newer, just install the newest build of MTA:SA 1.5.3 and you are set! And if you don't want to upgrade your OS or PC, well, we will keep offering the legacy build that works on XP/Vista for a while... Conclusion Hope that this post has cleared your doubts about the status of support for Windows XP/Vista. Sorry for any inconvenience for users of these older Operating Systems but there was little we could do about it. These decisions were already made elsewhere. --MTA Team
    1 point
  12. www.99stack.com Welcome to 99Stack™, the affordable and reliable cloud hosting provider located in the sunny town Karlstad in Sweden. Our vision is to make cloud hosting simple, affordable and transparent without overselling or hidden fees. Today we're connected to 28 cloud data centers with worldwide availability, and we are constantly looking for new markets. Choose between 32 different server plans, 24 operating system images (Windows, GNU/Linux, FreeBSD etc..) or 30+ application images. Select additional features such as dedicated DDoS protection, IPv6, backups, live snapshots and many more. Pricing Compute VPS, from $0.009 per hour. VPS plans with extra processing power SSD Cloud VPS, from $0.009 per hour. Balanced and generic VPS plans Memory VPS, from $0.18 per hour. VPS plans with extra memory (up to 256GB per server) Dedicated servers, from $0.09 per hour. Dedicated cloud, without noisy neighbours. Storage servers, $0.009 per hour. Affordable small VPS plans with large SATA disks. Domain name, via Namecheap Shared web hosting, by GreenGeeks (100% powered by wind energy). Multi Theft Auto server hosting advantages These are some of the benefits you will gain by hosting in our cloud instead of a typical shared plan. Pay as you go with hourly billing, no setup fees, no period of notice, start and stop at any time, pay only for what you use. Run as many mtasa servers as you want without extra charge Pick as many player slots as you want without extra charge Use any ports you'd like and enjoy your own dedicated IPv4 address Dedicated DDoS protection available within the same data center, to avoid increased latency. Full encryption on everything from control panel to remote terminals and file transfers via SFTP/SSH Database and community website can all be hosted on the same server Dedicated environment We use 100% KVM virtualization in our cloud and all system resources are mapped in a 1:1 scale. The specifications listed on our pricing pages shows what you are paying for and that's exactly what you get. Thanks to this we don't need any "fair use policies". If you need to load your CPU to 100% you can do that. If you need to use all your RAM, use it. If you need all your disk space, use it. If you need all your bandwidth, use it. All system resources can be fully used all the time. Resources Learn more about us and our services on our website: Website: www.99stack.com Community: forum.99stack.com Privacy: 99stack.com/legal/privacy Terms: 99stack.com/legal/tos SLA: 99stack.com/legal/sla Contact: 99stack.com/contact Support: support.99stack.com
    1 point
  13. السلام عليكم انا عملت لووحة لي شخص تشغيل دخول بس كل ما اندير تسجيل مايسجل حساب جديد او بندير دخول زائر يستاكة مود يرجا تصحيح كود للخبراء فقط Client local winFont = dxCreateFont ( "CODE_Bold.ttf",52,false ) local x, y = guiGetScreenSize() local fontTam = dxGetFontHeight(1,winFont) local teamName = "# #646464Welcome To Libyan monstres Server" local tagName = "[L.M] Login Panel" local user = "Username" local pass = "Password" local fontAlto = dxGetFontHeight(0.6,winFont) local fontLargo = dxGetTextWidth ("iGamers Gaming",0.6,winFont) local fontLargo2 = dxGetTextWidth (tagName,0.4,winFont) local zene = playSound("music.mp3", true) setSoundVolume(zene, 0.4) local fAltUser = dxGetFontHeight (2,"default") local start={} local varX={} local varY={} local varZ={} local alpha = {} local loginError=0 alpha["دخول"]=0 alpha["cancel"]=0 alpha["reg"]=0 alpha["here"]="#0fc0fc" comprobar=0 local espX = 30 local espY = 60 local recX = 350 local recY = 30 local logX = x/2 local logY = y/2.7 local cancelX=100 local okX=60 local sep=20 local men=15 --bindKey("F2", "down", addEvent("onFinishIntro",true) addEventHandler("onFinishIntro",getRootElement(), function() setTimer(function() showChat(false) end,300,1) showCursor(true) start[0] = getTickCount() guiPart() addEventHandler ( "onClientRender", getRootElement(), interfaz ) end ) function guiPart() shLogin = guiCreateButton(logX-recX/2+(recX-cancelX-okX-10), logY+fAltUser*2+sep*3+10,okX, recY, "دخول", false) addEventHandler("onClientGUIClick",shLogin,onClickBtnLogin) addEventHandler( "onClientMouseEnter",shLogin,function() alpha["دخول"]=20 end) addEventHandler("onClientMouseLeave",shLogin,function() alpha["دخول"]=0 end) guiSetAlpha ( shLogin, 0 ) shGuest = guiCreateButton(logX-recX/2+(recX-cancelX), logY+fAltUser*2+sep*3+10,cancelX, recY, "Cancel", false) addEventHandler("onClientGUIClick",shGuest,onClickGuest) addEventHandler( "onClientMouseEnter",shGuest,function() alpha["cancel"]=20 end) addEventHandler("onClientMouseLeave",shGuest,function() alpha["cancel"]=0 end) guiSetAlpha ( shGuest, 0 ) shRegister = guiCreateButton(x/2+75, logY+fAltUser*2+sep*3+70+3, 30, 10, "", false) addEventHandler("onClientGUIClick",shRegister,OnBtnRegister) addEventHandler( "onClientMouseEnter",shRegister,function() alpha["here"]="#999999" end) addEventHandler("onClientMouseLeave",shRegister,function() alpha["here"]="#0fc0fc" end) guiSetAlpha ( shRegister, 0 ) edit_Login = guiCreateEdit(logX-recX/2+7, logY+fAltUser, recX, recY, "Username", false) addEventHandler("onClientGUIClick",edit_Login,function() guiSetText ( edit_Login, "" ) end) guiSetAlpha ( edit_Login, 0 ) edit_password = guiCreateEdit(logX-recX/2+7, logY+fAltUser*2+sep, recX, recY, "Password", false) addEventHandler("onClientGUIClick",edit_password,function() guiSetText ( edit_password, "" ) end) guiSetAlpha ( edit_password, 0 ) guiEditSetMaxLength ( edit_Login,25) guiEditSetMaxLength ( edit_password,25) guiEditSetMasked ( edit_password, true ) --Register shRegister2 = guiCreateButton(logX-100/2, logY+fAltUser*4+sep*3.5-men, 100, recY, "", false) addEventHandler("onClientGUIClick",shRegister2,onClickBtnRegister) addEventHandler( "onClientMouseEnter",shRegister2,function() alpha["reg"]=40 end) addEventHandler("onClientMouseLeave",shRegister2,function() alpha["reg"]=0 end) guiSetAlpha ( shRegister2, 0 ) guiSetVisible(shRegister2,false) edit_account_name = guiCreateEdit(logX-recX/2+7, logY+fAltUser-men, recX, recY,"Username",false) addEventHandler("onClientGUIClick",edit_account_name,function() guiSetText ( edit_account_name, "" ) end) guiEditSetMaxLength ( edit_account_name,25) guiSetVisible(edit_account_name,false) guiSetAlpha ( edit_account_name, 0 ) edit__reg_tab_password = guiCreateEdit(logX-recX/2+7, logY+fAltUser*2+sep-men,recX, recY,"Password",false) addEventHandler("onClientGUIClick",edit__reg_tab_password,function() guiSetText ( edit__reg_tab_password, "" ) end) guiEditSetMaxLength ( edit__reg_tab_password,25) guiEditSetMasked ( edit__reg_tab_password, true ) guiSetVisible(edit__reg_tab_password,false) guiSetAlpha ( edit__reg_tab_password, 0 ) edit__reg_tab_Repassword = guiCreateEdit(logX-recX/2+7, logY+fAltUser*3+sep*2-men, recX, recY,"Password",false) addEventHandler("onClientGUIClick",edit__reg_tab_Repassword ,function() guiSetText ( edit__reg_tab_Repassword , "" ) end) guiEditSetMaxLength ( edit__reg_tab_Repassword,25) guiEditSetMasked ( edit__reg_tab_Repassword, true ) guiSetVisible(edit__reg_tab_Repassword,false) guiSetEnabled (edit__reg_tab_Repassword, true) guiSetAlpha ( edit__reg_tab_Repassword , 0 ) setTimer(function() checkbox_save = guiCreateCheckBox(logX-recX/2+10,logY+fAltUser*2+10+sep*3+5,20,20,"",false,false) local username, password = loadLoginFromXML() if not( username == "" or password == "") then guiCheckBoxSetSelected ( checkbox_save, true ) guiSetText ( edit_Login, tostring(username)) guiSetText ( edit_password, tostring(password)) else guiCheckBoxSetSelected ( checkbox_save, false ) guiSetText ( edit_Login, tostring(username)) guiSetText ( edit_password, tostring(password)) end end,1100,1) end function interfaz() ahora = getTickCount() count=ahora-start[0] dxDrawImage(0, 0, x, y, 'fondo.png',0,0,0,tocolor(255,255,255),false) --dxDrawRectangle ( 0, 0, x, y, tocolor ( 0, 0, 0, 100 ) ) --dxDrawText ( count, 0, 0, x, y, tocolor ( 255, 255, 255, 255 ), 0.4, winFont ) if (count>500) then varX[1],varY[1],varZ[1] = anim(start[0]+500,2500,0,0,0,255,200,80,"Linear") dxDrawText ( teamName, espX, espY, 10, 10, tocolor ( 15,192,252, varX[1] ), 0.6, winFont, nil, nil, true, false, false, true ) dxDrawText ( tagName, fontLargo-fontLargo2+espX, fontAlto+espY, x, y, tocolor ( 255, 255, 255, varX[1]*0.8 ), 0.4, winFont ) --dxDrawText ( tagName, 0, y*0.9, x, y, tocolor ( 255, 255, 255, varX[1] ), 0.4, winFont,"center" ) end if (count>1000) then txtUser = guiGetText ( edit_Login ) txtPass = guiGetText ( edit_password ) txtPass = string.rep( '*', #txtPass ) varX[2],varY[2],varZ[2] = anim(start[0]+1000,1000,0,0,0,255,recX,150,"Linear") dxDrawText ( txtUser, logX-recX/2+15, logY+fAltUser+6, x, y, tocolor ( 255, 255, 255, varX[2] ), 1.01, "default" ) dxDrawText ( txtPass, logX-recX/2+15, logY+fAltUser*2+sep+6, x, y, tocolor ( 255, 255, 255, varX[2] ), 1.01, "default" ) dxDrawRectangle ( logX-recX/2, logY+fAltUser, varY[2], recY, tocolor ( 255, 255, 255, 50 ) ) dxDrawEmptyRec(logX-recX/2, logY+fAltUser, varY[2], recY,tocolor( 255, 255, 255, varX[2]),1) dxDrawRectangle ( logX-recX/2, logY+fAltUser*2+sep, varY[2], recY, tocolor ( 255, 255, 255, 50 ) ) dxDrawEmptyRec(logX-recX/2, logY+fAltUser*2+sep, varY[2], recY,tocolor( 255, 255, 255, varX[2]),1) dxDrawText ( "Cancel", logX-recX/2+(recX-cancelX)+18, logY+fAltUser*2+sep*3+10+3, x, y, tocolor ( 255, 255, 255, varX[2] ), 1.5, "default-bold" ) dxDrawEmptyRec(logX-recX/2+(recX-cancelX), logY+fAltUser*2+sep*3+10,cancelX, recY,tocolor( 255, 0, 0, varX[2]),1) dxDrawRectangle ( logX-recX/2+(recX-cancelX), logY+fAltUser*2+sep*3+10,cancelX, recY, tocolor ( 255, 255, 255, alpha["cancel"] ) ) dxDrawText ( "دخول", logX-recX/2+(recX-cancelX-okX-10)+15, logY+fAltUser*2+sep*3+10+3, x, y, tocolor ( 255, 255, 255, varX[2] ), 1.5, "default-bold" ) dxDrawEmptyRec(logX-recX/2+(recX-cancelX-okX-10), logY+fAltUser*2+sep*3+10,okX, recY,tocolor( 0, 255, 0, varX[2]),1) dxDrawRectangle ( logX-recX/2+(recX-cancelX-okX-10), logY+fAltUser*2+sep*3+10,okX, recY, tocolor ( 255, 255, 255, alpha["دخول"] ) ) dxDrawText ( "Remember me", logX-recX/2+30,logY+fAltUser*2+12+sep*3+5, x, y, tocolor ( 255, 255, 255, varX[2] ), 1, "default-bold" ) end if (count>2000) then varX[3],varY[3],varZ[3] = anim(start[0]+2000,1000,0,0,0,255,0,150,"Linear") --dxDrawImage(x-320*0.5, y-240*0.5-10, 320*0.5, 240*0.5, 'logo.png') dxDrawImage(logX-recX/2+recX-30, logY+fAltUser+4, 20, 20, 'user.png',varY[3]) dxDrawImage(logX-recX/2+recX-30, logY+fAltUser*2+sep+4, 20, 20, 'pass.png',varY[3]) dxDrawText ( "Don't have an account? Register "..alpha["here"].."Here#ffffff.", 0, logY+fAltUser*2+sep*3+70, x, y, tocolor ( 255, 255, 255, varX[3] ), 1, "default-bold", "center", nil,true,false,false,true ) end end function register_panel() regAlto = 250 regAncho = 370 ahora2 = getTickCount() count2=ahora2-start[1] varX[4],varY[4],varZ[4] = anim(start[1],1000,0,0,0,regAncho,regAlto,150,"Linear") dxDrawRectangle ( (x-varX[4])/2, logY+fAltUser-men-10-dxGetFontHeight(2,"default-bold"),varX[4] , varY[4], tocolor ( 15,192,252, 250 ) ) dxDrawEmptyRec( (x-varX[4])/2, logY+fAltUser-men-10-dxGetFontHeight(2,"default-bold"),varX[4] , varY[4],tocolor( 255, 255, 255, 255),2) if (count2>1000) then txtRegUser = guiGetText ( edit_account_name ) txtRegPass = guiGetText ( edit__reg_tab_password ) txtRegPass = string.rep( '*', #txtRegPass ) txtRegRePass = guiGetText ( edit__reg_tab_Repassword ) txtRegRePass = string.rep( '*', #txtRegRePass) dxDrawText ( "Register", 0, logY+fAltUser-men-dxGetFontHeight(2,"default-bold"), x, y, tocolor ( 255, 255, 255, 255 ), 2, "default-bold", "center", nil,true,false,false,true ) dxDrawText ( txtRegUser, logX-recX/2+15, logY+fAltUser-men+6, x, y, tocolor ( 255, 255, 255, varX[2] ), 1.01, "default" ) dxDrawRectangle ( logX-recX/2, logY+fAltUser-men, recX, recY, tocolor ( 255, 255, 255, 50 ) ) dxDrawEmptyRec(logX-recX/2, logY+fAltUser-men, recX, recY,tocolor( 255, 255, 255, 255),1) dxDrawText ( txtRegPass, logX-recX/2+15, logY+fAltUser*2+sep-men+6, x, y, tocolor ( 255, 255, 255, varX[2] ), 1.01, "default" ) dxDrawRectangle ( logX-recX/2, logY+fAltUser*2+sep-men, recX, recY, tocolor ( 255, 255, 255, 50 ) ) dxDrawEmptyRec(logX-recX/2, logY+fAltUser*2+sep-men, recX, recY,tocolor( 255, 255, 255, 255),1) dxDrawText ( txtRegRePass, logX-recX/2+15, logY+fAltUser*3+sep*2-men+6, x, y, tocolor ( 255, 255, 255, varX[2] ), 1.01, "default" ) dxDrawRectangle ( logX-recX/2, logY+fAltUser*3+sep*2-men, recX, recY, tocolor ( 255, 255, 255, 50 ) ) dxDrawEmptyRec(logX-recX/2, logY+fAltUser*3+sep*2-men, recX, recY,tocolor( 255, 255, 255, 255),1) dxDrawEmptyRec(logX-100/2, logY+fAltUser*4+sep*3.5-men, 100, recY,tocolor( 255, 255, 255, 255),1) dxDrawRectangle(logX-100/2, logY+fAltUser*4+sep*3.5-men, 100, recY,tocolor( 255, 255, 255, alpha["reg"])) dxDrawText ( "Done", 0, logY+fAltUser*4+sep*3.5-men+3, x, y, tocolor ( 255, 255, 255, 255 ), 1.5, "default-bold", "center", nil,true,false,false,true ) dxDrawImage(logX-recX/2+recX-30, logY+fAltUser-men+4, 20, 20, 'user.png',varY[3]) dxDrawImage(logX-recX/2+recX-30, logY+fAltUser*2+sep-men+4, 20, 20, 'pass.png',varY[3]) dxDrawImage(logX-recX/2+recX-30, logY+fAltUser*3+sep*2-men+4, 20, 20, 'pass.png',varY[3]) --dxDrawEmptyRec ( (x-varX[4])/2+regAncho-15, (y-varY[4])/2+5,11 , 11, tocolor ( 255, 255, 255, 255 ), 1 ) --dxDrawText ( "x", (x-varX[4])/2+regAncho-12, (y-varY[4])/2+2, x, y, tocolor ( 255, 255, 255, 255 ), 1, "default" ) end end function loadLoginFromXML() local xml_save_log_File = xmlLoadFile ("files/xml/userdata.xml") if not xml_save_log_File then xml_save_log_File = xmlCreateFile("files/xml/userdata.xml", "login") end local usernameNode = xmlFindChild (xml_save_log_File, "username", 0) local passwordNode = xmlFindChild (xml_save_log_File, "password", 0) if usernameNode and passwordNode then return xmlNodeGetValue(usernameNode), xmlNodeGetValue(passwordNode) else return "", "" end xmlUnloadFile ( xml_save_log_File ) end function saveLoginToXML(username, password) local xml_save_log_File = xmlLoadFile ("files/xml/userdata.xml") if not xml_save_log_File then xml_save_log_File = xmlCreateFile("files/xml/userdata.xml", "login") end if (username ~= "") then local usernameNode = xmlFindChild (xml_save_log_File, "username", 0) if not usernameNode then usernameNode = xmlCreateChild(xml_save_log_File, "username") end xmlNodeSetValue (usernameNode, tostring(username)) end if (password ~= "") then local passwordNode = xmlFindChild (xml_save_log_File, "password", 0) if not passwordNode then passwordNode = xmlCreateChild(xml_save_log_File, "password") end xmlNodeSetValue (passwordNode, tostring(password)) end xmlSaveFile(xml_save_log_File) xmlUnloadFile (xml_save_log_File) end addEvent("saveLoginToXML", true) addEventHandler("saveLoginToXML", getRootElement(), saveLoginToXML) function resetSaveXML() local xml_save_log_File = xmlLoadFile ("files/xml/userdata.xml") if not xml_save_log_File then xml_save_log_File = xmlCreateFile("files/xml/userdata.xml", "login") end if (username ~= "") then local usernameNode = xmlFindChild (xml_save_log_File, "username", 0) if not usernameNode then usernameNode = xmlCreateChild(xml_save_log_File, "username") end end if (password ~= "") then local passwordNode = xmlFindChild (xml_save_log_File, "password", 0) if not passwordNode then passwordNode = xmlCreateChild(xml_save_log_File, "password") end xmlNodeSetValue (passwordNode, "") end xmlSaveFile(xml_save_log_File) xmlUnloadFile (xml_save_log_File) end addEvent("resetSaveXML", true) addEventHandler("resetSaveXML", getRootElement(), resetSaveXML) function onClickBtnLogin(button,state) showChat(true) showCursor(false) guiSetVisible(shGuest, false) guiSetVisible(shLogin, false) guiSetVisible(shRegister, false) guiSetVisible(edit_password, false) guiSetVisible(edit_Login, false) guiSetVisible(checkbox_save, false) if(button == "left" and state == "up") then if (source == shLogin) then username = guiGetText(edit_Login) password = guiGetText(edit_password) if guiCheckBoxGetSelected ( checkbox_save ) == true then checksave = true else checksave = false end triggerServerEvent("onRequestLogin",getLocalPlayer(),username,password,checksave) removeEventHandler("onClientRender", getRootElement(), interfaz) end end end function OnBtnRegister () guiSetVisible(shRegister2, true) guiSetVisible(lbl_reg_top_info,true) guiSetVisible(edit__reg_tab_Repassword,true) guiSetEnabled (edit__reg_tab_Repassword, true) guiSetVisible(edit__reg_tab_password,true) guiSetVisible(edit_account_name,true) guiSetVisible(shGuest, false) guiSetVisible(shLogin, false) guiSetVisible(shRegister, false) guiSetVisible(edit_password, false) guiSetVisible(edit_Login, false) guiSetVisible(checkbox_save, false) start[1] = getTickCount() addEventHandler("onClientRender", getRootElement(), register_panel) end function onClickBtnRegister(button,state) if (guiGetText (edit_account_name)=="Username") or (guiGetText (edit_account_name)=="") then triggerEvent("addNotification", getLocalPlayer(),"Please enter a user name",2) elseif ((guiGetText (edit__reg_tab_password)=="Password") or (guiGetText (edit__reg_tab_password)=="")) and (guiGetText (edit__reg_tab_password)==guiGetText (edit__reg_tab_Repassword)) then triggerEvent("addNotification", getLocalPlayer(),"Please enter a password",2) elseif (guiGetText (edit__reg_tab_password)=="Password") or (guiGetText (edit__reg_tab_password)=="") then triggerEvent("addNotification", getLocalPlayer(),"Please enter a password",2) elseif (guiGetText (edit__reg_tab_Repassword)=="Password") or (guiGetText (edit__reg_tab_Repassword)=="") then triggerEvent("addNotification", getLocalPlayer(),"Please repeat pasword",2) elseif (guiGetText (edit__reg_tab_password)~=guiGetText (edit__reg_tab_Repassword)) then triggerEvent("addNotification", getLocalPlayer(),"Passwords don't match",2) else guiStaticImageLoadImage(Login_img, "Login_window.png" ) guiSetVisible(shGuest, true) guiSetVisible(shLogin, true) guiSetVisible(shRegister, true) guiSetVisible(edit_password, true) guiSetVisible(edit_Login, true) guiSetVisible(checkbox_save, true) guiSetVisible(shRegister2, false) guiSetVisible(edit__reg_tab_password, false) guiSetVisible(edit__reg_tab_Repassword, false) guiSetVisible(edit_account_name, false) guiSetVisible(lbl_reg_top_info, false) -- username = guiGetText(edit_account_name) password = guiGetText(edit__reg_tab_password) passwordConfirm = guiGetText(edit__reg_tab_Repassword) triggerServerEvent("onRequestRegister",getLocalPlayer(),username,password,passwordConfirm) triggerEvent("addNotification", getLocalPlayer(),"Successful register!",1) triggerEvent("addNotification", getLocalPlayer(),"Now log in!",1) removeEventHandler("onClientRender", getRootElement(), register_panel) end end function Error_msg(Tab, Text) showCursor(true) showChat(false) if Tab == "Login" then setTimer(function() addEventHandler ( "onClientRender", getRootElement(), interfaz ) end,1100,1) guiSetVisible(btnGuest, true) guiSetVisible(shGuest, true) guiSetVisible(shLogin, true) guiSetVisible(shRegister, true) guiSetVisible(btn_reg_tab_register, true) guiSetVisible(edit_password, true) guiSetVisible(edit_Login, true) guiSetVisible(checkbox_save, true) triggerEvent("addNotification", getLocalPlayer(),tostring(Text),2) elseif Tab == "Register" then triggerEvent("addNotification", getLocalPlayer(),tostring(Text),2) end end addEvent("set_warning_text",true) addEventHandler("set_warning_text",getRootElement(),Error_msg) function onClickGuest() showChat(true) guiSetVisible(shGuest, false) guiSetVisible(shLogin, false) guiSetVisible(shRegister, false) guiSetVisible(edit_password, false) guiSetVisible(edit_Login, false) guiSetVisible(checkbox_save, false) guiSetVisible(Login_img, false) removeEventHandler("onClientRender", getRootElement(), login_panel) triggerServerEvent("Don't", getLocalPlayer ( ),"You have to login to play!") end function hideLoginWindow() destroyElement(zene) stopSound(zene) showChat(true) removeEventHandler("onClientGUIClick",shLogin,onClickBtnLogin) end addEvent("hideLoginWindow", true) addEventHandler("hideLoginWindow", getRootElement(), hideLoginWindow) function CursorError () outputChatBox("Kurzor elrejtve") showCursor(false) end addCommandHandler("showc", CursorError) function dxDrawEmptyRec(absX,absY,sizeX,sizeY,color,ancho) dxDrawRectangle ( absX,absY,sizeX,ancho,color ) dxDrawRectangle ( absX,absY+ancho,ancho,sizeY-ancho,color ) dxDrawRectangle ( absX+ancho,absY+sizeY-ancho,sizeX-ancho,ancho,color ) dxDrawRectangle ( absX+sizeX-ancho,absY+ancho,ancho,sizeY-ancho*2,color ) end function anim(tag,animTime,de1,de2,de3,hasta1,hasta2,hasta3,typeAnim) local now = getTickCount() local endTime = tag + animTime local elapsedTime = now - tag local duration = endTime - tag local progress = elapsedTime / duration local a, b, c = interpolateBetween ( de1,de2,de3,hasta1,hasta2,hasta3, progress, typeAnim) return a, b, c end info_c x, y = guiGetScreenSize() font="default-bold" fontTam=5 spcGam=dxGetTextWidth ("Gamers",fontTam,font) function main() showChat(false) start = getTickCount() addEventHandler("onClientRender",getRootElement(),intro) setTimer ( function() removeEventHandler("onClientRender",getRootElement(),intro) triggerEvent("onFinishIntro",getRootElement()) end, 5000, 1 ) end addEventHandler("onClientResourceStart",getResourceRootElement(getThisResource()),main) function intro() ahora = getTickCount() count=ahora-start dxDrawImage(0, 0, x, y, 'fondo.png',0,0,0,tocolor(255,255,255),false) sizeX=64*1.21 sizeY=64*1.21 varX,varY,varZ = anim(start,1000,spcGam,0,0,0,spcGam,150,"Linear") dxDrawText("منور وحوش Monstres",0+x/2-varY/2,y/2-100,varY+x/2-varY/2,y,tocolor(255,255,255,255),fontTam,font,nil,nil,true) dxDrawText("#0088FF?",x/2+varY/2,y/2-100,varY+x/2-varY/2,y,tocolor(255,255,255,255),fontTam,font,nil,nil,false,false,false,true) if (count>1500) then varX2,varY2,varZ2 = anim(start+1500,1000,0,0,0,200,250,360,"Linear") dxDrawText("#00FF00~ #FFFFFFWelcome#ff0000To #ffffffLib#0088ffyan #FFFFFFMonstres #00FF00~",0+x/2-varY/2,y/2-100+dxGetFontHeight(fontTam,font),varY+x/2-varY/2,y,tocolor(255,255,255,varX2),1,font,"center",nil,false,false,false,true) end if (count>2000) then varX2,varY3,varZ3 = anim(start+2000,1000*10,0,0,0,200,250,360*20,"Linear") dxDrawImage ( x/2-sizeX/2, y/2+50, sizeX, sizeY, 'img/cargando1.png',varZ3) dxDrawImage ( x/2-sizeX/2, y/2+50, sizeX, sizeY, 'img/cargando2.png',180+varZ3) dxDrawText("تحميل",12,y/2+60+sizeY+1,x,y,tocolor(0,0,0,85),1.5,font,"center",nil,false,false,false,true) dxDrawText("تحميل",10,y/2+60+sizeY,x,y,tocolor(255,255,255,255),1.5,font,"center",nil,false,false,false,true) end end function anim(tag,animTime,de1,de2,de3,hasta1,hasta2,hasta3,typeAnim) local now = getTickCount() local endTime = tag + animTime local elapsedTime = now - tag local duration = endTime - tag local progress = elapsedTime / duration local a, b, c = interpolateBetween ( de1,de2,de3,hasta1,hasta2,hasta3, progress, typeAnim) return a, b, c end server function PlayerLogin(username,password,checksave) if not (username == "") then if not (password == "") then local account = getAccount ( username, password ) if ( account ~= false ) then logIn(source, account, password) triggerClientEvent ('stopsong',source) triggerClientEvent (source,"hideLoginWindow",getRootElement()) if checksave == true then triggerClientEvent(source,"saveLoginToXML",getRootElement(),username,password) else triggerClientEvent(source,"resetSaveXML",getRootElement(),username,password) end else triggerClientEvent(source,"set_warning_text",getRootElement(),"Login","Wrong username and/or password!") end else triggerClientEvent(source,"set_warning_text",getRootElement(),"Login","Please enter your password!") end else triggerClientEvent(source,"set_warning_text",getRootElement(),"Login","Please enter your username!") end end addEvent("onRequestLogin",true) addEventHandler("onRequestLogin",getRootElement(),PlayerLogin) function registerPlayer(username,password,passwordConfirm) if not (username == "") then if not (password == "") then if not (passwordConfirm == "") then if password == passwordConfirm then local account = getAccount (username,password) if (account == false) then local accountAdded = addAccount(tostring(username),tostring(password)) if (accountAdded) then outputChatBox ("#FF0000* #00FF00You have sucessfuly registered! [Username: #FFFFFF" .. username .. " #00FF00| Password: #FFFFFF" .. password .. "#00FF00 ]",source,255,255,255,true ) else triggerClientEvent(source,"set_warning_text",getRootElement(),"Register","An unknown error has occured! Please choose a different username/password and try again.") end else triggerClientEvent(source,"set_warning_text",getRootElement(),"Register","An account with this username already exists!") end else triggerClientEvent(source,"set_warning_text",getRootElement(),"Register","Passwords do not match!") end else triggerClientEvent(source,"set_warning_text",getRootElement(),"Register","Please confirm your password!") end else triggerClientEvent(source,"set_warning_text",getRootElement(),"Register","Please enter a password!") end else triggerClientEvent(source,"set_warning_text",getRootElement(),"Register","Please enter a username you would like to register with!") end end addEvent("onRequestRegister",true) addEventHandler("onRequestRegister",getRootElement(),registerPlayer) ارجو رد
    1 point
  14. شكرا اخي علي مساعداتك انا فاتح من موبايل غدا بجربها وشكرا
    1 point
  15. كود متع اغلاق shGuest = guiCreateButton(logX-recX/2+(recX-cancelX), logY+fAltUser*2+sep*3+10,cancelX, recY, "Cancel", false) addEventHandler("onClientGUIClick",shGuest,onClickGuest) addEventHandler( "onClientMouseEnter",shGuest,function() alpha["cancel"]=20 end) addEventHandler("onClientMouseLeave",shGuest,function() alpha["cancel"]=0 end) guiSetAlpha ( shGuest, 0 ) --لو انت تبي هادا الزر الي تغلق به اللوحة هكي ادير addEventHandler("onClientGUIClick",root, function() if source == shGuest then guiSetVisible(اسم للوحه,false)--تحط اسم اللوحة showCursor(false) end end )
    1 point
  16. I have determined that 1.5.3 breaks some scripts. Already sent a notice with info out to ccw. Theoretically this can be the case in more scenarios, scripts wont always function. An earlier build last week had also a script bug but it was fixed without clear commit which did so (likely in net) but new ones popped up.
    1 point
  17. I already added it check my code anyways you are welcome.
    1 point
  18. Yea, sorry, my bad, was meant to use getPedOccupiedVehicleSeat (localPlayer) ~= 0 He has thePlayer and seat there for no reason, he is not actually using it in the code anyway.
    1 point
  19. اشكر اخوي سعد لتصميمه بطل البطل رايكم عليها :]
    1 point
  20. So you want to restrict the command to passengers only? If so, here's the code: bindKey ( "o", "down", function ( thePlayer, seat) local vehicle = getPedOccupiedVehicle ( localPlayer ) if ( vehicle and getElementModel (vehicle) == restrictedTo and getPedOccupiedVehicle (localPlayer) ~= 0) then -- seat 0 -> driver x,y,z = getElementPosition(getLocalPlayer()) if not createProjectile(getLocalPlayer(), 19, x, y, z - 5, 1, nil, nil, nil, nil, -1, -1, -1, 0) then end end end) I changed line 3 so it checks if the player is not the driver.
    1 point
  21. استخدم محرر الاكواد Lua
    1 point
  22. Client : function aCallAzkar ( ) local aTime = getRealTime ( ) local aHour = aTime.hour local aMinute = aTime.minute if ( aHour == 08 and aMinute == 30 ) then removeEventHandler ( 'onClientRender',root,aCallAzkar ) playSound( string soundPath, [ bool looped = false ] ) end end addEventHandler ( 'onClientRender',root,aCallAzkar );
    1 point
  23. you can make the marker and blip clientside so only the pweson who uses the command can see them. #Post100
    1 point
  24. WorldSounds have different ID's, so you can enable/disable them 1 by 1. If you want to find a sound ID, follow the instructions on the wiki: "The values for group and index can be determined by using the client command showsound in conjunction with setDevelopmentMode"
    1 point
  25. setWorldSoundEnabled( 42, false ) setWorldSoundEnabled( 5, false )
    1 point
  26. لانة محدش عندة المود مايبغالها معلم =(
    1 point
  27. عندك غلط ماحددت وقت التايمر + استخدم ي صاحب الموضوع setPedControlState عشان تخلي البيد يطلق
    1 point
  28. هذا المود رح يريح ناس كثيرين في اللعبة + يعطي للسيرفر واقعية اكثر لأنه بكل بساطة يخلي اللاعب حقك يتكلم بأصوات انت رح تحددها فيما بعد التحميل من هنا ملفات تستطيع التعديل عليها -- Client bindKey ( "F1" , "down" , function() guiSetVisible ( theWindow, not guiGetVisible ( theWindow ) ) showCursor ( guiGetVisible ( theWindow ) ) end) local table = { {"Sounds/enemy1.ogg","Sounds/Needhelp1.ogg","Sounds/Run1.ogg","Sounds/friendlyfire_alt1.ogg","Sounds/rogerthat1.ogg","Sounds/thankyou1.ogg","Sounds/Move1.ogg","Sounds/Sorry1.ogg","Sounds/Request.ogg","Sounds/requestmedic1.ogg","Sounds/getin1.ogg"}, {"Sounds/enemy2.ogg","Sounds/Needhelp2.ogg","Sounds/Run2.ogg","Sounds/friendlyfire_alt2.ogg","Sounds/rogerthat2.ogg","Sounds/thankyou2.ogg","Sounds/Move2.ogg","Sounds/Sorry2.ogg","Sounds/Request.ogg","Sounds/requestmedic2.ogg","Sounds/getin2.ogg"} } addEventHandler("onClientRender", root, function() --------------------------------------------= enemy,Needhelp,Run,friendlyfire_alt,rogerthat,thankyou,MoveSound,SorrySound,Request,requestmedic2,getinV = unpack( table[math.random(#table)] ) --------------------------------------------= PlaySoundNum1 = rogerthat PlaySoundNum2 = friendlyfire_alt PlaySoundNum3 = getinV PlaySoundNum4 = enemy PlaySoundNum5 = requestmedic2 PlaySoundNum6 = Request PlaySoundNum7 = Needhelp PlaySoundNum8 = SorrySound PlaySoundNum9 = thankyou PlaySoundNum10 = MoveSound --------------------------------------------= end ) --------------------------------------------= GUISET_TEXT1 = "Roger that" GUISET_TEXT2 = "Get in" GUISET_TEXT3 = "Need help" GUISET_TEXT4 = "Request pickup" GUISET_TEXT5 = "Sorry" GUISET_TEXT6 = "Thank you" GUISET_TEXT7 = "Stop Fire !" GUISET_TEXT8 = "Enemy in area" GUISET_TEXT9 = "Play with theLink.BETA" GUISET_TEXT10 = "write theLink Here" GUISET_TEXT11 = "Close window" GUISET_TEXT12 = "Go Go Go" GUISET_TEXT13 = "Sound System [BF2]" GUISET_TEXT14 = "Request medic" GUISET_TEXT15 = "Destroy Sound" SText = "S" LText = "L" --------------------------------------------= GUINormalTextColour,GUIColorCode,GUIFont = "NormalTextColour","FFDAF5F9","default-bold-small" --------------------------------------------= SoundMaxDistance1 = 50 SoundMaxDistance2 = 50 SoundMaxDistance3 = 50 SoundMaxDistance4 = 50 SoundMaxDistance5 = 50 SoundMaxDistance6 = 50 SoundMaxDistance7 = 50 SoundMaxDistance8 = 50 SoundMaxDistance9 = 50 SoundMaxDistance10 = 50 SoundMaxDistance11 = 50 --------------------------------------------= ShowChat = true -- or false Msg1 = "theMSG 1" Msg2 = "theMSG 2" Msg3 = "theMSG 3" Msg4 = "theMSG 4" Msg5 = "theMSG 5" Msg6 = "theMSG 6" Msg7 = "theMSG 7" Msg8 = "theMSG 8" Msg9 = "theMSG 9" Msg10 = "theMSG 10" ForYou
    1 point
  29. شكراً لك على ردك الجميل NssoR , taha201100 شكراً على التعليق - انا آسف لأني ما وضحت في الفيديو NssoR المود بالفعل متل ما قلت يا --------------------------------------- " مب معقول اسوي اصوات غير كدة ! " --------------------------------------- ما حد يقدر يسمع الكلام غير القريب منك وكل نغمة لها بعد معين - شكراً على تفاعلكم معي ------------------------------------------------------------------------------- ملاحظة : آسف اذا تكرر الرد - الانترنت حقي مرة ضعيف وماني قادر اسوي شي NssoR وهذا سبب تأخيري في الرد على الاخ SoundMaxDistance1 = 50 SoundMaxDistance2 = 50 SoundMaxDistance3 = 50 SoundMaxDistance4 = 50 SoundMaxDistance5 = 50 SoundMaxDistance6 = 50 SoundMaxDistance7 = 50 SoundMaxDistance8 = 50 SoundMaxDistance9 = 50 SoundMaxDistance10 = 50 SoundMaxDistance11 = 50
    1 point
  30. سوف تذبح وتقطع وتبهر وتطبخ وتؤكل ونز@%$ في البالوعة
    1 point
  31. سكربت مفيد لكن مثل تعليق الاخ نصور لو القريب منك يسمعك افضل لكن عمل ممتاز يعطيك العافيه
    1 point
  32. استخدم ماركر عند الشخصية ولو دخل الماركر تعطيه نجوم بنسبه لـ و لو هرب يرجعو مكانهم وش تقصد مافهمتك createMarker "onMarkerHit" setPlayerWantedLevel بالتوفيق .
    1 point
  33. بدال م تستخدم المتغيرات يكون كذا كودك progressbar = guiCreateProgressBar(255, 342, 305, 43, false) setTimer ( function ( ) if ( guiGetVisible ( progressbar ) ) then local Progress = guiProgressBarGetProgress ( progressbar ) if ( Progress >= 100 ) then return guiSetVisible ( progressbar , false ) end guiProgressBarSetProgress ( progressbar , Progress +20 ) end end,1000,0)
    1 point
  34. It's actually not that simple, I already tried to do it twice, but no success. My code so far: local tbl = {} local x = 5 for row = 1, x do tbl[row] = {0, 0, 0} -- create dummy data so we can loop through the rows without error end function getNumCount(num) -- get the number of times a digit is in the array local count = 0 for row = 1, x do for i = 1, 3 do if tbl[row][i] == num then count = count + 1 -- increment when we have a match end end end return count end function isNumbersAllowed(n1, n2, n3) if n1 == n2 or n2 == n3 or n1 == n3 then -- check if all 3 numbers in a row are different return false end return true end function isGroupAllowed(n1, n2, n3) -- make sure we dont have 2 of the same rows like 1,2,3 and 2,1,3 local numOccurance = 0 for row = 1, x do for i = 1, 3 do if tbl[row][i] == n1 or tbl[row][i] == n2 or tbl[row][i] == n3 then -- if a column in a row is equial to any of the 3 random numbers generated numOccurance = numOccurance + 1 -- count the number of matches end end if numOccurance > 2 then -- we have 2 of the same rows, dont let it insert return false else numOccurance = 0 -- make sure its initialized to 0 after checking a row end end return true end function seedTable() for row = 1, x do local num1, num2, num3 repeat num1 = math.random(1, x) -- get 3 random numbers between 1 and x num2 = math.random(1, x) num3 = math.random(1, x) until isNumbersAllowed(num1, num2, num3) and isGroupAllowed(num1, num2, num3) and getNumCount(num1) < 3 and getNumCount(num2) < 3 and getNumCount(num3) < 3 -- shouldnt be 2 of the same groups or 1 digit occuring twice in the same row print(num1 .. " " .. num2 .. " " .. num3) tbl[row] = {num1, num2, num3} -- these 3 numbers passed all of our checks, put them in the table end end seedTable() It's not working 100%, I can only get it to create x - 1 rows because the last row never has 3 digits that occurred less than 3 times, it's quite tricky.
    1 point
  35. Анонсирован новый проект "MTA Server Of The Week (Сервер недели)", где еженедельно будет выходить обзор действительно интересных серверов Multi Theft Auto, участвующих в рейтинге. Выбор сервера будет проиходить из количества голосовавших за неделю. Количество игроков не важно, главный критерий - уникальные возможности и идеи, реализованные на сервере. Интересной особенностью проекта будет являться то, что каждый выпуск будет продвигаться сразу у нескольких популярных YouTube каналов о GTA и SAMP. Создано это с целью привлечения новых игроков в Multi Theft Auto, и показа всех его возможностей на примере различных серверов.
    1 point
  36. you can use this DxDrawMaterialLine3D the example shows you how to use it you can use this DxDrawMaterialLine3D the example shows you how to use it
    1 point
  37. En la consola pon: aclrequest allow guieditor all y reinicia el recurso.
    1 point
  38. Nice to know that some one offers this kind of services "for free".
    1 point
×
×
  • Create New...