InfuzionGaming.com
February 10, 2012, 09:20:57 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length

Shout Box

[History] [Commands]

[February 03, 2012, 04:59:14 PM] Unpayed_overtime: what.

[February 04, 2012, 04:41:41 PM] TDUB: why is site under construction

[February 04, 2012, 09:15:58 PM] Unpayed_overtime: Just knew that megaupload is down... and anymonus supports Megaupload... yay?

[February 06, 2012, 09:32:28 PM] Lockem Shoto: yes we remember you kao

[February 09, 2012, 03:27:55 PM] Unpayed_overtime: The first time I see Fetish Retardant in a porno. Eew.

[February 09, 2012, 11:08:24 PM] Lockem Shoto: Come to think about it...

[February 09, 2012, 11:08:29 PM] Lockem Shoto: I'm pretty sure most of those servers have bots in them

[February 09, 2012, 11:08:36 PM] Lockem Shoto: I was just playing HL1 campaign and decided to go on to multiplayer

[February 09, 2012, 11:08:38 PM] Lockem Shoto: And tried talking to them

[February 09, 2012, 11:08:40 PM] Lockem Shoto: BUT NOPE

[February 09, 2012, 11:08:41 PM] Lockem Shoto: nothing

[February 09, 2012, 11:08:46 PM] Lockem Shoto: they just played and played

News:
Gameservers Offline, mostly playing League. Join Vent for chat/anything else!

 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: How to script  (Read 427 times)
racsO
New Member
*

Popularity: 0
Offline Offline

Posts: 2


View Profile Email
« on: February 24, 2010, 03:53:07 PM »

Basics

First think you need to know is that an alias is substitute command for a group of other commands. This is an example of a alias:

alias fdsasd "ak47;net_graph 3"

You ALWAYS need quotes around the second part if it has a semicolon in it. If not, the game will think it's two separate commands: "alias fdsasd ak47" and "net_graph3"

As you see the commands are separated by a semicolon. Now, put this in your userconfig.cfg in your cstrike folder (make one if you don't have one) and it should work. Now, when you type "fdsasd" in console then you will buy an ak47 and put net_Graph 3 on.

~~
Toggle and Cycle scripting

This is basically cycling through a few commands while pressing the same button. This is done by changing the bind of the key. Both of these examples use the same idea, but the first one is simpler to understand.

First example: (less complex)

net_graph 3
bind f netgraph0
alias netgraph0 "net_graph 0;bind f netgraph3"
alias netgraph3 "net_graph 3;bind f netgraph0"

This toggles from net_graph 3 to 0 with just pressing the f key. net_graph 3 is default.


Second example: (more complex)

net_graph 3
Bind f netgraph0
alias netgraph0 "net_Graph 0;bind f netgraph1"
alias netgraph1 "net_graph 1;bind f netgraph2"
alias netgraph2 "net_Graph 2;bind f netgraph3"
alias netgraph3 "net_graph 3;bind f netgraph0"

What this script does is by default, there is net_Graph 3. (because of the "net_graph 3" line at the beginning). And when you press F, the net_Graph options will cycle through.

~~
+/- Toggle scripting

What the +/- scripts do is that when you hold down a key, a command will be entered, and when you let go, another command gets entered. Here I'll used the net_Graph for an example again.

net_graph 0
bind f +netgraph3
Alias +netgraph3 net_graph 3
Alias -netgraph3 net_Graph 0

That's all! This does not need quotes because there are no commands separated by semicolons. This has net_graph 0 by default, and turns net_graph 3 on whenever you have the F button pressed in.

Questions?
Logged
LuD
Staff-GameServer Administrator
Jr. Member
*****

Popularity: 0
Offline Offline

Posts: 49


View Profile
« Reply #1 on: February 24, 2010, 05:41:04 PM »

HAHAH racso ur too smart bic boi

Logged
Peter^_^
Global Moderator
VIP User
*****

Popularity: 0
Offline Offline

Posts: 1915


View Profile
« Reply #2 on: February 25, 2010, 02:09:58 PM »

already been posted long ago

http://www.infuziongaming.com/forum/index.php/board,10.20.html


pz
Logged

racsO
New Member
*

Popularity: 0
Offline Offline

Posts: 2


View Profile Email
« Reply #3 on: February 25, 2010, 03:32:02 PM »


O.... FAK U

This covers some different stuff though. Like cycling. :|
Logged
KoMMyHucT
300+ Dedicated Member
****

Popularity: -26
Offline Offline

Posts: 331


KoMMyHucT

2773636
View Profile
« Reply #4 on: February 25, 2010, 09:21:28 PM »

so this is scripting tutorial? lmao... its like making java tutorial with only using println xDDD
Logged





LuD
Staff-GameServer Administrator
Jr. Member
*****

Popularity: 0
Offline Offline

Posts: 49


View Profile
« Reply #5 on: February 25, 2010, 09:47:05 PM »

i think that its a pretty good tutorial
gj
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.12 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!