Addon Details

Watch - Add Favorite

1 out of 1 users claim this version works for them.
Does this version work for you?

Pickups - Version 1.1 Alpha

posted on 2008-10-11 18:07:16
by LosNir


[img][/img] [b]by [color=#467be8][url=]LosNir[/url][/color].[/b] Hi again! [i]Pickups[/i] has been finally released! [b]What is [i]Pickups[/i]?[/b] [i]Pickups[/i] gives you the ability to transform your normal counter-strike game-play into an single-player FPS game style! Implement your favorite Half-Life2 healthkit, healthvial, battery and many other pickups, which you couldn't survive without them, into the world of counter-strike! [i]Pickups[/i] is highly configurable, you can edit, add and delete pickups with only few seconds! No programming/coding ability required, just edit a friendly text file. [size=16][color=orange][b]YouTube video: [url][/url][/b][/color][/size] View addon: [url][/url] [color=green]------------------------------------------------------------------------------------------------------------[/color] [b][size=18][color=#3d9dff]Requirements:[/color][/size][/b] [color=green]------------------------------------------------------------------------------------------------------------[/color][list][b][*][url=]EventScripts 2.0 or higher[/url] [/b][/list] [color=green]------------------------------------------------------------------------------------------------------------[/color] [b][size=18][color=#3d9dff]Description:[/color][/size][/b] [color=green]------------------------------------------------------------------------------------------------------------[/color][list]Allows you to create pickable funtional objects anywhere in the map, such as healthkit and armor, automatically at round-start. Coming Soon (October 13).[/list] [color=green]------------------------------------------------------------------------------------------------------------[/color] [b][size=18][color=#ffae00]Usage:[/color][/size][/b] [color=green]------------------------------------------------------------------------------------------------------------[/color][list][i]Pickups[/i] is using a main configuration file which is located by default in '/cfg/pickups/pickups.cfg'. This can be easily changed through '' in the addons-info area. [u][size=14][b]The configuration file - pickups.cfg[/b][/size][/u] [list]The configuration file contains cvars to control the behaviour of pickups, every cvar comes with a brief description, so you shouldn't have any problem understanding this file. The configuration file also contains the paths to other files.[/list] [i]Pickups[/i] is using 3 more files which are also located in '/cfg/pickups': [list][*]pickupsDB.txt - [b]Contains the pickups database[/b] [*]pickups_load.cfg - [b]Executes when pickups loads[/b] [*]pickups_unload.cfg - [b]Executes when pickups unloads[/b][/list] The last 2 files are very simple, they are executed with 'exec' on load/unload. They can contain everything like a normal cfg file. [u][size=14][b]The pickups database - pickupsDB.txt[/b][/size][/u] [list] This file contains the pickups and their properties, without this file, your server would be pickup-less! Every pickup is defined with a block of { }, and inside this block, the properties are configured. Example: [code] "healthkit" { "model" "items/healthkit.mdl" "frequency" "5" "type" "physics" "action" "playerset health %+25 [100] |0.08|" "sound" "items/medshot4.wav 1 |0.08|" "coordinates.de_dust2" "-1250.264771 1248.181274 106.335388, -1669.954956 1657.220215 16.145935" "coordinates" "[RAND]" }[/code] Let's take a look at the full properties list: [list] [*][color=red]frequency[/color] [*][color=red]coordinates[/color] [*][color=red]type[/color] [*][color=red]model[/color] [*][color=red]action[/color] [*][color=blue]onSpawn[/color] [*][color=blue]onReSpawn[/color] [*][color=blue]sound[/color] [*][color=blue]respawnSound[/color] [*][color=blue]onPickup[/color] [*][color=blue]done[/color] [*][color=blue]maxReached[/color] [*][color=blue]respawnDelayMax[/color] [*][color=blue]respawnDelayPickup[/color] [/list] The first block of properties ([color=red]red[/color]) are required, without them, [i]Pickups[/i] will generate an error. The second and third blocks of properties ([color=blue]blue[/color]) are optional, they give extra flexibility but they are not required. [color=orange]----------------------------------------------------------------------------------------------------------------------[/color] [color=red][b]Required:[/b][/color] [color=orange]----------------------------------------------------------------------------------------------------------------------[/color] - [u]frequency[/u]: [list]Controls the maximum amount of this pickup in each round. For example, setting this property to 5 will allow spawning only 5 instances of this pickup each round. * This does not effect the global maximum of allowed pickups, it will effect only the specific pickup the property is connected to.[/list] - [u]coordinates[/u]: [list]This property sets the X,Y,Z coordinates for the pickup. Each coordinate is separated with a comma (','). X Y Z axis is separated with a space (' '). You can use [RAND] as a coordinate, this will randomly spawn the pickup based on alive players location. [b]Important:[/b] This feature works as 'fill', it will fill the remaining available spawning slots based on the property 'frequency'. Supplying 6 coordinates, which 5 are XYZ and the last one is [RAND] will require a minimum 'frequency' value of 6 in order to spawn randomly at least once. Setting 'frequency' to 9 will randomly spawn the pickup 4 times. (9-5 = 4). (frequency - static xyz = random amount) Example: [code]"coordinates.de_dust2" "-1250.264771 1248.181274 106.335388, -1669.954956 1657.220215 16.145935" "coordinates" "[RAND]"[/code] There are 2 variations of this property: [list][*]coordinates [*]coordinates.MAP [/list] - [b]coordinates[/b] will take effect on every map. - [b]coordinates.MAP[/b] will take effect on the specific map. Example: coordinates.de_aztec, will take effect only on de_aztec.[/list] - [u] type[/u]: [list]Sets the pickup type. Available types:[list] [*] physics [*] dynamic [*] entity[/list] [b]physics[/b]: physics type models [b]dynamic[/b]: dynamic type models [b]entity[/b]: entity for in-game entities such as 'weapon_ak47'. [/list] - [u] model[/u]: [list]Sets the model to use for the pickup. Relative to hl2/models directory. If type is 'entity' then this should contain the entity name.[/list] - [u] action[/u]: [list]Sets the action to make on player pickup. Syntax: ' [maxvalue] |delay|' [b]Available actions:[/b] [list][*]playerset[/list] * More will be added in further releases. [b]Available parameters:[/b] [list][*]playerset[list][*]health [*]armor [*]ammo [*]Every playerlib.get attribute [/list][/list] [b]Value:[/b][list] Use the character % as the players current value. [b]Simple math is supported.[/b][/list] [b]MaxValue (optional):[/b][list] The maximum value in order to take action.[/list] [b]Delay(optional):[/b][list] If specified, the action will be delayed. - Supports float type.[/list] Examples:[list] [*][b]playerset health %/2[/b] - Will divide the players health into two, if the player had 100 hp, he will have 50hp [*][b]playerset health %/2 |1|[/b] - Same as above, but will delayed in 1 second. [*][b]playerset health %*2[/b] - Will multiple the players health, if the player had 100 hp, he will have 200hp. [*][b]playerset health %*2 [300][/b] - Same as above, but will work only if the final health (after multiplying) is lower than 300 [/list][/list] [color=orange]----------------------------------------------------------------------------------------------------------------------[/color] [color=blue][b]Optional:[/b][/color] [color=orange]----------------------------------------------------------------------------------------------------------------------[/color] The first group (onSpawn to maxReached) contains the properties which are commands, these properties executes any commands within it. The second group contains properties which are optional, but are not commands. Let's take a look:[list] [*][color=blue]onSpawn[/color] - Executes when a pickup first spawns [*][color=blue]onReSpawn[/color] - Executes when a pickup re-spawns [*][color=blue]respawnSound[/color] This property holds sound path, it's being parsed at pickup, and the value returned is used as the sound path. [*][color=blue]onPickup[/color] - Executes when a player pickup [*][color=blue]done[/color] - Executes when a player pickup, and the action has been processed. [*][color=blue]maxReached[/color] - Executes when a player pickup, but max value reached. [/list] Every command property have some available variables:[list] [*] [b]%i[/b] - PickerID (the userid of the picker) [*] [b]%v[/b] - Value (difference between player before value and after value) [*] [b]%pn[/b] - Pickup Name [*] [b]%p[/b] - Pickup ID [/list] [b]Note:[/b] Double apostrophes ( '' ) are replaced with quotation marks. Every command is separated with a semicolon ( ; ). Commands can be in python or eventscripts classic. [u]Example:[/u][list][*][b]es_msg ''Hi from esc''; es.msg(''Hi from python'')[/b] - This will print two messages, one with eventscripts classic and one with python [/list] Now let's take a look at the second group:[list] [*][color=blue]respawnDelayMax[/color] - Sets the delay between every re-spawn of the pickup, If max value reached [*][color=blue]respawnDelayPickup[/color] - Sets the delay between every re-spawn of the pickup ^ Set 0 to disable [*][color=blue]sound[/color] - The path to the sound file to emit when a player pickup [/list] [/list][/list] [color=green]------------------------------------------------------------------------------------------------------------[/color] [b][size=18][color=#3d9dff]Thanks:[/color][/size][/b] [color=green]------------------------------------------------------------------------------------------------------------[/color][list]Thanks to Maestro and Saul from IRC (and probably here in the forums) for helping me beta-testing! Also, thanks to everybody on the IRC Channel for helping me with other issues :)[/list] Please leave your comments & suggestions and +woot if you liked it :lol: Have a nice day.


Download and extract to your server's directory (cstrike, hl2dm etc). Add this line to your cfg/autoexec.cfg: [code]es_load pickups[/code]

Version Notes For 1.1 Alpha

Updated on: 2008-10-14 19:45:04 EST by LosNir (View Zip Contents)
- Fixed a possible security hole with the commands properties. Commands properties now supports only python '.es' and random methods. Importing and other dangerous methods are disabled.

( Previous Versions )

Request a new feature