Head-shotscipts in Counterstrike | Gamer.nl

Na eerdere trailers deze week is er een derde trailer van No Man's Sky uitgebracht.

Op het forum van Counterstrike heeft iemand een lang verhaal geschreven over de befaamde "head-shot scripts" en waarom ze niet bestaan. Hier is het (vrije lange) stuk over het script:WHY THERE ARE NO SCRIPTS:

What is a script? A script is a set or sequence of commands that are read by an interpreter and converted into game commands.Br>Therefore, scripts have only a specific set of commands available for use.For instance,

ALIAS alSetSideSpeed "set cl_sidespeed 500"SET v alSetSideSpeedthe first thing the interpreter sees is the ALIAS command (think of it like an HTML tag). Then it looks for the identifier for this ALIAS and it finds alSetSideSpeed. So now the CLIENT has an alias named alSetSideSpeed available to it. Next, the interpret looks for a value, it finds "set cl_sidespeed 500". So now the alias alSetSideSpeed has the value "set cl_sidespeed 500".

The interpreter moves on to the next line and see the SET command. This command now expects an identifier and a value. The v represents the keyboard key 'v'. What is 'v' set to? If certainly isn't alSetSideSpeed? What the HL command interpret does (I believe) is a text substitution of alSetSideSpeed and puts the value of the alias there instead. So after the alias is resolved the actual command line seen is:SET v "set cl_sidespeed 500"Presto.

Now why can't we make a headshot script? Well, lets define what is required:1) A command to adjust our pitch.

2) A command to adjust our yaw.

3) The location of the player's head.

Wow simple right? Well not really:

Lets addre the first two. It just so happens that HL DOES have two commands from adjusting a players pitch and yaw from the console. If I remember correctly they are cl_pitch xx and cl_yaw xx or something equivalent (I know they exist). What these commands do are move the players view (hence his/her aim) up or down, right or left by the xx amount. Cool.Now all we need to do is get the location of the player, preferably his head. Uh oh. Where do we get that?You see, the HL client and the HL server each have their own set of variables. These variables are registered upon start up of the client and upong connection to the server. There are two groups of "entities": commands, like +attack, kick etc, and variables like cl_sidespeed. Each variable and command has a set of flags that determine whether they are available to the server, client or both. If they are only available to the server a client cannot acce them. Commands like buy_weapon are PROGRAMMATICALLY created - they are hardcoded into the mp.dll. Therefore, in our case, a command or variable has to be available that returns a players position or gives us the location of their head. Unfortunately there are NO such commands and NO such variables. Therefore, the best we can do is use steps 1 and 2 - but you might as well use your mouse instead.If the CS team wanted, they could put in a command that gave you a players location:ex. findplayer

and this would print out that players location.Now here is another problem - the HL script interpreter does NOT support addition, subtration or multiplication nor does it support returned values from a command call. You can only set variables or call commands to perform an action or PRINT/DISPLAY status information. This means you could not do the following:SET playershead_loc_X = findplayer "Dire Wolf"It won't work and never will, even if they add the findplayer command.Bottom line:

You can't create headshot SCRIPTS that work with the effectivene that you people are claiming. It is NOT po ible. The only option is to go with the Proxy bot which, as I mentioned, has its own i ues.Verder is er nog meer te lezen over proxy-bots, client bots en serverbots. Je kan het allemaal lezen op het counterstrike forum.
Artikel als favoriet toevoegen
Deel dit artikel

Aanbevolen voor jou