Raised This Month: $ Target: $400
 0% 

[TS]Instant Respawn


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   The Specialists        Category:   Fun Stuff       
silentt
Member
Join Date: Feb 2006
Location: Toronto, Ontario, Canada
Old 01-23-2011 , 15:27   [TS]Instant Respawn
Reply With Quote #1

Introduction
This mod was an idea I had when I decided to run a DM server for a short while. A standard lobby server, but basically remembering back to around one Christmas time, probably at least 2 years ago. I played on Battle Royale a lot and so this idea was taken almost straight from there, bascially it gets rid of players having to wait after dieing so they can just instantly respawn. It makes dming a lot more fun I think and speeds up the pace a bit. So I take no credit for the idea only the scripting part because I made it from scratch. I decided to release it for a few reasons, to give credit to the person I got the idea from and because there is no public version of this.

Description
Simply put RIGHT after you die by clicking you can respawn again, basically eliminating the wait time for the menu. What makes this slightly different from any other respawn mod is its more specifically designed for ts, where it doesnt work by anything cs related. It also gets rid of the respawn countdown. Also it doesn't respawn automatically it respawns by a click once someone dies, perfect for kung fu but also allows players to access the menu before they come in.

Cvars
No cvars drop it in and your good to go

Commands
No admin commands, again there is none and would be none it just respawns players at in instant to skip the respawn wait time

Changelog
1.0 - Original basic version of it

To Do
Nothing in mind yet.
Attached Files
File Type: sma Get Plugin or Get Source (InstantRespawn.sma - 305 views - 1.7 KB)

Last edited by silentt; 01-23-2011 at 17:24. Reason: Some formatting
silentt is offline
.MMYTH.
BANNED
Join Date: Sep 2010
Location: Brasil - RS
Old 01-23-2011 , 15:39   Re: Instant Respawn
Reply With Quote #2

Do you test it ?
This message 'TSMessage' exists ?

PHP Code:
new bool:pCanSpawn[33]=false
//-->
new szSpawn[33]

if(!
task_exists(id))
set_task(0.7"CanSpawn"id)
/* WTF? */ 

Last edited by .MMYTH.; 01-23-2011 at 15:43.
.MMYTH. is offline
Send a message via MSN to .MMYTH.
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 01-23-2011 , 15:50   Re: Instant Respawn
Reply With Quote #3

To Do
Nothing in mind yet.
This plugin needs to be optimized, code inside message hook is redundant, msg index is not cached, and spawn native in not for players.
Also string array could be lowered to 3, also don't use static there.
Tasks are not appropriated for cooldown, use gametime for float or systime for full seconds.

Suggestion : Put the tag TS in front of your thread title.
__________________
- tired and retired -

- my plugins -

Last edited by ConnorMcLeod; 01-23-2011 at 15:56.
ConnorMcLeod is offline
silentt
Member
Join Date: Feb 2006
Location: Toronto, Ontario, Canada
Old 01-23-2011 , 15:51   Re: Instant Respawn
Reply With Quote #4

yep I tested it, I actually tested it recently in an rp server, so the menu part of it didnt really help much but the respawn itself works.

I dont know where you got szSpawn from because its not in there however can spawn controls if they can spawn or not, I made it a while ago but I think the problem was theyd spawn like 4 times over before they actually become alive, because the post think happens so frequently, so I had to put something to stop them and only let them spawn once.

But yes I don't release anything untested, usually not even sloppy and usually commented but I stopped caring about commenting and fixing up code so much before I drop it on as most people don't pay much attention to the code.
silentt is offline
silentt
Member
Join Date: Feb 2006
Location: Toronto, Ontario, Canada
Old 01-23-2011 , 15:55   Re: Instant Respawn
Reply With Quote #5

What would be the less redundant way of hooking a game message?
I dont know what you mean by message index isnt cached
the spawn native works fine for players, but what would be the other way the more optimized way I guess of spawning a player, keeping in mind this is for the specialists
String array ill lower

This is a small script though that doesnt set off any repeating timers or anything big that would eat up memory I felt no need to optimize... my apologies
silentt is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 01-23-2011 , 15:58   Re: Instant Respawn
Reply With Quote #6

See optimize plugin section on AM wiki.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 01-23-2011 , 16:03   Re: Instant Respawn
Reply With Quote #7

http://wiki.amxmodx.org/Optimizing_P...d_X_Scripting)
__________________
Arkshine is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 01-23-2011 , 16:04   Re: Instant Respawn
Reply With Quote #8

You should always optimize before you release a plugin.

I don't understand why you would want to use post think for this. Can't you just hook when the player dies?
__________________
fysiks is offline
silentt
Member
Join Date: Feb 2006
Location: Toronto, Ontario, Canada
Old 01-23-2011 , 16:15   Re: [TS]Instant Respawn
Reply With Quote #9

Didnt realize we had to tag what mod it was for, ive only really released one plugin and that one i spent the time to clean up before posting. I released this one for the sake of putting it out for people.

I don't see how the optimize section is going to help im taking conners optimizing advice and I still dont see why the message hook is redundant, I dont usually hook messages but from what I remember it was the only way to hook messages.

Post think is my way of doing it because its ts, there is already a built in respawn. So when you die each time there is a COUNTDOWN(thats why i hooked the message to get rid of it) and there is a menu to choose guns. Thats why in the description I said its different because its designed for ts, thats why its not automatic it runs when the player clicks. Its more for the short period of seconds before the respawn timer. I could hook it to player deaths but then it makes it automatic defeating the whole purpose which was to leave the menu. If it was automatic there is no reason for posting it.

Hopefully that clearified things and hopefully somoene can clarify for me what they mean I need to fix other than a few lines.
silentt is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 01-23-2011 , 16:24   Re: [TS]Instant Respawn
Reply With Quote #10

You don't have to tag title, that was just a suggestion, not every member do look at modification.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 04:02.


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