Raised This Month: $ Target: $400
 0% 

No worldspawn


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
TehCaesar
BANNED
Join Date: Jun 2006
Old 12-31-2006 , 20:35   No worldspawn
Reply With Quote #1

Is it possible with a plugin to remove the problem with players dieing at the start of the round because of not enough respawn points?

If not I would appreciate it if you could do a plugin that respawns a player if they die within 5 seconds of a round.

Thanks in advance.
TehCaesar is offline
Silencer123
Veteran Member
Join Date: Jul 2006
Old 12-31-2006 , 20:44   Re: No worldspawn
Reply With Quote #2

If you have a question on something that could be solved with a function,
then the first you should do is to search in the AMXModX FuncWiki. Only
if you really find nothing you may ask here. That would help you to prevent
that much negative Karma and in this case it would result in this:
http://www.amxmodx.org/funcwiki.php?go=func&id=837
If you now say that it will not work then that is probably because you did
not say for what modification you want to write your plugin. But as you make
a really mindless impression on me I guess that it shall be for Counter-Strike.
However, keep this in mind: http://www.amxmodx.org/funcwiki.php
So if you now want to know how to make that delay of 5 seconds, think
of what could that be called in the english language. It is possible that you
have to try some words and read through some stuff before you reach the
function which you need, but after some tries you enter "task":
http://www.amxmodx.org/funcwiki.php?...task&go=search
And you read: "set_task". Now that sounds really encouraging, doesn't it?
And then you click it and read an wooooooooooooooooooosh:
http://www.amxmodx.org/funcwiki.php?go=func&id=253
It is what you want, isn't it? And after some more research you arrive at this point:
Code:
#include <amxmodx> #include <cstrike> public plugin_init() {     register_plugin("Revive","1.0","TheGreatAuthor")     register_event("DeathMsg", "hook_death", "a") } public hook_death() {     new Dead_Guys_ID=read_data(2)     set_task(5.0,"revive_him",Dead_Guys_ID) } public revive_him(Dead_Guys_ID) {     cs_user_spawn(Dead_Guys_ID) }
So simple, isn't it?
__________________
EAT YOUR VEGGIES

Last edited by Silencer123; 12-31-2006 at 21:01.
Silencer123 is offline
stupok
Veteran Member
Join Date: Feb 2006
Old 12-31-2006 , 21:17   Re: No worldspawn
Reply With Quote #3

But it's wrong. That will revive the user 5.0 seconds after dying.

Code:
#include <amxmodx> #include <amxmisc> #include <cstrike> #define PLUGIN "Revive if Killed in 5 Seconds" #define VERSION "1.0" #define AUTHOR "stupok69" public plugin_init() {     register_plugin(PLUGIN, VERSION, AUTHOR)     register_logevent("logevent_round_start", 2, "1=Round_Start") } public logevent_round_start() {     set_task(5.0, "revive_function") } public revive_function() {     new players[32], num         get_players(players, num, "bh")         for(new i = 0; i < num; i++)         cs_user_spawn(i) }

Last edited by stupok; 12-31-2006 at 21:23.
stupok is offline
SweatyBanana
BANNED
Join Date: Sep 2005
Location: LOL
Old 12-31-2006 , 21:25   Re: No worldspawn
Reply With Quote #4

Quote:
Originally Posted by stupok69 View Post
But it's wrong. That will revive the user 5.0 seconds after dying.
That still wont work.. You can use a bool and set it to false five seconds after round start, then check when a player dies if the bool is true or not, then revive (or not).

Last edited by SweatyBanana; 12-31-2006 at 21:30.
SweatyBanana is offline
Send a message via AIM to SweatyBanana Send a message via Yahoo to SweatyBanana
stupok
Veteran Member
Join Date: Feb 2006
Old 12-31-2006 , 21:28   Re: No worldspawn
Reply With Quote #5

The quoted code you posted is all jarbled up on my screen. Anyways, why wouldn't it work? Be specific. I don't see the need for any booleans.
stupok is offline
SweatyBanana
BANNED
Join Date: Sep 2005
Location: LOL
Old 12-31-2006 , 21:31   Re: No worldspawn
Reply With Quote #6

You didnt even call a client_death function...
SweatyBanana is offline
Send a message via AIM to SweatyBanana Send a message via Yahoo to SweatyBanana
Imanoobie
BANNED
Join Date: Sep 2006
Old 01-01-2007 , 07:51   Re: No worldspawn
Reply With Quote #7

Quote:
Originally Posted by stupok69 View Post
But it's wrong. That will revive the user 5.0 seconds after dying.

Code:
#include <amxmodx> #include <amxmisc> #include <cstrike> #define PLUGIN "Revive if Killed in 5 Seconds" #define VERSION "1.0" #define AUTHOR "stupok69" public plugin_init() {     register_plugin(PLUGIN, VERSION, AUTHOR)     register_logevent("logevent_round_start", 2, "1=Round_Start") } public logevent_round_start() {     set_task(5.0, "revive_function") } public revive_function() {     new players[32], num         get_players(players, num, "bh")         for(new i = 0; i < num; i++)         cs_user_spawn(i) }
This sure works but...what if the player TKed the round before?
Then he will get no punishment o_O
Imanoobie is offline
stupok
Veteran Member
Join Date: Feb 2006
Old 01-01-2007 , 15:12   Re: No worldspawn
Reply With Quote #8

What if TehCaesar didn't say anything about tk punishment?
stupok is offline
TehCaesar
BANNED
Join Date: Jun 2006
Old 12-31-2006 , 21:22   Re: No worldspawn
Reply With Quote #9

Quote:
Originally Posted by Silencer123 View Post
If you have a question on something that could be solved with a function,
then the first you should do is to search in the AMXModX FuncWiki. Only
if you really find nothing you may ask here. That would help you to prevent
that much negative Karma and in this case it would result in this:
The reason I have such negative karma is because I ask for it. Why would I care about Karma?

And I can't code worth shit so searching the functions on how to set a time for the respawn wouldn't work because I don't know how to apply it.
TehCaesar 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 22:28.


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