heres a simple console, allows you to enter one command, press enter, and then it goes away, pauses the game while it is up, press tilde to get it to return, memorise the cheat codes since they disapear once you press tilde, things like command history and constant updates/scrolling would involve even more code, this should do for a start.
sync on
sync rate 40
for i=1 to 100
make object cube i,rnd(20)
color object i,rgb(50+rnd(150),50+rnd(150),50+rnd(150))
position object i,rnd(200),rnd(200),rnd(200)
next i
position camera 250,230,100
point camera 100,100,100
global guns
global strong
global ammo
do
for i=1 to 100
turn object left i,1
next i
if keystate(41)
repeat
until scancode()=0
console()
endif
text 0,0,"press tilde for console"
text 0,20,"guns:-"+str$(guns)
text 0,40,"health:-"+str$(strong)
text 0,60,"ammunition:-"+str$(ammo)
text 0,400,"cheat codes : give me da lot : heal me : shoppin for lead"
sync
loop
function console()
comand$=""
repeat
letter$=inkey$()
if letter$>chr$(13)
command$=command$+letter$
repeat
drawconsole(command$)
sync
until scancode()=0
endif
drawconsole(command$)
sync
until letter$=chr$(13)
if command$="give me da lot"
guns=12
endif
if command$="heal me"
strong=200
endif
if command$="shoppin for lead"
ammo=5000
endif
if command$="ubercheaterxxx"
guns=15
strong=999999
ammo=9999999
endif
endfunction
function drawconsole(com$)
ink rgb(128,128,128),0
box 0,0,screen width(),40
ink rgb(255,255,255),0
text 0,0,com$
endfunction
cheers, (oh! theres a "hidden" cheatcode in that console too, you should be able to work it out since you have the source
).
Mentor.
PC1: P4 3ghz, 1gig mem, 3x160gig hd`s, Radeon 9800pro w cooler (3rd gfx card), 6 way speakers.
PC2: AMD 2ghz, 512mb ram, FX5200 ultra, 16 bit SB.
Mini ATX cases suck.