AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   New Plugin Submissions (https://forums.alliedmods.net/forumdisplay.php?f=26)
-   -   Captains Plugin (https://forums.alliedmods.net/showthread.php?t=298240)

EFFx 06-05-2017 19:31

Captains Plugin
 
1 Attachment(s)
CAPTAIN PLUGIN v1.5


Plugin release: 06/05/2017
Last update: 06/19/2017

- Description
I saw very newbies here asking for something like this. And one of them asked me in private to make another new system with Captain system. That system, has:

Code:

1. /start command for start the selection, the admin who used that command, can select two players, one will be
 the T captain and the  second the CT captain, thence, everything's normal.
2. When the admin selects those players, they  will spawn close one to one, the spawn can be changed manually
( requires a LOT of knowledge about all MAP's location, guess nobody  knows it ) or with a menu. /spawnmenu
for open it. The first coordinate, will be terrorist's coordinate. That coordinate, contains ORIGIN[0], ORIGIN[1],
ORIGIN[2] + Angles and VAngles. When you select one, the menu will re-open for you  select the CT's origin.
3. Who win, can start to select his team first. Thence, normal.
4. The captains, have 15 seconds to select someone. If him didn't select, the oppost captain will select.
5. The captains, can get a model, for be difference than others players. Thence, normal.
6. After the admin select two players, they must say .ready for start the duel.
7. Every spawn, on KnifeRound, the captains will get 100 helmet + kevlar, 0 money, no c4 plant, no weapons only the knife, obviously.
8. Noboby can change their team except the admin who has the required access.
9. It supports when the captain has disconneted. When it happens, another random player will be  selected.
If ain't there any spectator for be selected, 15 seconds countdown will be showed. If it arrives 0, the  selection will end.
10. It supports admin disconnect too. If ain't there any admin, the match will finish if the selection is running, the same if both captains have disconnected.

- Amxmodx version required
I'm using AMX Mod X Compiler 1.8.3-dev+4739, guess it works on all 1.8.3+ and 1.8.2 too, didn't test on 1.8.2

- Cvars
From dir/addons/amxmodx/configs/CaptainsPlugin/cp_cvars.cfg:

Code:

; Captains Plugin cvars settings
; The plugin will use those values

; Turn on/off the plugin
; If you want to turn the plugin activated, set it 1, if not, 0
duel_enabled "1"

; Spawn both captains close when it's knife round
; If you want to turn it activate, set it 1, if not, 0
duel_close_kniferound_spawn "1"

; Min players to start the duel
; If the players num is less than this, the duel can not start, otherwise,  it can
duel_minplayers "10"

; The weapon that'll be used on knife round
; Currently types: deagle or knife, otherwise, it'll automatically be knife
duel_weapon_mode "knife"

; Players need to say .ready to start the duel
; If you want to turn it activated, set it 1, if not, 0
duel_ready "1"

; Captains needs to say !say or !switch to choose in which team they want to start first.
; If you want to turn it activated, set it 1, if not, 0
duel_choose_side "1"


echo Cvars loaded!

- Change log
Spoiler

EFFx 06-05-2017 20:11

Re: Captain Mode
 
Released the version 1.1:

ºCode edited:
. Added duel_ready 1/0 - If you want not the .ready feature, turn this 0.
. Added duel_weapon_mode deagle/knife - If you want the duel with desert deagles, set it as 'deagle', if you wwant the duel with
knives, set it as 'knife'.
. Removed the spawnVictim() unecessary function.
. Bit optimizations at players_list2_handler handler.
. Added set_task() at for re-open the menu when the captain accidentally or purposely has closed the menu.
. Removed TASK_DUEL_TYPE, TASK_PLAYER_RESPAWN, unecessary constants.
. And bit optimizations in some functions.

Houssam Benmouna 06-06-2017 13:32

Re: Captain Mode
 
Good job :d nice mod

EFFx 06-08-2017 20:39

Re: Captains Plugin
 
Released the version 1.2:

ºCode edited:
. Added a start-duel hud showing T captain's name and CT captain's name.
. Added the deagle's ammo when the cvar 'duel_weapon_mode' is 'deagle'.
. Added a code to reset the tPlayersNum's task when a random player is selected after some captain left.
. Adjusted the szWeapoName size to 17.
. Added a check at Round_Restart() logevent.
. Removed the eLive unecessary enumerate.
. Added auto-respawn after dying when it's eSelection.

EFFx 06-11-2017 14:09

Re: Captains Plugin
 
Released the version 1.3:

ºCode edited:
. Added g_bFileExists boolean to check if the map's .ini file exists and spawn both captains correctly.
. Bit optimizations
. Added g_szChatPrefix into the ChatColor stock.
. Added log_amx() instead of write_file() at loadSpawns() stock.
. Fixed the get_players() format on checkTeamsNumber() stock and set it as boolean.
. Fixed the players selection feature.
. Added all spawn feature with Ham_Spawn instead of spawnPlayers().
. Added g_bDidntSelected for check if both captains missed the selection. If they do that, the choice will end.

EFFx 06-14-2017 14:47

Re: Captains Plugin
 
Released the version 1.4:

ºCode edited:
. Added !stay and !switch command for the captain that won the knife round for start on which team he want.
. Added IsNotSpec() macro.
. Added 4 seconds delay for show captains' name at Round_Restart() instead of instant-show.
. More about !stay and !switch:
If the captain that won the knife round don't say !stay or !switch, there's a countdown that starts from 15 to 0. If it arrives 0,
the player will say a random command.
. The g_bIsSelected is only reseted when the bIsForResetCaptainID is true.
. Added checkPlayersTasks() stock for check if when the player has left and he has tasks running, the stock'll kill that.
. Fixed a log error when any captain type .ready in the chat.
. Added 'duel_close_kniferound_spawn' to spawn all two captains close when it's 1.
. Bit optimizations

shehzad1234 06-14-2017 16:31

Re: Captains Plugin
 
Gj. <3 :D

Craxor 06-17-2017 01:31

Re: Captains Plugin
 
This is your X-Miliard-Plugin Posted :P .

EFFx 06-17-2017 13:52

Re: Captains Plugin
 
People never stop asking plugins, so everytime I see someone asking something that's cool and unique, I post it.

Natsheh 06-17-2017 17:14

Re: Captains Plugin
 
Glad you give your work for free.


All times are GMT -4. The time now is 08:00.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.