xeon17 Posted December 27, 2013 Share Posted December 27, 2013 How can i make when a player with gang want buy a base (command:/buy) it take 1000000$ from that player and gives a radar area color of his gang , it should have when player no have the money he cant buy the base. --Radar Areas radararea = createRadarArea( 2774.91992, 828.89435, 120, 206, 255, 255, 255, 225 ) radararea1 = createRadarArea( 2698.17285, 2651.81396,-200,210, 255, 255, 255,225 ) radararea2 = createRadarArea( 110.91990, 1800.89435, 200, 145, 255, 255, 255, 225 ) radararea3 = createRadarArea( 1096.89441, 1208.73755, -80, 152, 255, 255, 255, 225 ) radararea4 = createRadarArea( 996.50629, 2048.92480, -80, 132, 255, 255, 255, 225 ) radararea5 = createRadarArea( 2496.68774 ,1822.60291, -130, 142, 255, 255, 255, 225 ) --Blips createBlip(2820.63477, 971.96545, 10.75000,61) createBlip(2439.53003, 1916.40454,6.31917,61) createBlip(1058.81201, 1260.90857, 10.82031,61) createBlip(279.40317, 1831.25439, 7.72656,61) createBlip(939.85992, 2080.10718, 10.82031,61) createBlip(2587.63965, 2821.38135, 10.82031,61) --Markers marker = createMarker(2814.67114, 972.01782, 9.75000,"cylinder",2,0,0,255,255) marker1 = createMarker(2586.05591, 2840.79199, 9.82031,"cylinder",2,0,0,255,255) marker2 = createMarker(298.98865, 1815.90613, 3.71094,"cylinder",2,0,0,255,255) marker3 = createMarker(927.96558, 2076.13110, 9.82031,"cylinder",2,0,0,255,255) marker4 = createMarker(2439.23340, 1918.38110, 5.30137,"cylinder",2,0,0,255,255) marker5 = createMarker(1059.16650 ,1247.28064 ,9.82031,"cylinder",2,0,0,255,255) Link to comment
johny46 Posted December 27, 2013 Share Posted December 27, 2013 You're going to use these functions: getPlayerMoney() takePlayerMoney() setRadarAreaColor() Link to comment
xeon17 Posted December 27, 2013 Author Share Posted December 27, 2013 How to give the radar area color of the gang who type command ''buy'' on the marker? Link to comment
TAPL Posted December 27, 2013 Share Posted December 27, 2013 This depend on the gang system you have. Link to comment
xeon17 Posted December 27, 2013 Author Share Posted December 27, 2013 radararea = createRadarArea( 2774.91992, 828.89435, 120, 206, 255, 255, 255, 225 ) createBlip(2820.63477, 971.96545, 10.75000,61) marker = createMarker(2814.67114, 972.01782, 9.75000,"cylinder",2,0,0,255,255) getPlayerMoney ( player thePlayer ) function takeCash ( thePlayer, buybase, 1000000 ) outputChatBox ( #FFF000[BASE] #00FFFF Your gang buyed a base #00FF00 Area #FFF000 51 ) How to set when player write /buybase , the radar area get color of his gang ? Link to comment
TAPL Posted December 27, 2013 Share Posted December 27, 2013 This depend on the gang system you have. Need to be repeated? Link to comment
xeon17 Posted December 27, 2013 Author Share Posted December 27, 2013 i Use SolidSnake's Gang System > https://community.multitheftauto.com/in ... ls&id=1514 i have 1 other Other GANG SYSTEM , /gangcrate name , etc etc. can you tell me is this correct : radararea = createRadarArea( 2774.91992, 828.89435, 120, 206, 255, 255, 255, 225 ) createBlip(2820.63477, 971.96545, 10.75000,61) marker = createMarker(2814.67114, 972.01782, 9.75000,"cylinder",2,0,0,255,255) getPlayerMoney ( player thePlayer ) function takeCash ( thePlayer, buybase, 1000000 ) outputChatBox ( #FFF000[BASE] #00FFFF Your gang buyed a base #00FF00 Area #FFF000 51 ) Link to comment
Snow-Man Posted December 27, 2013 Share Posted December 27, 2013 radararea = createRadarArea( 2774.91992, 828.89435, 120, 206, 255, 255, 255, 225 ) createBlip(2820.63477, 971.96545, 10.75000,61) marker = createMarker(2814.67114, 972.01782, 9.75000,"cylinder",2,0,0,255,255) getPlayerMoney ( player thePlayer ) function takeCash ( thePlayer, buybase, 1000000 ) outputChatBox ( #FFF000[BASE] #00FFFF Your gang buyed a base #00FF00 Area #FFF000 51 ) How to set when player write /buybase , the radar area get color of his gang ? correct your function with " " outputChatBox ( "#FFF000[bASE] #00FFFF Your gang buyed a base #00FF00 Area #FFF000 51" ) and use addCommandHandler Link to comment
TAPL Posted December 27, 2013 Share Posted December 27, 2013 addCommandHandler("buy", function(player) local gangName = exports.gang_system:getPlayerGang(player) if gangName then local money = getPlayerMoney(player) if (money >= 1000000) then takePlayerMoney(player, 1000000) local color = exports.gang_system:getGangColor(gangName) setRadarAreaColor(radararea, color[1], color[2], color[2], 255) outputChatBox("#FFF000[bASE] #00FFFFYour gang buyed a base #00FF00 Area #FFF000 51", player, 0, 0, 0, true) end end end) Link to comment
xeon17 Posted December 27, 2013 Author Share Posted December 27, 2013 Working Great , Thank you Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now