Forum

> > CS2D > Scripts > Commands
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch Commands

2 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt Commands

OutstandingPP
BANNED Off Offline

Zitieren
Hello Guys.

I want admin commands because i am learning scripting and i need help.

Just send me code for the commands so i can use it

Example: !kill <id> or !kick <id>


yep i am noob scripting u don't need to reply me with it

alt Re: Commands

GeoB99
Moderator Off Offline

Zitieren
You should search for Lua tutorials such as the one user Yates provided if you want to succeed at learning the language. It'd roughly take several days to weeks to cope with Lua basics if you have never coded in your life.

https://www.tutorialspoint.com/lua/ (pretty useful, I recommend it - you can find more on Google)
http://www.cs2d.com/help.php (CS2D Lua Commands/Hooks/etc. reference)

Here's also an example code of how you build the commands you need.
The Code >

Easy stuff. However note that it uses
string.sub()
which is inefficient and slow in performance. It must be used only when you add few commands. Once you have got the basic knowledge, I suggest that you use the pattern matching (thread cs2d [Tip] Stop using string.sub() for commands) if you decide to create a script with many commands.
1× editiert, zuletzt 13.01.17 20:38:25
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht