xeon17 Posted January 11, 2014 Posted January 11, 2014 i'm lua begginer and need help at my base script , my script no work , i want when a player have a gang and he going in extample base Garagem and write /buygaragem on the marker he buy the base for 500.000 $ and the radar area get his gang color. can someone help me please 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) addCommandHandler("buygaragem", function(player) local playerTeam = getPlayerTeam ( playerTeam ) if ( playerTeam ) then r,g,b = getTeamColor(theTeam) setRadarAreaColor(radararea,r,g,b,155) local money = getPlayerMoney(player) if (money >= 500000) then takePlayerMoney(player, 500000) local color = getTeamColor ( playerTeam ) outputChatBox("#FFF000[bASE] #00FFFFYour gang buyed a base #00FF00 GARAGEM !", player, 0, 0, 0, true) end end end) A unique GangWar gamemode waiting for you!Click here for more information.
Castillo Posted January 11, 2014 Posted January 11, 2014 And what is the problem? what is not working? San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
xeon17 Posted January 11, 2014 Author Posted January 11, 2014 When i write /buygaragem on the market nothing happening , radar area no get the player gang color and player no lose money. in desbug : [2014-01-11 19:03:22] WARNING: TestBase\server.lua:6: Bad argument @ 'getPlayerTeam' A unique GangWar gamemode waiting for you!Click here for more information.
Karuzo Posted January 11, 2014 Posted January 11, 2014 Try this : local playerTeam = getPlayerTeam ( source )
Castillo Posted January 11, 2014 Posted January 11, 2014 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) addCommandHandler ( "buygaragem", function ( player ) local playerTeam = getPlayerTeam ( player ) if ( playerTeam ) then local r, g, b = getTeamColor ( playerTeam ) setRadarAreaColor ( radararea, r, g, b, 155 ) local money = getPlayerMoney ( player ) if ( money >= 500000 ) then takePlayerMoney ( player, 500000 ) local color = getTeamColor ( playerTeam ) outputChatBox ( "#FFF000[bASE] #00FFFFYour gang buyed a base #00FF00 GARAGEM !", player, 0, 0, 0, true ) end end end ) San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
xeon17 Posted January 11, 2014 Author Posted January 11, 2014 Again this. [2014-01-11 19:17:01] WARNING: TestBase\server.lua:6: Bad argument @ 'getPlayerTeam' EDIT (To Solidsnake14): THIS IS PERFECT I LOVE YOU <3 A unique GangWar gamemode waiting for you!Click here for more information.
Castillo Posted January 11, 2014 Posted January 11, 2014 You're welcome. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
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