Spawn Alarmcars
What is the idea?
Simple idea: spawn a fully functional alarm car.
The plugin provides not only the ability to spawn standard alarm cars. You can spawn many different types of alarm cars. The plugin can save your settings and respawn the cars at every round start.
How does it work?
The plugin spawns all necessary entities and adding all dependencies.
Known Bugs?
None.
Commands (admin only)?
sm_alarmcar_list_customs | Lists all custom cars from config.
sm_alarmcar_move <x> <y> <z> [pitch] [yaw] [roll] | Moves alarm car in front of you. Optional rotates the car too.
sm_alarmcar_move_at <x> <y> <z> <newX> <newY> <newZ> [pitch] [yaw] [roll] | Moves alarm car at the given position. Optional rotates the car too.
sm_alarmcar_remove | Removes alarm car in front of you.
sm_alarmcar_remove_at <x> <y> <z> | Removes alarm car at the given position.
sm_alarmcar_rotate <pitch> <yaw> <roll> | Rotates alarm car in front of you.
sm_alarmcar_rotate_at <x> <y> <z> <pitch> <yaw> <roll> | Rotates alarm car at the given position.
sm_alarmcar_save_to_config | Saves current created cars into the config and overrides old ones.
sm_alarmcar_spawn | Spawns a fully functional alarm car in front of you.
sm_alarmcar_spawn_at <x> <y> <z> <pitch> <yaw> <roll> [r] [g] [b] | Spawns a fully functional alarm car at the given position, angles and optional color.
sm_alarmcar_spawn_custom <type> | Spawns a fully functional alarm custom car in front of you.
sm_alarmcar_spawn_custom_at <type> <x> <y> <z> <pitch> <yaw> <roll> [r] [g] [b] | Spawns a fully functional alarm custom car at the given position, angles and optional color.
sm_alarmcar_spawn_truck <type> | Spawns a fully functional alarm truck in front of you.
sm_alarmcar_spawn_truck_at <type> <x> <y> <z> <pitch> <yaw> <roll> | Spawns a fully functional alarm truck at the given position and optional angles.
Cvars?
sm_alarmcar_version - version
sm_alarmcar_mapstart - enable/disable mapstart spawning of cars (need the config file)
Anything else?
Config file structure:
PHP Code:
"alarmcars"
{
"c1m2_streets"
{
"info"
{
"count" "2" // count of cars of the map
"count_custom" "1" // count of custom cars
"count_truck" "1" // count of custom trucks
}
"data"
{
"1" // just an identifier
{
"position" "1498.104004 2780.024658 578.031250" // necessary
"angle" "0 131.807129 0" // necessary
"color" "255 255 255" // optional color for the car
}
"2"
{
"position" "-2200.863281 2120.350342 0.031250"
"angle" "0 61.054562 0"
}
}
"data_custom"
{
"1"
{
"modelname" "models/props_vehicles/cara_82hatchback.mdl" // necessary name of the model (has to be inside the model.cfg)
"position" "2445.747559 838.954773 78.031250" // necessary
"angle" "0.0 177.367325 0.0" // necessary
"color" "0 255 0" // necessary
}
}
"data_truck"
{
"1"
{
"modelname" "models/props_vehicles/cement_truck01.mdl"
"position" "805.70 2957.09 16.03"
"angle" "0.00 89.68 0.00"
// no color for trucks
}
}
}
"c1m3_mall"
{
[same again here...]
}
}
The config file locations:
./cfg/sourcemod/alarmcars_location.cfg
./cfg/sourcemod/alarmcars_models.cfg
History?
Quote:
v1.0.0 (70 downloads):
- initial release
v1.0.1 (non public):
- fixed chirp/alarm for every car and not for the one shot at
- fixed no spawning in 2nd round of versus mode
v1.0.2 (79 downloads):
- fixed pitch and roll for cars
- renamed old commands
- added new commands for removing
v1.0.3 (73 downloads):
- fixed car not moving and glass/lights are parented to the car
- fixed no spawning cars at 1st round of versus and on mapchange
- added new commands for moving and rotating cars
- added new command to save current cars into the config (overriding previous cars of the map)
v1.0.4:
- fixed errors in log, when two map loadings appeared very fast after each other
- added #pragma semicolon 1 (copy paste of file header mistake xD)
- major update:
+ updated plugin for support of custom alarm car models divided in two categories (cars / trucks)
+ updated config file to support custom models
+ added new commands for spawning --> sm_alarmcar_spawn_custom, sm_alarmcar_spawn_custom_at, sm_alarmcar_spawn_truck and sm_alarmcar_spawn_truck_at
+ added new command to list alle possible models to spawn --> sm_alarmcar_list_customs
+ updated old commands --> sm_alarmcar_move, sm_alarmcar_remove and sm_alarmcar_remove_at
+ updated save command and mapstart function for new config files
|