Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 05/08/18 in all areas

  1. السلام عليكم حبيت اجرب اشرح فنكشن isPedReloadingWeapon اسم الفنكشن نبدا بالشرح الساينتكس | Syntax bool isPedReloadingWeapon ( ped thePed ) thePed | البيد الحالي او اللاعب الحالي Returns | اعادة القيمة Returns true if the ped is currently reloading a weapon, false otherwise. تخلي القيمة ترو لو البيد او اللاعب حاليا يعشق السلاح , و ترجع فولس لو ما يعشق Example | مثال function PedReloading( ) -- اسم الفنشكن if isPedReloadingWeapon( localPlayer ) then -- لو البيد الحالي يعشق outputChatBox( "you are reloading a weapon" ) -- فيصير الامر التالي else -- اذا ما تنفذ الشرط outputChatBox( "You are not reloading a weapon" ) -- فيصير الامر ذا end -- if انهاء end -- انهاء الفنكشن addCommandHandler( "isweapreloading", PedReloading ) -- الامر الي ينفذ الفنكنشن و العفو حبيت اساعد @*RayaN-Alharbi. @#DesTroeyR @Rakan#
    3 points
  2. لو فاضي ساعد بس مش مجبر انك تساعد ولا مجبر انك ترد اصلا
    2 points
  3. Realmente, esqueci do fato do jogador morrer e não sair do veículo. Assim funcionará perfeitamente: carros = { -- Tabela com vários veículos em suas posições. createVehicle (411, 2475, -1657, 13.2, 0, 0, 0), -- Cria o veículo na coordenada específica. (essa posição é por padrão o ponto de respawn) createVehicle (411, 2480, -1657, 13.2, 0, 0, 0), -- Cria outro veículo na outra coordenada e assim por diante. Este é um caso raro onde o elemento pode ser chamado sem estar em uma variável. -- (precisa ter a vírgula no final de cada veículo pois os elementos de uma table precisam estar separados entre vírgulas) } globalTimer = {} -- tabela vazia global. Os timers serão anexados aos veículos e não nos jogadores. for i, vehicle in ipairs (carros) do -- Para cada veículo da table 'carros', faça: toggleVehicleRespawn (vehicle, true) -- Permite que eles respawnem automaticamente. setVehicleIdleRespawnDelay (vehicle, 10000) -- Respawnar após 10 segundos sem ninguém no veículo. (Ex: jogador morre e não sai do veículo, ou alguém empurra o veículo de sua posição sem entrar nele) setVehicleRespawnDelay (vehicle, 5000) -- Respawnar após 5 segundos que explodiu. (Ex: Veículo explode sem ninguém sair dele.) end function startRespawn (thePlayer) local meuCarro = false -- Variável local, que será preenchida pelo veículo que o jogador saiu se ele estiver na tabela carros. for i, vehicle in ipairs (carros) do -- Para cada veículo da table 'carros', faça: if source == vehicle then -- Se o veículo que o jogador saiu for um veículo deste script, então: meuCarro = vehicle break -- (Break = sair deste FOR) Para de verificar os outros carros, pois o veículo já foi encontrado. end end if not meuCarro then return end -- Se o veículo que o jogador saiu não está na lista acima (não faz parte deste script), então nada acontece. if not isTimer (globalTimer[meuCarro]) then -- Verifica se o veículo já possui um timer ativo. if (#getVehicleOccupants(meuCarro) > 0) then return end -- Não faz nada se ainda houver alguém dentro do veículo e não inicia o timer. outputChatBox ("Esse veiculo será respawnado em 10 segundos! Entre nele novamente!", thePlayer) -- Mensagem de aviso para o player. globalTimer[meuCarro] = setTimer (function() -- Conta 10 segundos respawnVehicle (meuCarro) -- Respawna o veículo. setVehicleEngineState (meuCarro, false) -- Desliga o motor do veículo. end, 10000, 1) -- Tempo e repetições do timer. else resetTimer (globalTimer[meuCarro]) -- Se já existe o timer do veículo, reinicia ele. end end addEventHandler ("onVehicleExit", root, startRespawn) -- Executa essa função quando qualquer um sair de qualquer veículo. function cancelRespawn (thePlayer) local meuCarro = false -- Variável local, que será preenchida pelo veículo que o jogador entrou se ele estiver na tabela carros. for i, vehicle in ipairs (carros) do -- Para cada veículo da table 'carros', faça: if source == vehicle then -- Se o veículo que o jogador entrou for um veículo deste script, então: meuCarro = vehicle break -- (Break = sair deste FOR) Para de verificar os outros carros, pois o veículo já foi encontrado. end end if not meuCarro then return end -- Se o veículo que o jogador entrou não está na lista acima (não faz parte deste script), então nada acontece. if isTimer (globalTimer[meuCarro]) then -- Se existe o timer deste veículo, então: killTimer (globalTimer[meuCarro]) -- Cancela o timer deste veículo e ele não vai mais respawnar até que o último jogador saia de novo do veículo. outputChatBox ("Esse veiculo não será mais respawnado.", thePlayer) -- Mensagem de aviso para o player. end end addEventHandler ("onVehicleEnter", root, cancelRespawn) -- Executa essa função quando qualquer um entrar em qualquer veículo. No caso de cair na água, vai acontecer exatamente como o @MaligNos disse: Ou os ocupantes do veículo morrerão dentro dele (deixando o veículo inativo e respawnando com o setVehicleIdleRespawnDelay), ou eles sairão do veículo (ativando o timer de saída). Caso o veículo exploda com ou sem ninguém dentro, ele respawnará com o setVehicleRespawnDelay. ------------------------------------------------------------------- Tome cuidado, vc está criando 2 veículos idênticos no mesmo lugar.
    2 points
  4. 2 points
  5. Oil-system -< Let you know an oil job on your own -< Link: https://up.top4top.net/downloadf-946hhn6v1-zip.html
    2 points
  6. Hello everyone, my name is Shaio Fencski. The first server that I joined was John Flowers Freeroam Boredom. This server had professional scripters, such as Offroader23 who made the first airbrake and offedit in-game map editor, Woovie who is an MTA administrator, and also John Flower himself. They had a special script called flowerattach, where you could attach objects to your vehicle and do crazy designs. Limitless possibilities with it. Ever since I saw that script I have been fascinated with vehicle manipulation. Which is probably what I am best at now. I've been working on a framework that allows you to easily do more things with your vehicles, such as window animations, changing headlight distance, moving and real reflecting mirrors, adding on new vehicle parts or upgrades, modifying wheels to be bigger, wider, and many other things. Here are a few photos.
    1 point
  7. Hi there! Time sure flies fast, doesn't it? It has been a while since the last post from us so we would like to give you an update on what has been going on recently with MTA:SA. We have got two highlights for you this time. The community Do you remember our Community website? It has served us well over the years but has also caught some rust in the process. Therefore, we would like to re-visit it and improve your experience with discovering and publishing resources. Our plan is to build a new community website from the ground up using modern technologies, and we would like to hear from you what you would like to see on the new platform. Please respond to this thread with your ideas and suggestions. Technically inclined users can take a look at the first pass of our specification document. Development progress As for the mod itself, we have received many pull requests (patch contributions) on our GitHub from open source contributors lately. One of such contributions is a brand new feature: custom IFP animations support, coming from one of our community members, Saml1er. He managed to get this to work nicely in MTA:SA, while ensuring that our coding standards are met so we could include it without too much hassle. Saml1er even made a video which showcases what this feature is all about. You can find it below: We intend this to be a part of our upcoming 1.5.6 release which we hope will come soon, but you can try it out now by using a nightly build: https://nightly.multitheftauto.com/ Tips for using this can be found on our wiki: https://wiki.multitheftauto.com/wiki/EngineLoadIFP That's all for now. Take care and enjoy the summer! — MTA Team
    1 point
  8. Hello everyone! I'm making color picker with dx functions. How can i get pixel color under mouse cursor? I tried to use render targets but it always returns 0,0,0 (rgb). I don't know how to get screen pixels without losing performance (onClientRender). I'm making everything with DGS library so it gives additional troubles. Any suggestions?
    1 point
  9. Hello Community. I've a simple question, i know that its a bull:~ but i want to know, i've made an mta server i and my friend and we constructed it together then we separated from each other and i left the server and after a while he closed the server. then he gave the resources to his friend and he's going to make a server with my resources, i mean his friend. That was my story, my question is does he can use my resource without my permissions, without any copyrights or not ?
    1 point
  10. حياكم الله في منتدي وناسة تايم http://www.wnash-time.com/
    1 point
  11. @*RayaN-Alharbi. الو لازم ابلغ عنك - كل يوم اشياء ولا اروع واصل يا بطل يا كفو
    1 point
  12. السلام عليكم ورحمة الله وبركاتة اليوم وانا جالس اتعلم طريقة احفظ فيها الجداول في السكل بستخدام ( التوجوسن, فروم جوسن ) سويت 2 يوزفل فنكشن يمكن تفيد المبتدئين ? المهم حبيت انشرها بدال م اجلس محتفظ فيها setTableToSql getTableFromSql نبدا بالاول x[ setTableToSql ]x السانتكس \ Syntax setTableToSql( id, theTable ) id = ايدي او رقم الجدول الي تبي تحفظة theTable = اسم الجدول الي تبي تحفظة بالسكل الكود \ Code executeSQLQuery ('CREATE TABLE IF NOT EXISTS Table_System (ID, myTable)') function setTableToSql( id, theTable ) local Results = executeSQLQuery("SELECT myTable FROM `Table_System` WHERE ID=?", id ) if ( type ( Results ) == "table" and #Results == 0 or not Results ) then executeSQLQuery ( "INSERT INTO `Table_System` ( ID, myTable ) VALUES(?, ?)",id , toJSON ( theTable ) ) else executeSQLQuery('UPDATE `Table_System` SET myTable =? WHERE ID =?',toJSON ( theTable ),id ) end end مثآل \ Examble Table = { {"I'm"}, {"The"}, {"King"}, } addEventHandler( "onResourceStop",resourceRoot, function() setTableToSql( 1, Table) end ) x[ getTableFromSql ] x طبعًا الوضيفة سواها لي عبد الكريم وانا عدلت عليها وضفت ارقمنت الايدي عشان لو حاب يضيف اكثر من جدول @Abdul KariM السانتكس \ Syntax getTableFromSql ( id ) id = ايدي او رقم الجدول الي تبي تجيبة من السكل الكود \ Code function getTableFromSql ( id ) local aRow = executeSQLQuery( "SELECT myTable FROM `Table_System` WHERE ID=?",id ) if ( type ( aRow ) == "table" and #aRow == 0 ) or not aRow then return {""} end return fromJSON ( aRow [1] [ "myTable" ] ) end مثآل \ Examble TableT = {} addEventHandler( "onResourceStart",resourceRoot, function() local table = getTableFromSql( 1 ) if table then TableT = table end end )
    1 point
  13. اليوم بشرح الوضائف الجديدة الخاصة بالاكاونت { getAccountByID , getAccountID , getAccountIP , getAccountsByData , getAccountsByIP , setAccountName } بسم الله نبدأ x[ getAccountByID ]x شرح الوضيفة \ Explain the function This function returns the account with the specific ID. / تقوم الوضيفة بإرجاع الحساب عبر الايدي او المعرف الخآص به السانتكس \ Syntax account getAccountByID ( int id ) id = The ID to get account from / الآيدي الي تبي تجلب فيه الحساب عن طريقة العائدات / Returns Returns account associated with specified ID. Returns false if invalid arguments were specified or there is no account with this ID. / ارجاع الحساب المرتبط بالمعرف او الإيدي ,إرجاع قيمة منطقية بـ فولس إذا كان الحساب غير موجود مثآل \ Examble addCommandHandler("getAccount", -- نسوي امر جديد function (player, cmd, id) id = tonumber(id) -- نجلب الايدي من الامر local account = getAccountByID(id) -- نجيب الحساب من الايدي if account then -- نتحقق ان الحساب موجود او لا outputChatBox("The name of the account with that ID is: "..getAccountName(account), player) -- اخراج نص بـ أسم الحساب الي جبناه else -- اذا الحساب مو موجود outputChatBox("There is no account with this ID.", player) -- اخراج نص بـ ان لا يوجد حساب يمتلك هذا الاي دي end end) x[ getAccountID ]x شرح الوضيفة \ Explain the function This function retrieves the ID of an account. / تستخدم هذه الوضيفة لجلب الآيدي او المعرف الخاص بالحساب السانتكس \ Syntax int getAccountID ( account theAccount ) theAccount = The account you wish to get the ID of. / الحساب الذي تريد جلب الآيدي او المعرف الخاص به العائدات / Returns Returns a int containing the account's ID, false if the account does not exist or an invalid argument was passed to the function. / ارجاع رقم انتقر او رقم صحيح يحتوي ع ايدي الحساب المُدخل, إرجاع قيمة منطقية بـ فولس إذا كان الحساب غير موجود مثآل \ Examble function outputOnLogin ( previous_account, current_account, auto_login ) --when a player logs in / لما الاعب يسجل دخول outputConsole("["..getAccountID(previous_account).."] "..getAccountName(previous_account).." Logged into ["..getAccountID(current_account).."]"..getAccountName(current_account)) -- announce it into the console / استخراج نص للكونسل بـ أيدي حسابة القديم و الجديد end addEventHandler("onPlayerLogin",getRootElement(),outputOnLogin ) --add an event handler / اضافة حدث x[ getAccountIP ]x شرح الوضيفة \ Explain the function This function retrieves the IP-address of an account. / تستخدم هذي الوضيفة لجلب عنوان الايبي ادريسس للحساب المحدد السانتكس \ Syntax string getAccountIP ( account theAccount ) theAccount = The account you wish to get the IP of. / الحساب الذي تريد جلب الايبي ادريسس الخاص به العائدات / Returns Returns a string containing the account's IP, false if the account does not exist or an invalid argument was passed to the function. / إرجاع سلسلة نصية تحتوي على عنوان الايبي ادريسس للحساب المُدخل, إرجاع قيمة منطقية بـ فولس إذا كان الحساب غير موجود مثآل \ Examble function outputOnLogin ( previous_account, current_account, auto_login ) --when a player logs in / عند تسجيل دخول الاعب outputDebugScript(getPlayerName(source).."logged into his account with IP "..getAccountIP(previous_account)) -- announce it into the debugscript / إخراج نص للدي بق بـ عنوان الاإيبي ادريس للحساب إو الاعب end addEventHandler("onPlayerLogin",getRootElement(),outputOnLogin ) --add an event handler / اضافة حدث x[ getAccountsByData ]x شرح الوضيفة \ Explain the function This function returns a table containing all accounts with specified dataName and value (set with setAccountData). / تقوم هذه الوضيفة بإرجاع جدول يحتوي على جميع الحسابات التي تمتلك على داتا محددة ( setAccountData ) :تم تعينها بإستخدام وضيفة السانتكس \ Syntax table getAccountsByData ( string dataName, string value ) dataName = The name of the data / اسم الداتا value = The value the dataName should have / اشتراط ان تكون قيمة الداتا العائدات / Returns Returns table containing the accounts associated with specified value at dataName. Returns false if invalid arguments were specified. / جدول يحتوي على الحسابات المرتبطة بالقيمة المحددة في الداتا, إرجاع قيمة منطقية بـ فولس إذا تم تحديد ارقمنات غير صالحة مثآل \ Examble addCommandHandler("accountsbydata", function (player) -- add Command / إضافة امر local account = getPlayerAccount(player) -- Set the variable to the player account / تعين المتغير بـ حساب الاعب setAccountData(account, "test", "hello") -- Set the data and the value set on the account / وضع داتا معينة وقيمة لها على الحساب local accounts = getAccountsByData("test", "hello") -- Set the variable to the table containing the accounts associated with dataName and valueData / تعين المتغير بجدول يحتوي على الحسابات المرتبطة بالداتا والقيمة الخاصة بها outputChatBox(getAccountName(accounts[1]), player) -- The output text that contains the first account in the table / إخراج نص يحتوي على إول حساب في الجدول end) x[ getAccountsByIP ]x شرح الوضيفة \ Explain the function This function returns a table containing all accounts that were logged onto from specified IP-address. / تقوم هذه الوضيفة بإرجاع جدول يحتوي على كافة الحسابات التي تم تسجيلها من عنوان الإيبي ادريس المحدد السانتكس \ Syntax table getAccountsByIP ( string ip ) ip = The IP to get accounts from / الإيبي ادريس المراد الحصول على الحسابات المسجلة به العائدات / Returns Returns table containing the accounts associated with specified IP-address. Returns false if invalid arguments were specified. / تقوم هذه الوضيفة بإرجاع جدول يحتوي على الحسابات المرتبطة بعنوان الايبي ادريس المحدد, إرجاع قيمة منطقية بـ فولس اذا تم تحديد ارقمنات غير صالحة مثآل \ Examble addCommandHandler("getAccounts", -- add Command / إضافة امر function (player, cmd) local ip = getPlayerIP(player) -- Set the variable to the player IP / تعين المتغير بـ إيبي الاعب local accounts = getAccountsByIP(ip) -- Set the variable to the table containing the accounts associated with IP / تعين المتغير بجدول يحتوي على الحسابات المرتبطة بالإيبي المسجل بها outputChatBox("You have " .. #accounts .. " accounts.", player) -- Output text in the number of recorded accounts in player IP-address / إخراج نص بعدد الحسابات المسجلة في إيبي ادريس الاعب end) x[ setAccountName ]x شرح الوضيفة \ Explain the function This function sets the name of an account. / تقوم هذه الوضيفة بتحديد اسم الحساب المحدد السانتكس \ Syntax bool setAccountName ( account theAccount, string name [, bool allowCaseVariations = false] ) theAccount = The account you wish to change the name./الحساب الذي تريد تعين الاسم له name = The new name.. / الإسم الجديد للحساب allowCaseVariations = Whether the username is case sensitive (if this is set to true, usernames "Bob" and "bob" will refer to different accounts) العائدات/ Returns Returns a true if the account name was set, false if an invalid argument was specified. / تقوم هذه الوضيفة بإرجاع قيمة منطقية بـ ترو إذا تم تعين اسم الحساب, إرجاع قيمة منطقية بـ فولس اذا تم تحديد ارقمنات غير صالحة مثآل \ Examble addCommandHandler("changeaccountname", function(player, _, oldname, newname) -- add Command / اضافة امر if not oldname or not newname then -- Verify that the oldname and newname value exist / تحقق من وجود قيمة oldname و newname return end local account = getAccount(oldname)-- Set the variable to the account whose name will be changed / تعين المتغير بـ الحساب المراد تغير اسمه if not account then -- Verify that the specified account exists / تحقق من وجود الحساب المحدد return end setAccountName(account, newname) -- Set the specified account name to the newname / وضع إسم الحساب المحدد إلى الـ newname end) الحمد لله وصلنآ إلى نهاية الشرح إتمنى انه اعجبكم وماكان صعب عليكم الإهداءات/ Dedications @KhaledAlamri @#َxLysandeR @!#NssoR_) @#_iMr,[E]coo @#StrOnG_,) @iMr.WiFi..! @بويكا @Master_MTA @N3xT @#DRAGON!FIRE @[T]|O|[P]George @MrKAREEM @ccz @killerProject @#DesTroeyR @Rakan# @الباقي بالقلب
    1 point
  14. race افتح الادمنية وروح عند المودات وابحث عن أو حاجة قريبة من كذا Random maps اضغط عليه دبل كليك راح يفتح لك الاعدادات الخاصة بالمود, فيه خيار اسمه true غير القيمة حقته الى
    1 point
  15. Ele está respawnando antes pois o tempo de idle (inativo) dele está para 10 segundos. Mude essa parte para isso: setVehicleIdleRespawnDelay (vehicle, 60000) -- 60 mil = 60 segundos. Em vez de reinventarmos a roda, é melhor deixar tudo automático mesmo carros = { -- Tabela com vários veículos em suas posições. createVehicle (411, 2475, -1657, 13.2, 0, 0, 0), -- Cria o veículo na coordenada específica. (essa posição é por padrão o ponto de respawn) createVehicle (411, 2480, -1657, 13.2, 0, 0, 0), -- Cria outro veículo na outra coordenada e assim por diante. Este é um caso raro onde o elemento pode ser chamado sem estar em uma variável. } for i, vehicle in ipairs (carros) do -- Para cada veículo da table 'carros', faça: toggleVehicleRespawn (vehicle, true) -- Permite que eles respawnem automaticamente. setVehicleIdleRespawnDelay (vehicle, 60000) -- Respawnar após 60 segundos de inatividade do veículo. (Ex: Sem ninguém no veículo, ou alguém empurra o veículo pra fora de sua posição sem entrar nele) setVehicleRespawnDelay (vehicle, 5000) -- Respawnar após 5 segundos que explodiu. (Ex: Veículo explode sem ninguém sair nem entrar nele.) end
    1 point
  16. Qual a dúvida ? ainda deixamos comentários explicando suas funcionalidades... Basicamente estávamos tentando reinventar a roda... o MTA já dispõe de funções nativas que suprem as necessidade de respawnar veículo quando o player abandona ou explodi o veículo, não necessitando que criemos funções anexadas a eventos: local carro = createVehicle (411, 2475, -1657, 14, 0, 0, 0) toggleVehicleRespawn(carro,true) -- DIFINE QUE O VEÍCULO ESTÁ SUJEITO ÀS FUNÇÕES DE RESPAWN (setVehicleIdleRespawnDelay E setVehicleRespawnDelay) -- ISSO: setVehicleIdleRespawnDelay(carro,10000) -- É IGUAL A ISSO: function saiu(player) setTimer(respawnVehicle,10000,1,source) end addEventHandler ("onVehicleExit", carro, saiu) -- ISSO: setVehicleRespawnDelay(carro,5000) -- É IGUAL A ISSO: function explodiu() setTimer(respawnVehicle,5000,1,source) end addEventHandler("onVehicleExplode", carro, explodiu) *Foi apenas um exemplo lógico, certamente o código fonte das funções setVehicleIdleRespawnDelay/setVehicleRespawnDelay é mais complexo
    1 point
  17. تراه مش موجود بالمنتدي
    1 point
  18. Update: Added grid lists. They are called Table Views. Now you can just create them and select items, sorting now is not available. It will be added in future updates. - Fixed bug with scroll pane - in past it can contains contents only with maximal size, setted to default user's screen size - Added 2 new triggers - when scrolling scrollpane, and when changing state of check box - Fixed bug with unavailabled events when user cursor located on canvases of Buttons, ProgressBars, EditBoxes (all) and Check Boxes - Fixed bug with scrolling on scroll pane, now functions setVerticalScrollPosition and setHorizontalScrollPosition works correct - Added function getFrame for Labels - now you can put any widget on Label.
    1 point
  19. It's actually better to use encodeString and decodeString (added as of 1.5.5 r11849) as these functions allow you to avoid converting Base64 which is less efficient in terms of data storage - length of data n turns into a length of 4*(n/3) in Base64 (33% data increase), plus padding (=) this can add up to even 36.55% increased data use (16000 bytes is 21848 bytes of base64) encodeString("tea", DATA_TO_ENCODE, {key="your key"}) decodeString("tea", DATA_TO_DECODE, {key="your key"}) -- The following code can be used to test local f = File.open("some_model.dff", true) local data = f:read(f.size) -- read all data f:close() local key = "xTN5#Gqm=sKn**dF" local opt1 = teaEncode(base64Encode(data), key) local opt2 = teaEncode(data, key) local opt3 = encodeString("tea", base64Encode(data), {key = key}) local opt4 = encodeString("tea", data, {key = key}) outputChatBox("teaEncode with base64: " .. (base64Decode(teaDecode(opt1, key)) == data and "[OK]" or "[FAIL INTEGRITY TEST]") .. "; Encoded length: " .. #opt1) outputChatBox("teaEncode without base64: " .. (teaDecode(opt2, key) == data and "[OK]" or "[FAIL INTEGRITY TEST]") .. "; Encoded length: " .. #opt2) outputChatBox("encodeString with base64: " .. (base64Decode(decodeString("tea", opt3, {key = key})) == data and "[OK]" or "[FAIL INTEGRITY TEST]") .. "; Encoded length: " .. #opt3) outputChatBox("encodeString without base64: " .. (decodeString("tea", opt4, {key = key}) == data and "[OK]" or "[FAIL INTEGRITY TEST]") .. "; Encoded length: " .. #opt4)
    1 point
  20. function File.encode(path, key) local uncf = File.open(path) if (uncf) then local encf = File(path..".encoded") encf:write(teaEncode(base64Encode(uncf:read(uncf:getSize())), key)) encf:close() uncf:close() end end function File.readEncoded(path, key) local encf = File.open(path..".encoded") if (encf) then local decoded = base64Decode(teaDecode(encf:read(encf:getSize()), key)) encf:close() return decoded end end Note: You need to have OOP enabled in meta.xml(<oop>true</oop>)
    1 point
  21. في واحد فوق الي فوقي خويه يرسله علي الي يتحدوه لانه حرمة ما يعرف يرد علي احد فا يبعت خويه يرسل رسايله للناس لان خويه للأسف واحد قطع خلفه مب عارف يرد علي احد حركات بزران قسم بالله
    1 point
  22. dgsLabel = dgsCreateLabel(100,100,200,10,"#00FFFFHello #FF0000World",false) dgsSetProperty(dgsLabel,"colorcoded",true) Before this, you need to be a user of DGS
    1 point
  23. قلتلك موفق , ما تبي التوفيق ؟
    1 point
  24. موضوع جميل والموضوع استحق انه يثبت ولو بفترة قصيرة وتنسيق ولا اروع منك ي ريان بالتوفيق <3
    1 point
  25. رديت عليك سابقاً , ان صاحب الموضوع ماعرف يسوي ذا من طلباته السهله ( ليس تقليل منه ) ء
    1 point
  26. يعطيك العافية على التوضيح , لانكن هل تسبب خطا طريقتي ؟ لاني جربتها وصحيحة
    1 point
  27. mysql غير متصلة ب Local host يقول لك ان .وحمله من جديد وتأكد ان محمل نسخة الاخيرة appserver قم بحدف برنامج
    1 point
  28. جرب هذا م جربته ترا ولو كتبت رسالة بتجي بالنص الشاشة عند كل اللاعبين ---- ' Client ' local Text , SecondToRemoveRender = "" , 5 local sX,sY = guiGetScreenSize ( ) function renderText ( ) dxDrawText ( Text , 0 , 0 , sX , sY , tocolor(255,255,255,200),1.5,"default-bold","center","center",false,false,false,true,false) end addEvent ( "addNewText" , true ) addEventHandler ( "addNewText" , root , function ( msg , plr ) if ( isTimer ( TimerRemove ) ) then killTimer ( TimerRemove ) removeEventHandler ( "onClientRender" , root , renderText ) Text = "" end addEventHandler ( "onClientRender" , root , renderText ) Text = ""..getPlayerName(plr).." #ffffff: "..msg.."" TimerRemove = setTimer (function ( ) removeEventHandler ( "onClientRender" , root , renderText ) Text = "" end,SecondToRemoveRender*1000,1) end ) ---- ' Server ' addCommandHandler ( "shoutall" , function ( Player , cmd , ... ) local message = table.concat ( { ... } , " " ) triggerClientEvent ( root , "addNewText" , root , message , Player ) end )
    1 point
  29. Ah sim, queria apenas deixar claro ao @#Gubiani que ele pode criar n-veículos, que o script suportaria...
    1 point
  30. انتا اتلخبط في الاوت بوت شات بوكس | المفروض العكس لو يشحن يبقي ريولدنج لو العكس يبقا نوت ريلودنج واهنيك علي الشرح جميل + منظم واصل
    1 point
  31. مشكلة والله موفق ياخوي
    1 point
  32. 1 point
  33. الله يعطيك العافية ع الموضوع المنسق و المفيد , وبخصوص هاذا الاوبشن هذا ماهو ضروري ولكن وظيفته يكون دقيق اكثر بالحروف الي تكتبها يعني علي سبيل المثال حسابي اسمه كذا NssoR راح يقولك الاكاونت هذا موموجود , والسبب ان انت حاط " ترو" وبكذا راح يدقق ع الاحرف nssor وانت استخدمت هالخيار وخليته " ترو " وكتبت اسم الحساب اتمني وضحت المعلومة , تم وضع الموضوع كـ مميز و يثبت لفترة مؤقتة وشكرا لمساهمتك
    1 point
  34. Agora acho que deve funcionar a minha solução também: createVehicle (411, 2475, -1657, 14, 0, 0, 0) createVehicle (411, 2475, -1657, 14, 0, 0, 0) addEventHandler("onVehicleExit", resourceRoot, -- resourceRoot define que nosso evento só será acionado nos veículos criados pelo próprio resource function(player) if (numeroPassageiros(source) == 0) then outputChatBox("Seu veiculo será respawnado em 10 segundos! Entre nele novamente",player) setTimer(function(veh) if (numeroPassageiros(veh) == 0) then respawnVehicle(veh) setVehicleEngineState(veh,false) end end,10000,1,source) end end ) function numeroPassageiros(veh) local numero = 0 for assento, jogador in pairs(getVehicleOccupants(veh)) do numero = numero + 1 end return numero end A função getVehicleOccupants() retorna uma tabela com indexes desordenados que se referem ao assento que o player ocupa, podendo começar inclusive com 0, e nesses casos o uso da # (hashtag) na tentativa de obter a quantidade de elementos é incorreta, e retornará sempre o valor: 0 ... por isso nã solução que lhe enviei anteriormente não foi funcional
    1 point
  35. Fiz agora com 2 veículos, pra colocar mais veículos é só vc ir adicionando eles na primeira table. Não se esqueça de colocar vírgula no final. carros = { -- Tabela com vários veículos em suas posições. createVehicle (411, 2475, -1657, 13.1, 0, 0, 0), -- Cria o veículo na coordenada específica. (essa posição é por padrão o ponto de respawn) createVehicle (411, 2480, -1657, 13.1, 0, 0, 0), -- Cria outro veículo na outra coordenada e assim por diante. Este é um caso raro onde o elemento pode ser chamado sem estar em uma variável. -- (precisa ter a vírgula no final de cada veículo pois os elementos de uma table precisam estar separados entre vírgulas) } globalTimer = {} -- tabela vazia global. Os timers serão anexados aos veículos e não nos jogadores. function startRespawn (thePlayer) local meuCarro = false -- Variável local, que será preenchida pelo veículo que o jogador saiu se ele estiver na tabela carros. for i, vehicle in ipairs (carros) do -- Para cada veículo da table 'carros', faça: if source == vehicle then -- Se o veículo que o jogador saiu for um veículo deste script, então: meuCarro = vehicle break -- (Break = sair deste FOR) Para de verificar os outros carros, pois o veículo já foi encontrado. end end if not meuCarro then return end -- Se o veículo que o jogador saiu não está na lista acima (não faz parte deste script), então nada acontece. if not isTimer (globalTimer[meuCarro]) then -- Verifica se o veículo já possui um timer ativo. Se não tiver, então: if (#getVehicleOccupants(meuCarro) > 0) then return end -- Não faz nada se ainda houver alguém dentro do veículo e não inicia o timer. outputChatBox ("Esse veiculo será respawnado em 10 segundos! Entre nele novamente!", thePlayer) -- Mensagem de aviso para o player. globalTimer[meuCarro] = setTimer (function() -- Conta 10 segundos respawnVehicle (meuCarro) -- Respawna o veículo. setVehicleEngineState (meuCarro, false) -- Desliga o motor do veículo. end, 10000, 1) -- Tempo e repetições do timer. else resetTimer (globalTimer[meuCarro]) -- Se já existe o timer do veículo, reinicia ele. end end addEventHandler ("onVehicleExit", root, startRespawn) -- Executa essa função quando qualquer um sair de qualquer veículo. function cancelRespawn (thePlayer) local meuCarro = false -- Variável local, que será preenchida pelo veículo que o jogador entrou se ele estiver na tabela carros. for i, vehicle in ipairs (carros) do -- Para cada veículo da table 'carros', faça: if source == vehicle then -- Se o veículo que o jogador entrou for um veículo deste script, então: meuCarro = vehicle break -- (Break = sair deste FOR) Para de verificar os outros carros, pois o veículo já foi encontrado. end end if not meuCarro then return end -- Se o veículo que o jogador entrou não está na lista acima (não faz parte deste script), então nada acontece. if isTimer (globalTimer[meuCarro]) then -- Se existe o timer deste veículo, então: killTimer (globalTimer[meuCarro]) -- Cancela o timer deste veículo e ele não vai mais respawnar até que o último jogador saia de novo do veículo. outputChatBox ("Esse veiculo não será mais respawnado.", thePlayer) -- Mensagem de aviso para o player. end end addEventHandler ("onVehicleEnter", root, cancelRespawn) -- Executa essa função quando qualquer um entrar em qualquer veículo.
    1 point
  36. القسم خطاء . @!#NssoR_) القسم الصحيح : https://forum.multitheftauto.com/forum/134-البرمجة/ + ما تقدر تمسحهم بس في طريقه اخري | انك ترفع الصور علي رابط و تستخدم وظيفه fetchRemote
    1 point
  37. If anything, it's the modulo operator that's redundant here, as the rotation argument will take any number, not necessarily one that is truly between 0 and 360. Regarding the division, it should make a difference -- diving the tick count will slow it down, in this case, the ticks will increment 20× slower, meaning a 20× slower rotation speed, from 1000 deg·s-1 to 50 deg·s-1
    1 point
  38. ❤ حبيبي رام , من زمان عنك , وياك ي
    1 point
  39. يا صاحبي كودك يحتاج لاشياء ثانيه ما تقدر تكفي بهذا الكود فقط .
    1 point
  40. "client side :" label = guiCreateLabel(x, y, xx, yy, "", false) guiLabelSetColor(label, 255, 0, 0) guiSetFont(label, "default-small") local wrongPass = label addEvent("wrongPass", true) addEventHandler("wrongPass", root, function() guiSetText(wrongPass, "Wrong Password !") end ) "Server Side" واعمل فى ملف السيرفر لما يكون الباسوورد غلط الكود ده triggerClientEvent(source, "wrongPass", source) وبس
    1 point
  41. Joined recently the Discord server, great community. Just people being themself... Wanna be part of it? Join the damn discord server now! Avoid the pedobears..
    1 point
  42. givePedWeapon(ped, 31, 5000, true) 31 = ايدي السلاح 5000 = عدد الرصاص بالتوفيق
    1 point
  43. الافضل انك تستخدم مود منشور اسمه slothbot وسوي اكسبورت وسوي بوت وبيكون مظبوط لحاله
    1 point
  44. givePedWeapon -- Clinet Side setPedControlState -- Client Side
    1 point
  45. السلام عليكم ورحمة الله وبركآته ، شرحنا اليوم عن حفظ / جلب / مسح دآتا الحسآب نبدأ ب أول وظيفة وضع دآتا للحسآب ، setAccountData الجملة التركيبية للوضيفة :- bool setAccountData ( account theAccount, string key, string value ) account theAccount :- الحسآب ولآزم تستخدم معه وظيفتين للتقليل من الأخطاء الوظيفتين المستخدمات :- isGuestAccount -- التحقق من ان اللاعب بحساب زائر getPlayerAccount -- جلب حسآب الاعب string key :- المفتآح ، أو اسم الدآتا توضع بين العلامتين العلامتين :- " " / ' ' string value :- القيمة ، true / false احيآنا تكون القيمة إسم / واحيانا تكون القيمة رقم ( أمثلة :- ( على كل قيمة مثآل على القيمة true / false عند دخول الماركر نضع له داتا addEventHandler("onMarkerHit",root, function ( player ) if getElementType(player) == "player" then if source == Marker then local acc = getPlayerAccount (player) if not isGuestAccount (acc) then setAccountData ( acc , "DataName", true ) end end end end ) مثآل على القيمة الرقمية في كل مرة يلمس الماركر يزيد على عدد الداتا 1 addEventHandler("onMarkerHit",root, function ( player ) if getElementType(player) == "player" then if source == Marker then local acc = getPlayerAccount (player) if not isGuestAccount (acc) then setAccountData ( acc , "DataName", getAccountData (acc , "DataName") +1 ) end end end end ) مثآل 3 ، مثآل على داتا الأسم ، هذا المثال عبارة انه نكتب شي بالاديت بوكس وينحفظ عن طريق الحساب ! -- Client Side addEventHandler ("onClientGUIClick",root, function () if source == button then local text = guiGetText (editbox) triggerServerEvent ("saveText",localPlayer,text) end end ) -- Server Side addEvent ("saveText",true) addEventHandler ("saveText",root, function ( text ) local acc = getPlayerAccount (source) if not isGuestAccount (acc) setAccountData ( acc , "save", text ) end end ) أما الآن نشرح الوظيفة الثآنية ، وظيفة جلب دآتا الحسآب getAccountData الجملة التركيبية للوظيفة string getAccountData ( account theAccount, string key ) account theAccount :- الحسآب ولآزم تستخدم معه وظيفتين للتقليل من الأخطاء وقد شرحتهن سابقا string key :- المفتآح ، أو اسم الدآتا توضع بين العلامتين العلامتين :- " " / ' ' أمثلة :- setAccountData في المثآل الأول سوف نقوم بجلب الداتا في المثال الثاني للوظية عند كتابة كلمة في اف 8 يجلب لنا الداتا الرقمية للاعب addCommandHandler("getPoint", function(player) local acc = getPlayerAccount (player) if not isGuestAccount (acc) outputChatBox("Your point in : "..getAccountData(acc, "DataName", player ) end end ) setAccountData في المثال الثاني الآن سوف نجلب الكتآبة التي قام الاعب بكتاباتها في المثال رقم 3 للوظيفة عند كتابة كلمة في اف 8 يجلب الداتا addCommandHandler("getText", function(player) local acc = getPlayerAccount (player) if not isGuestAccount (acc) outputChatBox("The text is : "..getAccountData(acc, "save", player) end end ) اما الآن نشرح لكم الوظيفة الثالثة ! وظيفة مسح داتا الحسآب removeAccountData الجملة التركيبية للوظيفة bool removeAccountData ( account , string key ) account :- الحسآب ولآزم تستخدم معه وظيفتين للتقليل من الأخطاء وقد شرحتهن سابقا string key :- المفتآح ، أو اسم الدآتا توضع بين العلامتين العلامتين :- " " / ' ' أمثلة :- setAccountData في هذا المثال سوف نقوم بمسح الداتا الموجودة عند الاعب في المثال 2 للوظيفة addCommandHandler("removedata", function(player) local acc = getPlayerAccount (player) if not isGuestAccount (acc) removeAccountData ( acc , "DataName" ) end end ) والله ولي التوفيق
    1 point
  46. addCommandHandler("vehspawner", function(player, cmd, vehID) local vehID = tonumber(vehID) if vehID >= 400 and vehID <= 611 then local x, y, z = getElementPosition(player) marker = createMarker(x, y+2, z-1, "cylinder", 2, 255, 255, 0, 255) addEventHandler("onMarkerHit", marker, on_Hit) setElementData(marker, "ID", vehID) end end) function on_Hit(player) if getElementType(player) == "player" and not isPedInVehicle(player) then local x, y, z = getElementPosition(player) warpPedIntoVehicle(player, createVehicle(getElementData(source, "ID"), x, y, z)) end end addCommandHandler("ds", function(player) for i, marker in ipairs(getElementsByType("marker")) do if getElementData(marker, "ID") then removeEventHandler("onMarkerHit", marker, on_Hit) destroyElement(marker) end end end)
    1 point
  47. All of this bickering goes back many years, the tale of SA-MP and MTA is one of great turbulence and ups and downs. To me it really seems completely irrelevant today. Kalcor was a part of the MTA Team in the past, yes - and as far as I'm aware he was perhaps the most active during his time on MTAVC Blue. From his most recent post, it's obvious he didn't like the way MTA was structured at the time, so decided to do things himself. Obviously he would have learned a lot about VC during his time at MTA, skills that could be transferred to VC-MP, but that does not imply theft in any way. Yes, VC-MP had one source file but we resolved that issue back in the day when we agreed the credits would be adjusted. Kalcor seems persistent in his claims that MTA has access to the SA source code, while claiming that we threatened the startup of rival mods with quotes from 'MTA Team member' MrJax. A post dating Sun May 01 00:54:25 2005, over a year before MrJax joined the MTA team, shows him speculating that he heard Oli has access to 'a lot' of the SA source code. It's completely unsubstantiated to claim that we ever 'threatened' people not to compete because of any exclusive access, and infact we've stated that we've been flattered by people wishing to follow the path of MTA. To the best of my recollection, during the early days of SA-MP, the communities of MTA and SA-MP were very harmonious, and Blokker would regularly post in the SA-MP forums. It's always been encouraging to see multiplayer mods actually sustain themselves without dying - which can't be said of GTA:t, Bounce-Multiplayer, SA-2P, San Andreas Party, NET.GTA, SanAnarchy, ProjectAndreas Reloaded and so many other multiplayer mods that couldn't survive the tests of development. It's a great achievement for SA-MP to get where it is, and the strong position it holds certainly has affected the focus and development of MTA. Concering the source code, as we have confirmed before, we did recieve a couple of header files, all of which can be found at our repository and are nothing more than some flag/function names, we don't actually have the source CODE. For exampe CVehicle.h contains CVehicleFlags info, but even that info isn't full as in the next struct - CTrainFlags you may notice a lot of unknown flags. We have never been backed by R* and in fact, as Blokker has pointed out, we've lost all our contacts right after Hot Coffee release. The fact of the matter is that MTA is an open-source mod. Since going open-source, our player counts have risen from around 15,000 players per month during DP1 to 190,000 players a month. Whether or not the revision 1 of our first open-source code contained SA source files is irrelevant: MTA was a poor product during developer previews. Since then, our many developers all around the world who've submitted code through our bugtracker for review and have often gained full commit access. We've seen fundamentals like controller support, refreshed GUI, voice chat, custom handling, custom sound support all through the power of Open-Source and GPL. To claim that the endeavour of all our hardworking contributors is because someone did it for us is frankly hilarious. I'm very appreciative of the hard work our current contributors put in, and it's of no surprise that none of the MTA:VC Blue team or indeed the original MTASA team currently work on MTASA. We are a powerful, flexible and accurately synchronised open-source multiplayer for San Andreas. I can't say the same for DP1, but we've weathered through many storms and our player count is rapidly rising. Check our changelogs - they speak for themselves. There's no SA source code in them. Bearing in mind we have two different pieces of software performing the same core functionality, it's unsurprising that ideas are seemingly borrowed from one another. There's no use making accusations over what feature belonged to whom - but hey, that's competition. Really, both parties could have started flamewars every time another fix or feature appears in one mod after another, but we prefered to stay away from that for the last years. MTA and SA-MP work very differently, and it's unsurprising that both mods have their limitations (of which i believe is the cause of this discussion). I believe all of the questions have been answered, so I don't see a point to continue this discussion.
    1 point
×
×
  • Create New...