And a command, when terrorist say: @info id, will show the area where the counter terrorist is, for 5000 money.
Area "X, Y" in map have a name, for example:
Area "1000, 500" is Beach Location.
edited 1×, last 05.11.16 06:41:30 pm
rounds = {} rounds.spots = { {420,69,"Location 1"}, {69,420,"Location 2"} } addhook("startround","_sr") function _sr() 	rounds.time = game("mp_roundtime")*60 end addhook("second","_s") function _s() 	rounds.time = rounds.time - 1 	if rounds.time == 10 then 		for _,id in pairs (player(0,"team2living")) do 			parse("setscore "..id.." "..player(id,"score")+1) 		end 	end end addhook("say","_sa") function _sa(id,t) 	if t:sub(1,5) == "@info" then 		local target = tonumber(t:sub(7,#t)) 		if player(id,"money") >= 5000 then 			if target then 				local closest = 9999 				for k,v in pairs (rounds.spots) do 					if math.sqrt(((player(target,"x")-(v[1]))^2 + ((player(target,"y")-(v[2]))^2) < closest then 						closest = k 					end 				end 				msg2(id,"Player "..player(target,"name").." is in "..rounds.spots[closest][3]) 				parse("setmoney "..id.." "..player(id,"money")-5000) 			end 		end 	end end