PhantomNL Posted August 20, 2013 Share Posted August 20, 2013 Hello, I need some help with this Turf script: https://community.multitheftauto.com/index.php?p= ... ls&id=5606 There has already been a topic with this, but it seems to be abandoned.. So I just ask again, how do I let that turf system work with Castillo's Gang System? I have absolutely no idea on how to script, but I tried some things, please don't slash what I did in the script, I changed all the words with 'team' in it, to 'gang'. This seems to take effect on the script, 'cause it no longer says 'You need to be in a team to capture this turf!' It just tells me to wait 10 minutes, but nothing happens, the turf on the minimap should be flashing, and should turn to the gang/team color when the 10 minutes are passed. Also, please explain on how I can add more turfs to San Andreas. Just some information: xXMADEXx sayd this in the old topic; 'You just have to make exports to get the player gang, and i know its possible, because i have done it with those two resources.' Here's the script: local pCuboid1 = createColCuboid(2133.1950683594, 633.66455078125, 10, 197.5, 92, 30) local pArea1 = createRadarArea( 2130, 630, 200, 100, 255, 255, 255, 125 ) setElementData(pCuboid1, "friendly", "no") setElementData(pCuboid1, "ownedBy", "") function callClientFunction(client, funcname, ...) local arg = { ... } if (arg[1]) then for key, value in next, arg do if (type(value) == "number") then arg[key] = tostring(value) end end end triggerClientEvent(client, "onServerCallsClientFunction", resourceRoot, funcname, unpack(arg or {})) end addEventHandler('onColShapeHit', pCuboid1, function(p) local getOwnedBy = getElementData(pCuboid1, "ownedBy") callClientFunction(p, "NeedMsg", 6, getOwnedBy) callClientFunction(p, "NeedMsg", 1) if (getPlayerGang(p)) then local pGang = getPlayerGang( p ) local iR, iG, iB = getGangColor( pGang ) local rR, gG, bB = getRadarAreaColor( pArea1 ) local data = getElementData(pCuboid1, "friendly") if ( iR == rR ) and ( iG == gG ) and ( iB == bB ) and ( data == "yes" ) then callClientFunction(p, "NeedMsg", 2) else setRadarAreaFlashing( pArea1, true ) capturing = setTimer( function( ) setElementData(pCuboid1, "friendly", "yes") setElementData(pCuboid1, "ownedBy", getGangName(pGang)) givePlayerMoney( p, 4000 ) callClientFunction(p, "NeedMsg", 4) setRadarAreaColor( pArea1, iR, iG, iB ) setRadarAreaFlashing( pArea1, false ) end, 600000, 1 ) end else callClientFunction(p, "NeedMsg", 3) end if (getPedOccupiedVehicle( p )) then callClientFunction(p, "NeedMsg", 5) end end ) addEventHandler('onColShapeLeave', pCuboid1, function(p) local getOwnedBy = getElementData(pCuboid1, "ownedBy") setRadarAreaFlashing( pArea1, false ) callClientFunction(p, "NeedMsg", 7, getOwnedBy) if isTimer(capturing) then killTimer(capturing) end end ) Thanks to all the people that want to help me Link to comment
PhantomNL Posted August 22, 2013 Author Share Posted August 22, 2013 Bump - anyone there? Link to comment
Maro4life Posted October 22 Share Posted October 22 i don’t know man,iam too new at developing literally i will be crazy because of i dont know how to develop gang turfs system :v Link to comment
Recommended Posts