1
2
screenWidth = player(id, "screenw")
screenHeight = player(id, "screenh")
Note that this returns the game resolution. CS2D might add black borders to keep the width/height ratio of the game content 1:1 so no ugly stretching is applied. These borders will not be taken into account (they will be subtracted from the values you get with screenw/screenh)