1
2
3
4
5
6
2
3
4
5
6
addhook("endround","mvp") function mvp(id) if player(id,"mvp") then parse("sv_msg2 "..id.." test@C") end end
addhook("endround","mvp") function mvp(id) if player(id,"mvp") then parse("sv_msg2 "..id.." test@C") end end
player(id,"mvp")is how many times a player is called MVP. And endround's parameter is for how the round ended.
mvp = {} for i = 1, game("sv_maxplayers") do mvp[i] = 0 end addhook("endround", "endr") addhook("startround", "st") function st() 	for i = 1, player(0, "tableliving") do 		mvp[player(0, "tableliving")[i]] = player(player(0, "tableliving")[i], "mvp") 	end end function endr() 	for i = 1, player(0, "tableliving") do 		if player(player(0, "tableliving")[i], "mvp") == mvp[player(0, "tableliving")[i]] + 1 then 			msg("TEST DONE") 		end 	end end
mvp = {} for i = 1, tonumber(game("sv_maxplayers")) do mvp[i] = 0 end recentmvp = 0 addhook("endround","endr") addhook("startround","st") function st() 	for _, i in ipairs(player(0,"table")) do 		mvp[i] = player(i,"mvp") 	end end function endr() 	for _, i in ipairs(player(0,"table")) do 		if player(i,"mvp") > mvp[i] then 			recentmvp = i 			msg("Current MVP is "..player(recentmvp,"name")) 			break 		end 	end end