Leaderboard
Popular Content
Showing content with the highest reputation on 09/02/17 in Posts
-
2 points
-
@#Soking عندك فنكشن isPlayerInMisson لو كان عندك 3. او 4 لاعبين كودك راح يتحقق من اول لاعب اذا ماكان بالتيبل راح يوقف الوظيفة ويرجع لك بـ فولس وبعد ناقصك تحققات وفيه اخطاء وبالنسبة لـ صاحب الموضوع اذا الطريقة الي عطيتك اياها قبل صعبة في اسهل منها خلي جدول الاحداثيات بالشكل هذا local Pos = { [ 1 ] = { x = 5 , y = 8 , z = 8 } , [ 2 ] = { x = 1 , y = 4 , z = 0 } , } وسوي متغير وقيمته 0 يكون بالسيرفر طبعا وكل ما لاعب يدخل الماركر يزود قيمة المتغير واستدعي القيمة من الجدول بالشكل التالي aNum = aNum + 1 x = Pos [ aNum ].x -- Ex وكمل ع الباقي2 points
-
الله يهديك اخوي ما يبي يختار مكان عشوائي هو يبي يحدد المكان الاول والثاني ما يبي يجيب عشوائي +_+2 points
-
السلام عليكم ورحمة الله وبركاتة اليوم حبيت اقولكم ان الموقع المشهور في رفع المودات Community.mtasa.com يخضع للصيانة المؤقتة لفتره معينه ولكن يمكنك الدخول للموقع في هذه الاوقات من خلال الضغط علي : سبحان الله وبحمده ملاحظة : ولاتقلق عند دخولك للموقع ويظهر لك Your connection is not secure المقصود , ان الموقع انتهت فترة حمايتة وهو غير محمي وفي حال التشكيك في كلامي يمكنك التأكد من ذلك من خلال هذا الموضوع الذي قام بطرحه احد الاعضاء وبالتوفيق للجميع..!2 points
-
AVH - Advanced Vehicle Handling, is a new car physics that replaces standart RenderWare physics in GTA SA. Video demonstrating general features: Development history:1 point
-
Buenas a todos. Para los que no estais enterados, los creadores de SA-MP lanzaron oficialmente una modificación para GTA 5 el cual permite tener servidores de GTA 5, programar gamemodes, extender scripts mediante librerías externas y mucho mas! Los lenguajes admitidos son C# para el lado del servidor y JavaScript para el lado del cliente! Os dejo el link al mod: https://gtanet.work/ y una imagen de un gamemode que estoy empezando a hacer! Saludos!1 point
-
1 point
-
1 point
-
team = createTeam ("Criminal", 255, 0, 0) function joinCriminalTeam(player) local team = getTeamFromName ("Criminal") if (team) then setPlayerTeam (player,team) setElementModel (player, 230) getTeamColor (player, team) setBlipColor (player, team) setTeamFriendlyFire ( team, true ) end end addCommandHandler("setme",joinCriminalTeam) اكتب في اف8 setme، ماشفت الكلمة حقتك ، واذا في غلط حد ينبهني لاني جوال1 point
-
1 point
-
1 point
-
1 point
-
addEventHandler("onPlayerTarget") getElementType setPedAnimation setTimer givePlayerMoney1 point
-
addEventHandler("onClientGUIClick", guiRoot, function() if source == YourButton then local isWorldSpecialPropertyEnabled = isWorldSpecialPropertyEnabled("extrajump") local switch if isWorldSpecialPropertyEnabled then switch = false else switch = true end setWorldSpecialPropertyEnabled("extrajump", switch) outputChatBox(switch and "on" or "off") end end) اسف عبد الكريم ما شفت ردك1 point
-
1 point
-
@Abu-Solo موب كل شي داتا الله يهديك addEventHandler ( "onClientGUIClick", root, function ( ) if ( source == GUIEditor.button[5] ) then local aState = isWorldSpecialPropertyEnabled ( "extrajump" ) setWorldSpecialPropertyEnabled ( "extrajump", not aState ) local aMsg = aState == true and "True" or "False" exports.TopBarChat:sendClientMessage ( aMsg, 255,255,255, true ) end end )1 point
-
أسمه ديمنشن وماله شغل ، أنت تحطه بدمنشن ثاني وتسوي تحققات أنه ماهو فيها عشان تفتح اللوحة أو الداتا ، وفيه طرق أخرى كل مبرمج وطريقته1 point
-
1 point
-
1 point
-
1 point
-
1 point
-
1 point
-
function createFaislTeam() team = createTeam ("Criminal", 255, 0, 0) -- create team named Criminal with red color end addEventHandler("onResourceStart", getResourceRootElement(getThisResource()), createFaislTeam) function joinCriminalTeam(player) local team = getTeamFromName ("Criminal") if (team) then -- if we found it setPlayerTeam (player,team) setElementModel (player, 230) outputChatBox ( getPlayerName ( source ) .. " isn't on a team" ) end end addCommandHandler("join_Criminal_team", joinCriminalTeam)1 point
-
1 point
-
1 point
-
1 point
-
1 point
-
1 point
-
http://www.mtaarabs.com/vb/showthread.php?p=12806&posted=1#post12806 في خطا بالمود اكتشفوه بعض الاشخاص وجاري تعديله لكن تعلم من ذا على الاقل اللي تبي1 point
-
1 point
-
First of all MySQL is build to handle such data quantities. Unless you get into the range of big data there shouldn't be a problem...now before you ask, big data is usually something like googles meta data on users or similar. (Billions, if not trillions of records) So given that your server will likely never exceed say 50,000 accounts, you may have a table with items or something else that has 5,000,000 records etc. however none of that is even remotely big enough to bring MySQL down...given that you use good keys and queries. However, you could of course still mess up. Trying to SELECT query the entire items table (5,000,000) items for whatever reason would be a bad idea for example but that's what the LIMIT argument is for. If you build a database for a gamemode you should definitely use a tool like MySQL Workbench. Like that you have a great overview on your tables and can even track the performance of your database server. (There is a free Community edition btw.) Also as pa3ck wrote, it's probably a good idea to cache certain things in lua tables, for example the locations of houses or similar won't usually change, so loading them when the resource starts is probably a good idea. If they really change, probably an admin placing new houses or so, save as soon as the change is done, that will leave you with little to save when the server shuts down. Now I don't (yet) have experience with a MTA server actually running on MySQL and having lots of data, however I worked with other games that had a MySQL database and it worked great, even with almost 1,000,000,000 entries in the items table.1 point
-
Server Side OutMessage , aValue_ , aVehicles_ , aRandom = outputChatBox , false , { } , { { x , y , z } , { x , y , z } , { x , y , z } } aTable_ , aMarker , aMarkerWin = { } , createMarker ( x , y , z , 'corona' , 1 , 255 , 255 , 255 ) , createMarker ( x , y , z , 'corona' , 1 , 255 , 255 , 255 ) setElementDimension ( aMarkerWin , 10 ) function isPlayerInMission ( aPlayer ) for _ , Index in ipairs ( aTable_ ) do if ( Index == aPlayer ) then return true else return false end end end function RemovePlayer_ ( aPlayer ) for aValue1 , aValue2 in ipairs ( aTable_ ) do if ( aValue2 == aPlayer ) then table.remove ( aTable_ , aValue1 ) end end end function OpenMission_ ( ) aValue_ = true OutMessage ( 'True' ) end function StartMission_ ( ) aValue_ = false if ( #aTable_ > 0 ) then for _ , aIndex in ipairs ( aTable_ ) do triggerClientEvent ( aIndex , 'Trigger:CollidableWith' , aIndex ) end OutMessage ( 'False' ) else OutMessage ( 'Failed' ) end end addEventHandler ( 'onMarkerHit' , aMarker , function ( aPlayer ) aState , aOccupant = ( aValue_ == true ) , ( isPedInVehicle ( aPlayer ) ) if ( getElementType ( aPlayer ) == 'player' and not aOccupant and aState ) then setElementInterior ( aPlayer , 0 ) setElementDimension ( aPlayer , 10 ) fadeCamera ( aPlayer , false ) setElementFrozen ( aPlayer , true ) aVehicles_[aPlayer] = createVehicle ( 411 , unpack ( aRandom [ math.random ( #aRandom ) ] ) ) table.insert ( aTable_ , aPlayer ) setTimer ( function ( aPlayer ) fadeCamera ( aPlayer , true ) warpPedIntoVehicle ( aPlayer , aVehicles_[aPlayer] ) setElementFrozen ( aVehicles_[aPlayer] , true ) toggleControl( aPlayer, 'enter_exit', false ) setElementFrozen ( aPlayer , false ) end , 2500 , 1 , aPlayer ) else OutMessage ( '[Race] : '..( not aState and 'Donot Open' or aOccupant and 'Exit' )..'' , aPlayer ) end end ) addEventHandler ( 'onMarkerHit' , aMarkerWin , function ( aPlayer ) if ( getElementType ( aPlayer ) == 'player' and isPedInVehicle ( aPlayer ) ) then for _ , Players in ipairs ( getElementsByType ( 'player' ) ) do if ( isPlayerInMission ( Players ) ) then fadeCamera ( Players , false ) setElementFrozen ( getPedOccupiedVehicle ( Players ) , true ) RemovePlayer_ ( Players ) setTimer ( function ( Players ) if ( isPedInVehicle ( Players ) ) then destroyElement ( getPedOccupiedVehicle ( Players ) ) end setElementPosition ( Players , x , y , z + math.random ( 5 ) ) setElementDimension ( Players , 0 ) fadeCamera ( Players , true ) end , 2000 , 1 , Players ) OutMessage ( '[Race] : '..getPlayerName ( aPlayer )..' Has Won ' , root ) givePlayerMoney ( aPlayer , 100000 ) end end end end ) addEventHandler ( 'onPlayerWasted' , getRootElement ( ) , function ( ) if ( isPlayerInMission ( source ) ) then RemovePlayer_ ( source ) OutMessage ( '[Race] : '..getPlayerName ( source )..' Killed in a Mission ( '..#aTable_..' in Mission )' , root ) if ( #aTable_ == 0 ) then OutMessage ( '[Race] : a Mission Has Failed' , root ) end end end ) addEventHandler ( 'onPlayerQuit' , getRootElement ( ) , function ( ) if ( isPlayerInMission ( source ) ) then RemovePlayer_ ( source ) OutMessage ( '[Race] : '..getPlayerName ( source )..' Quit ( '..#aTable_..' in Mission )' , root ) if ( #aTable_ == 0 ) then OutMessage ( '[Race] : a Mission Has Failed' , root ) end end end ) Client Side addEvent ( 'Trigger:CollidableWith' , true ) addEventHandler ( 'Trigger:CollidableWith' , getRootElement ( ) , function ( ) for _,Vehicles in ipairs ( getElementsByType ( 'vehicle' , resourceRoot ) ) do setElementCollidableWith ( Vehicles , getPedOccupiedVehicle ( localPlayer ) , false ) setElementFrozen ( Vehicles , false ) end end ) فنكشن StartMission_ ( ) يبدء المهمه و OpenMission_ ( ) لفتح المهمه و شكرا ههاي بانتظار الانتقادات ض21 point
-
cache: When the script file type is "client", this setting controls whether the file is saved on the clients' hard drive. Default is "true". Using "false" will mean the file is not saved. (Note: cache=false files are started at the client first, so lua file load order might differ when mixing cache settings)1 point
-
1 point
-
1 point
-
1 point
-
Quando um comando é utilizado, é repassado para função de manipulação, diversos parâmetros e o primeiro deles é o player que acionou o comando... Tente: function checkMyCash (player) local account = getPlayerAccount( player ) if ( account ) and not isGuestAccount ( account ) then local playercash = getAccountData(account, "cash") if (playercash) then outputChatBox("Você tem ".. playercash .." cash restante(s) em sua conta.", player, 100, 255, 100) end end end addCommandHandler( "meucash", checkMyCash )1 point
-
1 point
-
1 point
-
1 point
-
1 point
-
1 point
-
1 point
