Jump to content

help easy


ايهاب

Recommended Posts

hey all thus mood turf system :) i need add code iem not programer i need add player johin turf = give player 3 star

this getPlayerWantedLevel

https://wiki.multitheftauto.com/wiki/Ge ... antedLevel

i need add here player johin turf =wanted level 3 star * * *

UMBER ON/OFF | EXPAND/CONTRACT | SELECT ALL 
ntHandler('onColShapeHit', pCuboid1, 
    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 
                    ) 
                

Link to comment
  
addEventHandler('onColShapeHit', pCuboid1, 
    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 ) 
                        setPlayerWantedLevel(p, 3) 
                    end, 600000, 1 
                end 
            end 
        end 
    end 
) 

Link to comment
        turfTimer[source] = setTimer ( 
                        function ( ) 
                            local beachTurfCplayers = getElementColShape ( turf ) 
                            local players = getElementsWithinColShape ( turf, "player" ) 
                            setRadarAreaColor ( area, tonumber(r), tonumber(g), tonumber(b), 175 ) 
                            for _, player in ipairs ( players ) do 
                                if getElementData(player, "gang") == playerGang then 
                                    if language == "Spanish" then 
                                        outputChatBox("Felicidades Conquistaste El Turf +4K!", player, 0, 255, 0, false) 
                                    else 
                                        outputChatBox("Congratulations. You capture the turf. +4K!", player, 0, 255, 0, false) 
                                    end 
                                    triggerClientEvent("onTakeTurf", player) 
                                    givePlayerMoney ( player, 4000 ) 
                                    executeSQLQuery("UPDATE Turf_System SET GangOwner=?,r=?,g=?,b=? WHERE Turfs=?", playerGang, tonumber(r), tonumber(g), tonumber(b), "Turf["..tostring(id).."]" ) 
                                    -- setElementData ( turf, "getTurfGang", playerGang ) 
                                end 
                            end 
                            setRadarAreaFlashing ( area, false ) 
                        end 
                        ,120000, 1) -- 120000 
                end 
            end 
        end 
    end 
end 
addEventHandler ( "onColShapeHit", root, radar ) 

pls add code here

Link to comment
        turfTimer[source] = setTimer ( 
                        function ( ) 
                            local beachTurfCplayers = getElementColShape ( turf ) 
                            local players = getElementsWithinColShape ( turf, "player" ) 
                            setRadarAreaColor ( area, tonumber(r), tonumber(g), tonumber(b), 175 ) 
                            for _, player in ipairs ( players ) do 
                                if getElementData(player, "gang") == playerGang then 
                                    if language == "Spanish" then 
                                        outputChatBox("Felicidades Conquistaste El Turf +4K!", player, 0, 255, 0, false) 
                                    else 
                                        outputChatBox("Congratulations. You capture the turf. +4K!", player, 0, 255, 0, false) 
                                    end 
                                    triggerClientEvent("onTakeTurf", player) 
                                    givePlayerMoney ( player, 4000 ) 
                                    executeSQLQuery("UPDATE Turf_System SET GangOwner=?,r=?,g=?,b=? WHERE Turfs=?", playerGang, tonumber(r), tonumber(g), tonumber(b), "Turf["..tostring(id).."]" ) 
                                    setPlayerWantedLevel(player, 3) 
                                    -- setElementData ( turf, "getTurfGang", playerGang ) 
                                end 
                            end 
                            setRadarAreaFlashing ( area, false ) 
                        end 
                        ,120000, 1) -- 120000 
addEventHandler ( "onColShapeHit", root, radar ) 

you should have posted the full code from the start :D

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...