Leaderboard
Popular Content
Showing content with the highest reputation on 06/01/17 in all areas
-
Have the MTA Team setup an official Discord server? I saw an unofficial one on a topic a few weeks back and joined it, but somebody speaks once every few days and it's full of weird bot scripts. Would be an idea to get one going, especially as it can link to IRC.2 points
-
Ever searched for a turf system in the community with the hope to find what you're actually looking for? Well this is your lucky day, this is a turf system based on open source which uses an SQLite database to create radar/map areas (colored squares) to fight about, even thought I was against this idea of colored squares in a limited area, I soon realized that this is exactly what people expect from a turf system. This one is even better than that. Download link: https://community.multitheftauto.com/index.php?p=resources&s=details&id=9056 Help and support: Bug reports Related questions Demo server But why should we stop in a limited area, well I can't answer that question by myself so due to that you will find turfs in all three city's (around 50 in total). To provoke a turf you need to either be in the team "Criminals" or "Gangsters", you need to create these teams manually in order to make this work. Another requirement is to be a member of a group or gang. By default this system uses the exported function "outputTopBar" from ac-message which can be found here: https://community.multitheftauto.com/index.php?p=resources&s=details&id=8620, if you don't want to use that you can simply replace "outputTopBar" with "outputChatBox". setElementData(player,"Group","any_name_here") This can also be solved by using a group system and for that I recommend this: https://community.multitheftauto.com/index.php?p=resources&s=details&id=8291 since it's also open source. Below is a part from the "data.lua" file which is used to configure the system "for dummies" members_in_turf = {{ }} -- Counts the amount of players in each group in each turf capturing = { } -- Boolean to check whenever someone is trying to capture a specific turf cooldown = { } -- Cooldown timer to prevent spam kills for stats farming time_syncer = { } -- Timers to update the client status text with information about how much time is left to capture a turf db = dbConnect("sqlite", "/turfs.db") -- Database connection (SQLLite), mysql is supported as well, see syntax for dbConnect here: -- [url=https://wiki.multitheftauto.com/wiki/DbConnect]https://wiki.multitheftauto.com/wiki/DbConnect[/url] payout_time_interval = 10800 -- Time interval between payments for owned turfs (seconds). turf_payments_max = 400 -- Maximum payments for 1 single turf during payouts. Multiplyed by turfs count divided by gangmembers count turf_payments_min = 200 -- Minimum payments for 1 single turf during payouts. (See above) lowest_amount_to_display = 50 -- Specify the lowest amount of money which is worth to notice the players about during payouts. group_system_name = "GTWgroups" -- Used for exported functions in the group system in case you want a different name of the resource file top_bar_messages = "GTWtopbar" -- (See above) team_criminals = "Criminals" -- Specify teams that are allowed to turf team_gangsters = "Gangsters" -- (See above) money_pickpocket_max = 1000 -- Specify how much (or less) money the gangmembers will pickpocket from their enemies during a kill inside a turf money_pickpocket_min = 50 -- (See above) armor_max = 35 -- The maximum amount of armor the killer will get after killing an enemy armor_min = 5 -- The minimum amount of armor the killer will get after killing an enemy weapon_stats_max = 50 -- The maximum amount of stats for the current weapon the killer will gain after killing an enemy weapon_stats_min = 5 -- The minimum amount of stats for the current weapon the killer will gain after killing an enemy turf_capture_payment_max = 3000 -- Maximum payment for capturing a turf turf_capture_payment_min = 1000 -- Minimum payment for capturing a turf time_to_capture_max = 360 -- Maximum time before a gang captures a turf (seconds) time_to_capture_min = 180 -- Minimum time before a gang captures a turf (seconds) Also note that line 12 and 13 are useful to set the name of the two exported functions globally in case you want to use a different filename. Installation: 1. Check the file names of your resources, top bar messages and a group system on line 12 and 13 in data.lua. It's important that those names match exactly. 2. The group system you use must have support for turf colors, and a exported function that can pass these colors to this turf system, to solve that simply add the above function in your group system server file. function getGroupTurfColor(group) if (not groupTable[group]) then return 255, 255, 255 end local color = fromJSON(groupTable[group][6]) return color[1], color[2], color[3] end 3. Make sure your group system has exported the getGroupTurfColor function by looking at it's meata.xml file where this line should exist: <export function="getGroupTurfColor" type="server"/> Further questions can be asked within this thread.1 point
-
1 point
-
Hi there. Oh, what is that? The holidays are here again? Yep, it looks like they are, so that means the usual stuff. We are going to give you guys & gals a heads up on what has been happening in MTA's world this whole year. And if you are one of those well informed types who does not need a recap, you still might want to give this post a read, as there will be more than that later on! 2016 in Recap Near the end of January, we released a bugfix release for MTA:SA 1.5.x - Multi Theft Auto: San Andreas 1.5.2. Among a few other things, that version had and improved the server app compatibility for Linux server hosters and fixed some desync issues. In July, we started offering a new way of promotion for server owners who wanted to gain more players quickly. Namely, one of the top positions in the ingame server browser for a week in an exchange for a small fee. We felt it was a good way to not only ensure that our Project's financial needs are balanced, but also to allow some smaller but ambitious servers to try and get the player base they were always seeking for. In August and September, we made significant changes to our forums, including a switch to a new forum software. There were a bunch of issues found afterwards (such as keeping the users login states), but we managed to fix most of them. Following that, we were featured in an article on the Rock Paper Shotgun, which was pondering the popularity of multiplayer mods for GTASA, even long after its original release. You can find the full article on the RPS website. And finally, on 20th of October, Multi Theft Auto: San Andreas 1.5.3 was released. This was a large release that could as well have been labelled as a next major release, but was not as it was still compatible with the 1.5 series. A bunch of interesting MTA:SA-related YouTube videos from this year Current player counts and version fragmentation statistics Type Amount of players Date / Time Recent peak number of concurrent unique players 27111 players 2016.12.23 (at 17.30 GMT) Highest recorded number of concurrent unique players 27111 players 2016.12.23 (at 17.30 GMT) Recent number of daily unique players 124981 players 2016.12.23 (Friday) Highest recorded number of daily unique players 142785 players 2016.09.04 (Sunday) Recent number of monthly unique players 554757 players November, 2016 Highest recorded number of monthly unique players 626167 players August, 2016 Yes, to our surprise, there was a new concurrent unique player count record set literally on the day we were gathering these stats for you. MTA:SA Version or series Percentage of players using that version or series as of 23rd of December, 2016 1.5.3 95.20% 1.5.2 1.5.1 1.5 3.60% 0.09% 0.09% 1.4.x 0.67% 1.3.x 0.28% 1.0.x + 1.1.x + 1.2.x 0.07% It looks like more people decided to use newer versions of the mod than the last year. *** As for the future, we have been working on the next release, which will contain mostly bugfixes and compatibility tweaks. However, we did some work on new features as well, such as Custom Train Tracks, which we hope to be finished soon. We also want to look into improving streaming, raising the limits and making it possible to add new IDs for things, but this will be tricky. Nonetheless, it would be great to see those features working in MTA:SA one day as, for example, they would allow server owners to use bigger and better custom maps with new vehicles working correctly for all players. That's it for now. Happy Holidays and Best Wishes for 2017 from the MTA Team!1 point
-
^ مايحتاج الي تقوله addEvent("delete",true) addEventHandler("delete",root,function(a1,a2,a3,a4) executeSQLQuery( ' DELETE FROM `Master` WHERE NAME = ? AND Card = ? AND PRICE = ? AND HOU22 = ? ', a1 , a2 , a3 , a4 ) triggerEvent("getUsers1",root) end ) addEvent("insert",true) addEventHandler("insert",root,function(ali1,ali2,ali3) local master = executeSQLQuery( ' SELECT * FROM `Master` WHERE Card=? ', ali3) if ( type( master ) == "table" and #master == 0 ) or not master then executeSQLQuery( 'INSERT INTO `Master` (NAME,PRICE,HOU22,Card) VALUES(?,?,?,?) ', getPlayerName(source), ali1, ali2,ali3 ) outputChatBox("#33ff00[Requset Has Been Sent]",source,255,255,255,true) else outputChatBox("#ff0000[You have sent request alrady]",source,255,255,255,true) end end ) لمعلوماتك ماراح يحذف لانك حاط اسم الاعب مع اكواد الالوان يوم تدخل المعلومات وبالحذف انت تقول انك حاطه بالقريد ليست بدون الالوان وكودك خرابيط استخدم الي فوق , ولاتنسى تسوي زي ماقلت لك1 point
-
في اقتراح لك ومجربه بمود من موداتي من قبل ^ سوي قيمة وضيفها ... للقاعدة value والقيمة تساوي ... الوقت والتاريخ معا, وهذي القيمة تحطها بداتا على الرو اللي تبيه لما يصير ارسال للوحة الكونسل وكذا لما تبي تحذفها تروح تجيب الداتا حقتها وترسلها للسيرفر وتحذف الرو اللي متحقق من القيمة حقته .1 point
-
MySQL и не нужен. Думаю это тебе пригодится https://wiki.multitheftauto.com/wiki/CallRemote1 point
-
Well this is quite logically. You're looking for your if-statement to be true. But it'll never be. Example you're number is 5. Then you are indeed below 6. But you aren't above or at 20. There is no existing number that's bigger than 20 but ALSO smaller than six. I do understand that you were thinking in hours instead of numbers. Change the and with an or if tonumber(h) >= 20 or tonumber(h) < 6 then1 point
-
Yeah, they do have double fields. Thats far from perfect decision, creates misleading references. But MTA architecture is such that it is the only way to make them work. I may rewrite this in future. But this will require rewriting huge chunk of all functions. As for now - I just want to make sure they work and not creating any bugs.1 point
-
Depends on. For precise dynamic calculations (when matrix transformations occur several hundred times per second) using float will result in non-orthogonal relative positions for main axises in relatively short space of time. And, ofc, precision errors will grow as you go away from zero point (0,0,0), which will result in weird object behaviour. As for commercial engines - they use 32bit as there's no sense in 64bit (graphics cards work in 32bit internally). Anyways, I made it so that you can switch precision in 1 click. So if there would be any serious performance issues it can be easily adjusted. But from what I've tested so far there's absolutely zero impact on performance. Other factors (Lua->C++->Lua conversion, internal Lua speed) are so huge, you can go with 128bits without any difference1 point
-
1 point
-
Now, lets play the game. You have to guess how much lines of code in Lua you'll need to make rotation of this complexity using functions from upcoming update: The winner will get a cookie1 point
-
1 point
-
1 point
-
1 point
-
1 point
-
1 point
-
هو صراحة من رأيي ماظنيت تحصل نجاح لان شوف اصدار لعبة جراند Sa هو افضل اصدار خرج كيف افضل اصدار ؟ انا اقولك كيف افضل اصدار من ناحيه الحجم اللعبة حجم اللعبة قليل وبنفس الوقت فيها ميزات اللعبة واشياء كويسة تقدر تخلي اللاعب يستمتع وهو يلعب مقارنة بحجمها الصغير وامكانياتها الكبيرة فهي لعبة ممتازه اللحين نجي للإصدارات الثانية Sa عندك الي اقل من والي اعلى منها Gta 5 Gta 4 / IV •—•—•—•—•—•—• Gta sa •—•—•—•—•—•—• Gta vc gta 3 - Gta sa الي اقل من الجرافكس حقها طايح حظه وناهيك عن الامكانيات الضعيفة باللعبة مثل يوم تطيح بالماي تموت وغيرها من الامكانيات الي ماكانت متطوره يضيفوها في ذلك الوقت ______ Gta sa اما بالنسبة للأعلى من فهي اصدارات خورافية ومتطورة وجرافكس عالي وإضافات رائعة لكن المشكلة تكمن بالحجم عيبها الحجم الكبير وبعض الاجهزة ما تتحملها ف من رأيي لو صار وسوو اصدار اون لاين للإصدارات الي اقل من gta sa ماظنيت رح يجيها إقبال MTA sa ف الي سوو هذا البرنامج Gta sa كان قرارهم موفق انهم اختارو يسووه على لانها هي اوسطهم وهي الي تجمع بين متعة اللعب والتطويرات والحجم القليل وشكراً1 point
-
نظام راااااااااااااااااااااااااااااااااااااااااااااااااااااااااااااااائع جدا1 point
-
1 point
-
A police script? Sure lemme be good. -- police_script.lua function policeScript() return end1 point
-
1 point
-
Over the past year a lot of people have been migrating from TeamSpeak, Skype and IRC to Discord, myself included. Some great features are that you don't need to host it yourself, setup is very quick, easy and painless and there is support for both voice and text transmission.1 point
-
So I'm finally releasing the MTA Highlight extension that powers our syntax highlighting on the forums and on the wiki. This enables the blue and orange links you see that link to the Wiki for MTA functions. The highlighter is built off of Google's prettify library, so is only compatible with software that uses Google Prettify to highlight their code. Installation Usage is really simple, and it sits very well with Google's own prettify library. Note, that you'll need a version of JQuery for the functions to work. In your HTML HEAD includes, add the following: <!-- Add JQuery --> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script> <!-- Add Google Prettify library --> <script src="//cdn.rawgit.com/google/code-prettify/master/loader/run_prettify.js"></script> <!-- Lua not added by default, add it--> <script src="//cdn.rawgit.com/google/code-prettify/master/src/lang-lua.js"></script> <!-- Get the latest function definitions from MTA Forums --> <script type='text/javascript' src='//forum.multitheftauto.com/uploads/javascript_syntax/luafuncs.js'></script> <script type='text/javascript' src='//forum.multitheftauto.com/uploads/javascript_syntax/mtafuncs.js'></script> <!-- Add MTA-prettify library --> <link rel="stylesheet" type="text/css" href="//cdn.rawgit.com/darkdreamingdan/MTA-prettify/master/mtahighlight.min.css"> <script type='text/javascript' src="//cdn.rawgit.com/darkdreamingdan/MTA-prettify/master/mtahighlight.min.js"></script> You'll then need some JavaScript to use Google's Prettify and apply MTA's markup: $(function () { // Perform Google Prettify PR.prettyPrint(); // Add MTA markup applyMTAMarkup(); }); Usage Usage is just like Google's own Prettify, but you'll need to add lang-lua as a class to your <pre/> snippets. For example: <pre class="prettyprint lang-lua"> function onWasted() if not( isGuestAccount (getPlayerAccount(source)) ) then local jailtime = getAccountData(getPlayerAccount(source), "Jailtime" ) or 0 local theWeapon = getPedWeapon (source) local weaponAmmo = getPedTotalAmmo (source) if tonumber(jailtime) == nil or 0 then outputChatBox ("1", root) fadeCamera (source, false) setTimer (setElementHealth, 1500, 1, source, 10) setTimer (setCameraTarget, 1250, 1, source, source) setTimer (fadeCamera, 2000, 1, source, true) setTimer (giveWeapon, 2000, 1, source, theWeapon, weaponAmmo, true) elseif tonumber(jailtime) > 0 then outputChatBox ("2", root) fadeCamera (source, false) setTimer (portjail, 1500, 1) setTimer (setElementHealth, 1500, 1, source, 10) setTimer (setCameraTarget, 1250, 1, source, source) setTimer (fadeCamera, 2000, 1, source, true) setTimer (giveWeapon, 2000, 1, source, theWeapon, weaponAmmo, true) end end end addEventHandler ("onPlayerWasted", getRootElement(), onWasted) </pre> Example An example JSFiddle is available here: https://jsfiddle.net/darkdreamingdan/0uvzbL1n/. Source code available here: https://github.com/darkdreamingdan/MTA-prettify . I'd really appreciate a GitHub star if you found this useful! Note: Usage may be different if installing on different CMS software. Typically, this is easily implemented by using your CMS/forum's Theme editor.1 point
-
function onColShapeHit ( player ) if ( player and isElement ( player ) and getElementType ( player ) == "player" and not isPedInVehicle ( player ) ) then local gang = exports.UGNGroups:getPlayerGroup ( player ) triggerClientEvent ( player, "UGNTurfs:onClientEnterTurfArea", player, turfLocs [ id ] ) if ( not gang ) then return exports.UGNMessages:sendClientMessage ( "You're not in a gang, you cannot turf.", player, 255, 255, 0 ) end local id = tonumber ( getElementData ( source, "UGNTurf:TurfId" ) ) if ( turfLocs[id].owner == gang ) then return end if ( turfLocs[id].attackers and turfLocs[id].attackers ~= gang ) then return exports.UGNMessages:sendClientMessage ( "The "..tostring(turfLocs[id].attackers).." gang is already trying to take this turf. Try again later.", player, 255, 0, 0 ) end if ( not turfLocs[id].attackers ) then exports.UGNMessages:sendClientMessage ( "You have started to prepare a turf war. Find cover, call backup, and wait for it to begin.", player, 255, 255, 0 ) local x, y, z = getElementPosition ( source ) exports.UGNGroups:outputGroupMessage ( getPlayerName ( player ).." is preparing a turf war with "..tostring(turfLocs[id].owner).." in "..getZoneName(x,y,z)..", "..getZoneName(x,y,z,true).."! Get there to help him, the war will start in 2 minutes!", gang, 255, 255, 0 ) setRadarAreaFlashing ( turfLocs[id].radar, true ) turfLocs[id].attackers = gang turfLocs[id].attackProg = 0 turfLocs[id].prepProg = 0 setElementData ( turfLocs[id].col, "UGNTurf:TurffingTable", turfLocs [ id ] ) end end end how to Put just Criminals Team can Turf here !! help guys1 point
-
If you're talking about walking and running then it's possible with setPedControlState.1 point
-
Hi all this is turf system but is not working please anybody fix it ----client side---- addEvent('countdown', true) function reduceCountdown( ) cont = 3 setTimer( function() cont = cont -1 outputChatBox( cont, 255, 255, 255 ) end,1000,3 ) end addEventHandler('countdown', root, reduceCountdown) addEvent('time', true); addEventHandler('time', root, function( ) local w, h = guiGetScreenSize( ); local styleLetters = guiCreateFont( 'font.ttf', 20 ); test = guiCreateLabel( w*0.0002, h*0.0011, 0.475, 0.1, 'Wait 10 minutes to capture the turf.', true ); guiLabelSetColor( test, 255, 255, 0 ) guiSetFont( test, styleLetters ); setTimer( function( ) if isElement( test ) then destroyElement( test ); end end, 5000, 1 ); end ); addEvent('friendly', true); addEventHandler('friendly', root, function( ) local w, h = guiGetScreenSize( ); local styleLetters2 = guiCreateFont( 'font.ttf', 20 ); test2 = guiCreateLabel( w*0.00025, h*0.0011, 0.475, 0.1, 'You entered friendly turf.', true ); guiLabelSetColor( test2, 0, 255, 0 ) guiSetFont( test2, styleLetters2 ); setTimer( function( ) if isElement( test2 ) then destroyElement( test2 ); end end, 5000, 1 ); end ); addEvent('group', true); addEventHandler('group', root, function( ) local w, h = guiGetScreenSize( ); local styleLetters3 = guiCreateFont( 'font.ttf', 20 ); test3 = guiCreateLabel( w*0.0003, h*0.0011, 0.475, 0.1, 'You need a group.', true ); guiLabelSetColor( test3, 255, 0, 0 ) guiSetFont( test3, styleLetters3 ); setTimer( function( ) if isElement( test3 ) then destroyElement( test3 ); end end, 5000, 1 ); end ); addEvent('time2', true); addEventHandler('time2', root, function( ) if isElement( test ) then destroyElement( test ) end end ); addEvent('friendly2', true); addEventHandler('friendly2', root, function( ) if isElement( test2 ) then destroyElement( test2 ) end end ); ---server side---- local pArea = createRadarArea( 2130, 630, 200, 100, 255, 255, 255, 125 ) local pArea2 = createRadarArea( 2488.8793945313, 680.78289794922, 250, 130, 255, 255, 255, 125 ) local pCuboid = createColCuboid( 2133.1950683594, 633.66455078125, 10, 197.5, 92, 30 ) local pCuboid2 = createColCuboid( 2486.5935058594, 678.20172119141, 9.5689830780029, 245, 133, 30 ) local pArea3 = createRadarArea( 1858, 623, 140, 165, 255, 255, 255, 125 ) local pCuboid3 = createColCuboid( 1856.2864990234, 627.07629394531, 9, 138.25, 152.75, 30 ) local pArea4 = createRadarArea( 1577, 663, 180, 130, 255, 255, 255, 125 ) local pCuboid4 = createColCuboid( 1576.8956298828, 662.84362792969, 9.671875, 181, 120.5, 30 ) local pArea5 = createRadarArea( 2778, 834, 110, 190, 255, 255, 255, 125 ) local pCuboid5 = createColCuboid( 2777.4248046875, 833.88018798828, 9.6484375, 113.5, 188, 30 ) addEventHandler("onResourceStart", resourceRoot, function() outputDebugString("|~| Turf system by manve1 |~| Has been turned on! |~| This system was downloaded from MTA Community. |~|", 3, 0, 255, 0) end ) --[[addEventHandler("onResourceStop", resourceRoot, function() outputDebugString("|~| Turf system by manve1 |~| Has been turned off! |~| This system was downloaded from MTA Community. |~|", 3, 0, 255, 0) saveS = xmlLoadFile( 'file_saves.xml' ) local save_info = xmlFindChild(saveS, 'turf', 0) xmlNodeSetAttribute( save_info, 'saved', 'nothing new' ) end )]] addEventHandler( 'onColShapeHit', pCuboid, function( player ) if (getPlayerTeam( player )) then local pTeam = getPlayerTeam( player ) local iR, iG, iB = getTeamColor( pTeam ) local rR, gG, bB = getRadarAreaColor( pArea ) if ( iR == rR ) and ( iG == gG ) and ( iB == bB ) then triggerClientEvent(player, 'friendly', player) else setRadarAreaFlashing( pArea, true ) triggerClientEvent(player, 'time', player) triggerClientEvent(player, 'countdown', player) pArea1Timer = setTimer( function() setRadarAreaColor (pArea, iR, iG, iB, 100); givePlayerMoney( player, 4000 ); outputChatBox( "Congratulations, #FFFF00 you have taken the turf!", player, 0, 255, 0, true ); setRadarAreaFlashing( pArea, false ) end, 6000, 1 ) end else triggerClientEvent(player, 'group', player) end end ) addEventHandler( 'onColShapeLeave', root, function( player ) if( source == pCuboid ) then setRadarAreaFlashing( pArea, false ) triggerClientEvent(player, 'time2', player) triggerClientEvent(player, 'friendly2', player) if isTimer( pArea1Timer ) then killTimer( pArea1Timer ) end end end ) ----------------------------- addEventHandler( 'onColShapeHit', root, function( p ) if (getPlayerTeam( p )) then if( source == pCuboid2 ) then local pTeam = getPlayerTeam( player ) local iR, iG, iB = getTeamColor( pTeam ) local rR, gG, bB = getRadarAreaColor( pArea2 ) if ( iR == rR ) and ( iG == gG ) and ( iB == bB ) then triggerClientEvent(player, 'friendly', player) else setRadarAreaFlashing( pArea2, true ) triggerClientEvent(player, 'time', player) pArea2Timer = setTimer( function() setRadarAreaColor (pArea2, iR2, iG2, iB2, 100); givePlayerMoney( p, 4000 ); outputChatBox( "Congratulations, #FFFF00 you have taken the turf!", p, 0, 255, 0, true ); setRadarAreaFlashing( pArea2, false ) end, 600000, 1 ) end end else triggerClientEvent(player, 'group', player) end end ) addEventHandler( 'onColShapeLeave', root, function( p ) if( source == pCuboid2 ) then setRadarAreaFlashing( pArea2, false ) triggerClientEvent(player, 'time2', player) triggerClientEvent(player, 'friendly2', player) if isTimer( pArea2Timer ) then killTimer( pArea2Timer ) end end end ) ------------------------------------ addEventHandler( 'onColShapeHit', root, function( p ) if (getPlayerTeam( p )) then if( source == pCuboid3 ) then local pTeam = getPlayerTeam( player ) local iR, iG, iB = getTeamColor( pTeam ) local rR, gG, bB = getRadarAreaColor( pArea3 ) if ( iR == rR ) and ( iG == gG ) and ( iB == bB ) then triggerClientEvent(player, 'friendly', player) else setRadarAreaFlashing( pArea3, true ) triggerClientEvent(player, 'time', player) pArea3Timer = setTimer( function() setRadarAreaColor (pArea3, iR2, iG2, iB2, 100); givePlayerMoney( p, 4000 ); outputChatBox( "Congratulations, #FFFF00 you have taken the turf!", p, 0, 255, 0, true ); setRadarAreaFlashing( pArea3, false ) end, 600000, 1 ) end end else triggerClientEvent(player, 'group', player) end end ) addEventHandler( 'onColShapeLeave', root, function( p ) if( source == pCuboid3 ) then setRadarAreaFlashing( pArea3, false ) triggerClientEvent(player, 'time2', player) triggerClientEvent(player, 'friendly2', player) if isTimer( pArea3Timer ) then killTimer( pArea3Timer ) end end end ) ------------------------------------- addEventHandler( 'onColShapeHit', root, function( p ) if (getPlayerTeam( p )) then if( source == pCuboid4 ) then local pTeam = getPlayerTeam( player ) local iR, iG, iB = getTeamColor( pTeam ) local rR, gG, bB = getRadarAreaColor( pArea4 ) if ( iR == rR ) and ( iG == gG ) and ( iB == bB ) then triggerClientEvent(player, 'friendly', player) else setRadarAreaFlashing( pArea4, true ) triggerClientEvent(player, 'time', player) pArea4Timer = setTimer( function() setRadarAreaColor (pArea4, iR2, iG2, iB2, 100); givePlayerMoney( p, 4000 ); outputChatBox( "Congratulations, #FFFF00 you have taken the turf!", p, 0, 255, 0, true ); setRadarAreaFlashing( pArea4, false ) end, 600000, 1 ) end end else triggerClientEvent(player, 'group', player) end end ) addEventHandler( 'onColShapeLeave', root, function( p ) if( source == pCuboid4 ) then setRadarAreaFlashing( pArea4, false ) triggerClientEvent(player, 'time2', player) triggerClientEvent(player, 'friendly2', player) if isTimer( pArea3Timer ) then killTimer( pArea3Timer ) end end end ) ----------------------------------- addEventHandler( 'onColShapeHit', root, function( p ) if (getPlayerTeam( p )) then if( source == pCuboid5 ) then local pTeam = getPlayerTeam( player ) local iR, iG, iB = getTeamColor( pTeam ) local rR, gG, bB = getRadarAreaColor( pArea5 ) if ( iR == rR ) and ( iG == gG ) and ( iB == bB ) then triggerClientEvent(player, 'friendly', player) else setRadarAreaFlashing( pArea5, true ) triggerClientEvent(player, 'time', player) pArea5Timer = setTimer( function() setRadarAreaColor (pArea5, iR2, iG2, iB2, 100); givePlayerMoney( p, 4000 ); outputChatBox( "Congratulations, #FFFF00 you have taken the turf!", p, 0, 255, 0, true ); setRadarAreaFlashing( pArea5, false ) end, 600000, 1 ) end end else triggerClientEvent(player, 'group', player) end end ) addEventHandler( 'onColShapeLeave', root, function( p ) if( source == pCuboid5 ) then setRadarAreaFlashing( pArea5, false ) triggerClientEvent(player, 'time2', player) triggerClientEvent(player, 'friendly2', player) if isTimer( pArea5Timer ) then killTimer( pArea5Timer ) end end end ) bugs WARNING: turf/turf-s.lua:91: Bad argument @ 'triggerClientEvent' [Expected string at argument 1, got nill WARNING: turf/turf-s.lua:135: Bad argument @ 'triggerClientEvent' [Expected string at argument 1, got nil WARNING: turf/turf-s.lua:179: Bad argument @ 'triggerClientEvent' [Expected string at argument 1, got nil WARNING: turf/turf-s.lua:223: Bad argument @ 'triggerClientEvent' [Expected string at argument 1, got nil1 point
-
I downloaded a turf system of community and I think it has some editing errors in this part of the script, only 1 territory is being dominated and outputChatBox ("# F08080 [TERRITORIES] # F8F8FFA gang" .. getTeamName .. "dominated territory Leer Home! "player, 0, 255, 0, true); should have some error local pArea = createRadarArea( 2130, 630, 200, 100, 255, 255, 255, 125 ) local pArea2 = createRadarArea( 2488.8793945313, 680.78289794922, 250, 130, 255, 255, 255, 125 ) local pCuboid = createColCuboid( 2133.1950683594, 633.66455078125, 10, 197.5, 92, 30 ) local pCuboid2 = createColCuboid( 2486.5935058594, 678.20172119141, 9.5689830780029, 245, 133, 30 ) local pArea3 = createRadarArea( 1858, 623, 140, 165, 255, 255, 255, 125 ) local pCuboid3 = createColCuboid( 1856.2864990234, 627.07629394531, 9, 138.25, 152.75, 30 ) local pArea4 = createRadarArea( 1577, 663, 180, 130, 255, 255, 255, 125 ) local pCuboid4 = createColCuboid( 1576.8956298828, 662.84362792969, 9.671875, 181, 120.5, 30 ) local pArea5 = createRadarArea( 2778, 834, 110, 190, 255, 255, 255, 125 ) local pCuboid5 = createColCuboid( 2777.4248046875, 833.88018798828, 9.6484375, 113.5, 188, 30 ) addEventHandler("onResourceStart", resourceRoot, function() outputDebugString("|~| Turf system by manve1 |~| Has been turned on! |~| This system was downloaded from MTA Community. |~|", 3, 0, 255, 0) end ) --[[addEventHandler("onResourceStop", resourceRoot, function() outputDebugString("|~| Turf system by manve1 |~| Has been turned off! |~| This system was downloaded from MTA Community. |~|", 3, 0, 255, 0) saveS = xmlLoadFile( 'file_saves.xml' ) local save_info = xmlFindChild(saveS, 'turf', 0) xmlNodeSetAttribute( save_info, 'saved', 'nothing new' ) end )]] addEventHandler( 'onColShapeHit', pCuboid, function( player ) if (getPlayerTeam( player )) then local pTeam = getPlayerTeam( player ) local iR, iG, iB = getTeamColor( pTeam ) local rR, gG, bB = getRadarAreaColor( pArea ) if ( iR == rR ) and ( iG == gG ) and ( iB == bB ) then triggerClientEvent(player, 'friendly', player) else setRadarAreaFlashing( pArea, true ) triggerClientEvent(player, 'time', player) triggerClientEvent(player, 'countdown', player) pArea1Timer = setTimer( function() setRadarAreaColor (pArea, iR, iG, iB, 100); givePlayerMoney( player, 4000 ); outputChatBox( "#F08080[TERRITÓRIOS] #F8F8FFA gang ".. getTeamName .." Dominou o território LeeR Home!", player, 0, 255, 0, true ); setRadarAreaFlashing( pArea, false ) end, 6000, 1 ) end else triggerClientEvent(player, 'group', player) end end ) addEventHandler( 'onColShapeLeave', root, function( player ) if( source == pCuboid ) then setRadarAreaFlashing( pArea, false ) triggerClientEvent(player, 'time2', player) triggerClientEvent(player, 'friendly2', player) if isTimer( pArea1Timer ) then killTimer( pArea1Timer ) end end end ) addEventHandler( 'onColShapeHit', root, function( p ) if (getPlayerTeam( p )) then if( source == pCuboid2 ) then local pTeam = getPlayerTeam( player ) local iR, iG, iB = getTeamColor( pTeam ) local rR, gG, bB = getRadarAreaColor( pArea2 ) if ( iR == rR ) and ( iG == gG ) and ( iB == bB ) then triggerClientEvent(player, 'friendly', player) else setRadarAreaFlashing( pArea2, true ) triggerClientEvent(player, 'time', player) pArea2Timer = setTimer( function() setRadarAreaColor (pArea2, iR2, iG2, iB2, 100); givePlayerMoney( p, 4000 ); outputChatBox( "#F08080[TERRITÓRIOS] #F8F8FFA gang ".. getTeamName .." Dominou o território TERRITORIO2!", p, 0, 255, 0, true ); setRadarAreaFlashing( pArea2, false ) end, 600000, 1 ) end end else triggerClientEvent(player, 'group', player) end end ) addEventHandler( 'onColShapeLeave', root, function( p ) if( source == pCuboid2 ) then setRadarAreaFlashing( pArea2, false ) triggerClientEvent(player, 'time2', player) triggerClientEvent(player, 'friendly2', player) if isTimer( pArea2Timer ) then killTimer( pArea2Timer ) end end end ) addEventHandler( 'onColShapeHit', root, function( p ) if (getPlayerTeam( p )) then if( source == pCuboid3 ) then local pTeam = getPlayerTeam( player ) local iR, iG, iB = getTeamColor( pTeam ) local rR, gG, bB = getRadarAreaColor( pArea3 ) if ( iR == rR ) and ( iG == gG ) and ( iB == bB ) then triggerClientEvent(player, 'friendly', player) else setRadarAreaFlashing( pArea3, true ) triggerClientEvent(player, 'time', player) pArea3Timer = setTimer( function() setRadarAreaColor (pArea3, iR2, iG2, iB2, 100); givePlayerMoney( p, 4000 ); outputChatBox( "#F08080[TERRITÓRIOS] #F8F8FFA gang ".. getTeamName .." Dominou o território TERRITORIO3!", p, 0, 255, 0, true ); setRadarAreaFlashing( pArea3, false ) end, 600000, 1 ) end end else triggerClientEvent(player, 'group', player) end end ) addEventHandler( 'onColShapeLeave', root, function( p ) if( source == pCuboid3 ) then setRadarAreaFlashing( pArea3, false ) triggerClientEvent(player, 'time2', player) triggerClientEvent(player, 'friendly2', player) if isTimer( pArea3Timer ) then killTimer( pArea3Timer ) end end end ) addEventHandler( 'onColShapeHit', root, function( p ) if (getPlayerTeam( p )) then if( source == pCuboid4 ) then local pTeam = getPlayerTeam( player ) local iR, iG, iB = getTeamColor( pTeam ) local rR, gG, bB = getRadarAreaColor( pArea4 ) if ( iR == rR ) and ( iG == gG ) and ( iB == bB ) then triggerClientEvent(player, 'friendly', player) else setRadarAreaFlashing( pArea4, true ) triggerClientEvent(player, 'time', player) pArea4Timer = setTimer( function() setRadarAreaColor (pArea4, iR2, iG2, iB2, 100); givePlayerMoney( p, 4000 ); outputChatBox( "#F08080[TERRITÓRIOS] #F8F8FFA gang ".. getTeamName .." Dominou o território TERRITORIO4!", p, 0, 255, 0, true ); setRadarAreaFlashing( pArea4, false ) end, 600000, 1 ) end end else triggerClientEvent(player, 'group', player) end end ) addEventHandler( 'onColShapeLeave', root, function( p ) if( source == pCuboid4 ) then setRadarAreaFlashing( pArea4, false ) triggerClientEvent(player, 'time2', player) triggerClientEvent(player, 'friendly2', player) if isTimer( pArea3Timer ) then killTimer( pArea3Timer ) end end end ) addEventHandler( 'onColShapeHit', root, function( p ) if (getPlayerTeam( p )) then if( source == pCuboid5 ) then local pTeam = getPlayerTeam( player ) local iR, iG, iB = getTeamColor( pTeam ) local rR, gG, bB = getRadarAreaColor( pArea5 ) if ( iR == rR ) and ( iG == gG ) and ( iB == bB ) then triggerClientEvent(player, 'friendly', player) else setRadarAreaFlashing( pArea5, true ) triggerClientEvent(player, 'time', player) pArea5Timer = setTimer( function() setRadarAreaColor (pArea5, iR2, iG2, iB2, 100); givePlayerMoney( p, 4000 ); outputChatBox( "#F08080[TERRITÓRIOS] #F8F8FFA gang ".. getTeamName .." Dominou o território TERRITORIO6",getRootElement(),255,255,255,true); setRadarAreaFlashing( pArea5, false ) end, 600000, 1 ) end end else triggerClientEvent(player, 'group', player) end end ) addEventHandler( 'onColShapeLeave', root, function( p ) if( source == pCuboid5 ) then setRadarAreaFlashing( pArea5, false ) triggerClientEvent(player, 'time2', player) triggerClientEvent(player, 'friendly2', player) if isTimer( pArea5Timer ) then killTimer( pArea5Timer ) end end end )1 point
-
* the bug is when i enter a col shape the radar area start flashing then i wait and nothing heppen when i re-enter the turf it changes the color and gives me money. but i don't want it like that, i want it like when i enter the turf i wait 5seconds then the turf starts flashing then i wait 5 other second to get 5k and the turf stops flashing and changes the color. addEventHandler( 'onColShapeHit', root, function( pla ) if (getElementType( pla ) == "player") then if (getPlayerTeam( pla )) then setTimer ( function () setRadarAreaFlashing ( Area, true ) end, 5000, 1 ) local r, g, b = getTeamColor ( getPlayerTeam( pla ) ) if isRadarAreaFlashing (Area) then setTimer ( function() setRadarAreaFlashing ( Area, false ) givePlayerMoney (pla, 5000) setRadarAreaColor ( Area, r, g ,b, 125 ) end , 1000, 1 ) end end end end )1 point
-
Wrong, you can remove gangs via your gang panel or via the exported functions of the resource. exports [ "gang_system" ]:removeGang ( gangName )1 point
-
That'll never work. You can do this: addEventHandler("onClientGUIClick",root, function () if ( source == getControl(wndCreateVehicle,"vehicles") ) then for row=0, guiGridListGetRowCount(getControl(wndCreateVehicle, "vehicles")) do guiGridListSetItemColor(getControl(wndCreateVehicle, "vehicles"),row,1,0,255,0) end end end ) It'll set the all grid list rows to green.1 point
-
1 point