Forum

> > CS2D > Scripts > Trying to modify conrols
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch Trying to modify conrols

1 Antwort
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt Trying to modify conrols

SashaG
User Off Offline

Zitieren
Hello. I just starting in Lua and need your help. I write a script and it doesn't work.

I want to switch weapons fast by mousewheel.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
bind "mwheelup" "cw(1)"
bind "mwheeldown" "cw(-1)"

cwSN = 10;

function cw(IoD)
 cwSN = cwSN + IoD
 eSN = cwSN % 10
 eSNd = (cwSN % 10) + 10
 if (cwSN % 10) >= 0
  parse("menuselect "..eSN)
 if (cwSN % 10) < 0
   parse("menuselect "..eSNd)
 return 0
end

The code is bad, i know, but i don't know how to realize it yet...

Console says, that unknown command "cwsn"...
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht