I make grass, the other does not work
local pCuboid1 = createColCuboid(2133.1950683594, 633.66455078125, 0, 197.5, 92, 30)
local pArea1 = createRadarArea( 2130, 630, 200, 100, 255, 255, 255, 125 )
local pLv1 = createColCuboid(2506.7692871094, 693.96868896484, 0, 200, 130, 30)
local pArea2 = createRadarArea( 2504, 694, 190, 100, 255, 255, 255, 125 )
setElementData(pCuboid1, "friendly", "",false)
setElementData(pCuboid1, "ownedBy", "",false)
messages = {
[1] = {"#00ff00[TurfSistemi]:#C86f6f Bölgeyi ala bilmek için 10 dakika bekleyin.",p, 255, 255, 255,true},
[2] = {"#00ff00[TurfSistemi]:#C86f6f Entered friendly turf.",p, 255, 255, 255,false},
[3] = {"#00ff00[TurfSistemi]:#C86f6f Bölgeyi ala bilmek için bir grupta olmalısınız.",p, 255, 255, 255,true},
[4] = {"#00ff00[TurfSistemi]:#C86f6f Bölgeyi ele geçirdiniz.",p, 255, 255, 255,true},
[5] = {"#00ff00[TurfSistemi]:#C86f6f Bölgeyi araç ile alamazsınız.",p, 255, 255, 255,true},
[6] = {"#00ff00[TurfSistemi]:#C86f6f Turffa giriş yaptınız"..getElementData(pCuboid1, "ownedBy"),p, 255, 255, 255,true},
[7] = {"#00ff00[TurfSistemi]:#C86f6f Turfdan çıkış yaptınız"..getElementData(pCuboid1, "ownedBy"),p, 255, 255, 255,true},
}
function NeedMsg(p,n,getOwnedBy)
if (n) then
outputChatBox(unpack(messages[n]))
end
end
--[[ ZONE CREATION ]]--
addEventHandler('onColShapeHit', pCuboid1, pLv1,
function(p)
NeedMsg(p,6)
if (getPlayerTeam(p)) then
NeedMsg(p,1)
local pTeam = getPlayerTeam( p )
local iR, iG, iB = getTeamColor( pTeam )
local rR, gG, bB = getRadarAreaColor( pArea1 )
local data = getElementData(pCuboid1, "friendly")
if ( iR == rR ) and ( iG == gG ) and ( iB == bB ) and ( data == "yes" ) then
NeedMsg(p,2)
else
setRadarAreaFlashing( pArea1, true )
capturing = setTimer( function( )
setElementData(pCuboid1, "friendly", "yes")
setElementData(pCuboid1, "ownedBy", getTeamName(pTeam))
givePlayerMoney( p, 4000 )
NeedMsg(p,4)
setRadarAreaColor( pArea1, iR, iG, iB )
setRadarAreaFlashing( pArea1, false )
end, 600000, 1
)
end
else
NeedMsg(p,3)
end
if (getPedOccupiedVehicle( p )) then
NeedMsg(p,5)
end
end
)
addEventHandler('onColShapeLeave', pCuboid1,
function(p)
setRadarAreaFlashing( pArea1, false )
if isTimer(capturing) then
killTimer(capturing)
end
NeedMsg(p,7)
end