xeon17 Posted November 29, 2013 Share Posted November 29, 2013 Can someone tell me please , what function i need to use to buy a base , extample , in marker in area 51 with 1 command your team can buy base for extample 1.000.000 $ what function i need to use? Link to comment
TAPL Posted November 29, 2013 Share Posted November 29, 2013 createMarker getPlayerTeam getTeamName addCommandHandler getPlayerMoney takePlayerMoney Link to comment
xeon17 Posted November 29, 2013 Author Share Posted November 29, 2013 I'm noob at scripting my english isn't so good so i not understand much about this createMarker ( 298 x, 1815 y, 5 z [, string theType = "checkpoint", float size = 4.0, int r = 0, int g = 0, int b = 255, int a = 255 ] ) function teamName ( source, key, newTeamName ) if ( playerTeam ) then -- if he's on a team local oldTeamName = getTeamName ( playerTeam ) -- get the team's current name function whatTeamAmIOn ( source ) -- Get the player's team (source is the player who entered the command) local playerTeam = getPlayerTeam ( source ) addCommandHandler ( string buy, BuyBase, [bool caseSensitive = true] ) local money = getPlayerMoney(thePlayer) -- get the amount of money from the player who entered the command if (money > 1000000) then function takeCash ( thePlayer, command, 1000000 ) -- when the takecash command is called takePlayerMoney ( thePlayer, tonumber(1000000) ) -- Link to comment
TAPL Posted November 29, 2013 Share Posted November 29, 2013 You copied the syntax and the wiki example and put them together and that make no sense. Link to comment
Snow-Man Posted November 30, 2013 Share Posted November 30, 2013 createMarker ( 298 x, 1815 y, 5 z [, string theType = "checkpoint", float size = 4.0, int r = 0, int g = 0, int b = 255, int a = 255 ] ) function teamName ( source, key, newTeamName ) if ( playerTeam ) then -- if he's on a team local oldTeamName = getTeamName ( playerTeam ) -- get the team's current name function whatTeamAmIOn ( source ) -- Get the player's team (source is the player who entered the command) local playerTeam = getPlayerTeam ( source ) addCommandHandler ( string buy, BuyBase, [bool caseSensitive = true] ) local money = getPlayerMoney(thePlayer) -- get the amount of money from the player who entered the command if (money > 1000000) then function takeCash ( thePlayer, command, 1000000 ) -- when the takecash command is called takePlayerMoney ( thePlayer, tonumber(1000000) ) -- you should use this code 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