Leaderboard
Popular Content
Showing content with the highest reputation on 04/03/17 in all areas
-
Hello everyone Today I was thinking of a pro idea in the "meta.xml" file. <file src = "images/*" /> The "*" represents all archives. (Loop) When I do this, everything in the resource, in the folder "images" will be imported automatically, avoiding to write each file.2 points
-
I've played some Garry's Mod recently and find out that instruments are quite popular there. I thought why not to make one in MTA. Preview video Features: synced piano sounds: every player hears them real grand piano sounds by Keppy Studios (http://kaleidonkep99.altervista.org/kep ... piano.html) sheet preview using CEF from virtualpiano.net downloading sounds (50 MB) in background so you don't have to wait to start playing on server You can customize some options in settings.lua. Download: https://github.com/Brzysiu/playablepiano/ (download on github because community upload limit is too high)1 point
-
Damn it. Hum... You will need these function : getPlayerTeam() -- Get the player's team when he disconnect getTeamName() -- Because getPlayerTeam() returns a userdata value but we need a string setAccountData() -- Save the player's team on quit getAccountData() -- Get player team when he disconnected getTeamFromName() -- Because our account data is a string, not a userdata setPlayerTeam() -- Set player team when he joins getPlayerName() -- Take the player name setPlayerName() -- Add to the name the team name Ask if you have any other question. EDIT : Loki, you're too fast for me x'(1 point
-
-_________- مع الوقت تاخذ $$ فكر شوي ، تقنعني انه فيس بوك م ربح كل هالسنين1 point
-
ما تفرق انا ببدا بموقع بسيط جدا لا يوجد فيه امكانيات الفيس بوك بعدين مع التطوير يصير مثل فيس بوك والحين بجمع فريق التطوير باقي في الموقع اشياء بسيطة وافتتاجه قريب بدال تضيع الوقت في MTA1 point
-
1 point
-
1 point
-
1 point
-
1 point
-
progressbar = guiCreateProgressBar(255, 342, 305, 43, false) guiSetVisible(progressbar,true) number = 0 setTimer( function () number = number + 1 guiProgressBarSetProgress(progressbar,number) if guiProgressBarGetProgress(progressbar) == 100 then guiSetVisible(progressbar,false) end end,3000,0) صنع AhmedLY1 point
-
By giving a quick look at the source code, I can tell you that setElementData won't send your data through the network even if you set the synchronize parameter to true (line 6) bool CStaticFunctionDefinitions::SetElementData ( CClientEntity& Entity, const char* szName, CLuaArgument& Variable, bool bSynchronize ) { CLuaArgument * pCurrentVariable = Entity.GetCustomData ( szName, false ); if ( !pCurrentVariable || Variable != *pCurrentVariable ) { if ( bSynchronize && !Entity.IsLocalEntity () ) { // Allocate a bitstream NetBitStreamInterface* pBitStream = g_pNet->AllocateNetBitStream (); if ( pBitStream ) { // Send data to sync it with the server [code redacted to keep it short] // Set its custom data Entity.SetCustomData ( szName, Variable ); return true; } } else { // Set its custom data Entity.SetCustomData ( szName, Variable ); return true; } } return false; } Source1 point
-
Yup i've done this already all you have to do is onClientPlayerDamage check if its a vehicle with the damage types then setPedAnimation and setElementHealth. You might want to multiply the damage based on the vehicle's speed so you can use getElementSpeed.1 point
-
Jusonex 52 Replied: 31 minutes ago · Report I'm going to add the forum section soon, just haven't had time yet. :)1 point
-
From what I have read, you're trying to make it so players can only create one NPC ped so it doesn't cause lag. Easy. I also made it possible (optional) for them to create their own Ped skin ID, it can be optionally inserted. If "skin" isn't inserted, it'll be '139' (ID) by default. Ped is also created on the creator's rotation. Only 1 ped can be created, made a function where the creator of the ped can delete the ped with /dPed and ped is deleted upon creator's disconnection. local peds = {} function pedCreation(thePlayer, command, skin) if not isElement(peds[thePlayer]) then if thePlayer and isElement(thePlayer) and getElementType(thePlayer) == "player" then local x, y, z = getElementPosition(thePlayer) local _, _, r = getElementRotation(thePlayer) if x and y and z then if not skin then skin = 139 end peds[thePlayer] = createPed(skin, x, y, z, r, false) if peds[thePlayer] then outputChatBox("You have successfully created a ped. (ID: ".. skin ..")", thePlayer, 0, 200, 0, false) else outputChatBox("Invalid Skin ID.", thePlayer, 200, 0, 0, false) end end end else outputChatBox("Use /dPed to remove the existing Ped.", thePlayer, 200, 0, 0, false) end end addCommandHandler("cPed", pedCreation) function pedDestroy(thePlayer) if isElement(peds[thePlayer]) then destroyElement(peds[thePlayer]) peds[thePlayer] = nil outputChatBox("You have successfully deleted the ped.", thePlayer, 0, 255, 0, false) else outputChatBox("Create a ped with /cPed <id>", thePlayer, 0, 200, 0, false) end end addCommandHandler("dPed", pedDestroy) function pedDestroyQuit() if isElement(peds[source]) then destroyElement(peds[source]) peds[source] = nil end end addEventHandler("onPlayerQuit", getRootElement(), pedDestroyQuit) Si necesitas algo mas, me dejas saber.1 point
-
TXD bridging allows you to bridge multiple TXDs to make one huge one, without the performance impact, nor streaming impact that one huge TXD has. Should be added in MTA to make way for huge maps that people like me make.1 point
-
همممم تعليم ذاتي على ما اظن لكن اللي اجبرني على التعليم الذاتي شخص اعجبت بيه كثيرا كان لي خوي بديت اتعلم على سيرفره البرمجه في 2012 او 2011 على حسب ظني المهم جبت العيد في السيرفر جاك ذاك الشخص والله ناسي اسمه بس اتوقع اعتزل المهم هذا الشخص حل المشكله بكل سهوله ومن ذاك اليوم اعجبت بهذي الطريقه بالمناسبه المشكله كنت حاذف الاسل ههههه + لبى قلبك انت بوسولو اخوي اعتبرك +_+ @Abu-Solo1 point
-
كنت بسوي سيرفر , قلت ابي مودات حصرية وكذا , ولا كنت اعرف معنى برمجة , جيت قلت لعناد بمنتدى جراند العرب , ابيك تسويلي 3 مودات , قال لي :- ليس لدي الوقت الكافي , انا انقهرت وقلت بتعلم برمجة , كنت صراحة ازرف مودات واحط بحقوقي , ولا كنت افهم اشي من المود , الا الكلام الي يطلع بالشات ذذ كنت اعدله , جا يوم و سكربت خربان , سجلت بالمنتدى وقلت لهم يصلحولي السكربت , طبعا م صلحولي اياه , بعد مدري كم يوم اتوقع 1 اسبوع , طفشت ولا فاهم اشي , كل م اطلب طلب يعطوني فنكشنات ويقولولي حاول , افوت عالموقع , مثل المطلمس , ولا عارف شي , ف قلت انسى , طبعا ضليت اتابع المنشورات الي بالقسم الي ينزلونها , كان في مواضيع يحطون شرح من الفنكشنات , وعرفت انه فائدة ذا كذا , لقيت ب نفس الويكي العربية فتحت عليه , وانه شرح عربي افتح عليه واشوف , وكذا تعلمت , طبعا شاطح , و نكست " الجوكر " و عبدالكريم ضلهم يصححولي بسكربت يجوز كان 20 سطر وعبدالكريم افادني بتعلم الارقيومنتات , وبديت اتعلم لوحدي الى الآن , طبعا اكثر سكربت افادني ب البرمجة , مود مهمة مدري لمين , بس وهذي هي كل قصتي وكل الي ساعدني يعطيه العافية1 point
-
Resources should never restart automatically. The Developer knows best when to do that.1 point
-
function getRaceAlivePlayers ( ) local players = 0 for _, player in ipairs ( getElementsByType ( "player" ) ) do if ( getElementData ( player, "state" ) == "alive" ) then players = ( players + 1 ) end end return players end1 point