Fail Spawn Protector + Team Limiter
1 Attachment(s)
Description:
This simple and useful plugin will protect you from dying due to bad spawn location. Now, you can spawn more players than existed spawn points inside map. This plugin is tested on special map with 32 spawnpoints at identical origin and its works nicely. Just visit this thread to read more about the testing.What can you edit? PHP Code:
This messages are printed in your server console:Note! This plugin need at least 1 valid spawn point in the map. This plugin also do not prevent connected player. It only removing or adding the spawn entity.Team Limiter: If you want to use this feature,just follow below method:Rare Problem! If the spawn entities configure via fw_TerrorMaxSpawn cvar and fw_CTMaxSpawn cvar is less than the original spawn entity, the player still be spawned at the beginning of round. As example, original spawn point is 10. If we configured it into 1, then all 10's player will be spawned at the same spawn location. So, what will happen, after round started, random player will died automatically until alive player is equal to new spawn entities or points.Credits: 1. xPaw.Changelog: Code:
v1.1 (6 Dis 2015) v1.0 - 40 v1.0 - 99 Feel free to use it. |
Re: Colorful Admin Message v1.0
Nike plugins, but i think if change command like admin_chat,
#-your text for corlor chat $-your text for hud chat it'll easy than this. |
Re: Colorful Admin Message v1.0
Code:
Cache get_user_msgid("SayText"). Don't re-index an array. |
Re: Colorful Admin Message v1.0
|
Re: Colorful Admin Message v1.0
Quote:
PHP Code:
|
Re: Colorful Admin Message v1.0
The better way is this:
Code:
|
Re: Colorful Admin Message v1.0
|
Re: Colorful Admin Message v1.0
You can search by yourself:
1. It's obvious, instead of using get_user_msgid every time, you cache it's value( it won't change during run time ). 2. Search on the wiki. |
Re: Colorful Admin Message v1.0
Quote:
I will update the code. Edit: Quote:
|
Re: Colorful Admin Message v1.1
This is pretty useless IMO, but given that there is no other plugin that does this I will let it pass if you make this changes:
1.#define ADMIN_FLAG ADMIN_IMMUNITY make it a cvar/command instead. 2.Add cvars for colors. You could let the owner decide if he wants random color or some predefined ones(that he can set up from cvars too). 3.message should be 192 and not 64. 192 is the max. 4.Remove the "stock" keyword, stock is used for functions that may not be used, but you should use everything from your plugin, thus "stock" does not make sense. 5.In print_colored:
Some suggestions: 1.Allow users to use this messages too(maybe a cvar, why not ?) 2.You could include a command like amx_showcolorcodes(or sth like this) and print the shortcuts(!g, etc). 3.Allow the player to specify to which player to send the message. For example, you may want to send the message only to player X or to all players. You can add another argument inside the command for this(like 0(for all)/CT/T/X(the player name)). |
Re: Colorful Admin Message v1.1
I will update this plugin with something more useful.
|
Re: Colorful Admin Message v1.1
There's already something more useful waiting to be reviewed - https://forums.alliedmods.net/showthread.php?t=272418 . Every option from your plugin is available in that one, so I don't think that updating this one is necessary.
|
Re: Colorful Admin Message v1.1
Quote:
@zmd, no need to think too much, just complete what I have said and it should be okay. |
Re: Colorful Admin Message v1.1
Oci, I know that your plugin can do more things. So, I will fully rewritten this code into something more useful and unique.
|
Re: Fail Spawn Protector v1.0
Feel free to use it.
Note: I have tested almost same plugin by xPaw, yet it is not working is my server. So, I come out with this plugin. ;) This plugin is using new ways or method to find free locations in the map. |
Re: Fail Spawn Protector v1.0
nice plugin, me too xpaw plugin didn't fix the bug hope this one works from what i undrestand it will teleport the player when he spawns before he die with worldspawn to another location but i don't undrestand why check 128 times for a freespace btw you can look at the code of this https://forums.alliedmods.net/showthread.php?p=441576 to see how it teleport players.
|
Re: Fail Spawn Protector v1.0
Lol, don't do that. Don't remove your old plugin + thread and put another one here. You will just confuse people, please open a new thread and put back the old one here.
|
Re: Fail Spawn Protector v1.0
JustGo, no need to change that values if you are not sure.
Sorry, HamletEagle. I'm not longer supported that old plugin. |
Re: Fail Spawn Protector v1.0
Then ask an approver to unapprove it and make a new thread.
|
Re: Fail Spawn Protector v1.0
I don't think people will be confused as this thread only reached 2 pages. Next, the main post and also the main title of this thread is clearly written what this thread is about.
If they still not clear, they can ask about it. |
Re: Fail Spawn Protector v1.0
What is the difference between yours and https://forums.alliedmods.net/showthread.php?t=114857 ? Also tell me where is your code ? I only see code from xpaw, VEN and Arkshine.
|
Re: Fail Spawn Protector v1.0
Quote:
|
Re: Fail Spawn Protector v1.0
Quote:
|
Re: Fail Spawn Protector v1.0
Awesome plugin, not seen it before.
Just tested right now on special map with 32 spawnpoints at identical origin: http://5.firepic.org/5/images/2015-1...2p08m039hr.png And its works. Works better than Bad Spawns Preventer by xPaw. Current plugin: http://6.firepic.org/6/thumbs/2015-1...zey72q7knj.jpghttp://6.firepic.org/6/thumbs/2015-1...cim5usymqt.jpg Bad Spawns Preventer: http://6.firepic.org/6/thumbs/2015-1...s8m63wqgh3.jpghttp://6.firepic.org/6/thumbs/2015-1...386m9fqjhw.jpg Notice on shadow in center. There is many alive bots at same origin (stucked). PS: Both plugins can't spawn more players than existed spawnpoints inside map (if map have 1 CT and 1 T spawnpoints, then game can spawn only 1 CT and 1 T Players). So, would be nice to "crack" (bypass) this limit (optional cvar). |
Re: Fail Spawn Protector v1.0
Quote:
Quote:
|
Re: Fail Spawn Protector v1.0
Quote:
|
Re: Fail Spawn Protector v1.0
You are right, Phant. Thank you for testing the code.
HamletEagle, my code is the whole code that consist of xPaw, VEN and Arkshine codes. I combine all of their code into one working and better code. |
Re: Fail Spawn Protector v1.0
1.I would like you to be consistent while coding(keep the same naming technique). For example, on some variables you use HN(g_,i,f, etc) and at some you don't(originF).
2.I also don't think g_bHamHookEnabled is really needed, you can simply Enable the hook at SpawnPre and Disable it in SpawnPost. 3.Also try to understand what you are taking from others. In is_player_trap you do: PHP Code:
Apart of that, code looks ok. I'll wait for you to fix at least 2 and 3, then I'll approve it. |
Re: Fail Spawn Protector v1.0
Quote:
Count info_player_start entities in plugin_precache() and if total count < 16, then copy last (or randomly founded) info_player_start entity at same position X times (up to 16). Ofcourse same for info_player_deathmatch. With this all players can play on ANY map without spawnpoints editing :). What do you think? Make it optional (fs_extra_spawns 1/0). |
Re: Fail Spawn Protector v1.1
New Update!
Code:
v1.1 |
Re: Fail Spawn Protector v1.1
Looks ok for me.
Approved. |
Re: Fail Spawn Protector v1.1
Really appreciate it, HamletEagle.
Phant, I find this code. So, what your opinion? https://forums.alliedmods.net/showpo...31&postcount=7 |
Re: Fail Spawn Protector v1.1
Precache is too early for this, try something like that:
Spoiler
I am not sure if this is the best way, I have to check something, but I don't have time right now. Based on his ideea, see what you can do with this. It will create entities until they number is 32, only if the default number is < 16. |
Re: Fail Spawn Protector v1.1
Alright, HamletEagle. Will test it.
|
Re: Fail Spawn Protector v1.1
also some custome maps have like 26T spawn 6 CT spawn it will be greate if we can choose how many max spawn points for each team.
|
Re: Fail Spawn Protector v1.1
I think if you create spawnpoints later than plugin_precache(), then these spawnpoints will NOT work.
You should create spawnpoints inside plugin_precache(), but we need coordinates of exist spawnpoints, plugin_precache() too early for this :). Interesting situation. |
Re: Fail Spawn Protector v1.1
Now, it will become more complicated.
\o/ Will release the beta version soon. |
Re: Fail Spawn Protector v1.1
Quote:
|
Re: Fail Spawn Protector v1.1
Alright.
|
Re: Fail Spawn Protector v1.1
If plugin_precache() is too early, and plugin_init() is too late, try hooking "info_player_deathmatch" and "info_player_start" Spawn, and do stuff in there. That's probably the best moment for doing it.
By the way, great job. |
All times are GMT -4. The time now is 06:19. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.