Raised This Month: $51 Target: $400
 12% 

REQ plugin respawn


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
boyca
BANNED
Join Date: Nov 2011
Old 12-04-2011 , 08:12   REQ plugin respawn
Reply With Quote #1

Hello,
I wish if you can edit this plugin "amx_respawn", so as to give respawn than the first 30 seconds of the round.
If possible,
Thanks

Last edited by boyca; 12-04-2011 at 08:12.
boyca is offline
MyPc
Senior Member
Join Date: Sep 2011
Old 12-04-2011 , 08:58   Re: REQ plugin respawn
Reply With Quote #2

Quote:
Originally Posted by boyca View Post
Hello,
I wish if you can edit this plugin "amx_respawn", so as to give respawn than the first 30 seconds of the round.
If possible,
Thanks
Only admins ?
MyPc is offline
boyca
BANNED
Join Date: Nov 2011
Old 12-04-2011 , 11:44   Re: REQ plugin respawn
Reply With Quote #3

For everyone!
boyca is offline
quark
Veteran Member
Join Date: Oct 2011
Location: Your mind.
Old 12-04-2011 , 19:08   Re: REQ plugin respawn
Reply With Quote #4

http://forums.alliedmods.net/showthread.php?p=8906, not amx_respawn but /respawn.
If dont want i edit later.
__________________

Check out My Plugins:
qServerInfo ; ASKTAG

Last edited by quark; 12-04-2011 at 19:08. Reason: bad link
quark is offline
boyca
BANNED
Join Date: Nov 2011
Old 12-05-2011 , 04:50   Re: REQ plugin respawn
Reply With Quote #5

Quote:
Originally Posted by quark View Post
http://forums.alliedmods.net/showthread.php?p=8906, not amx_respawn but /respawn.
If dont want i edit later.
I want to give them respawn only for the first 30 seconds of the round, not all round! If you can edit!
Thanks.

[EDIT]
By the way, my server is on linux! If this is help..

Last edited by boyca; 12-05-2011 at 05:12.
boyca is offline
Erox902
Veteran Member
Join Date: Jun 2009
Location: Never Never Land
Old 12-05-2011 , 06:42   Re: REQ plugin respawn
Reply With Quote #6

Try this out
PHP Code:
/*Say /respawn to respawn
Cvar for how long they can respawn
Cvar for how many times they can respawn.*/

#include <amxmodx>
#include <amxmisc>
#include <engine>
#include <hamsandwich>

new gcvar_Time
new gcvar_Respawns
new gRespawns[33]

new 
Float:gRoundStartTime
new bool:gbRespawnAble

public plugin_init()
{
    
register_plugin"Respawn""1.0""Rtk.Esc" )
    
register_logevent"round_start"2"1=Round_Start")
    
register_logevent"round_end"2"1=Round_End" )
    
register_clcmd"say /respawn""respawn" )
    
gcvar_Time register_cvar"rs_time""30.0" )
    
gcvar_Respawns register_cvar"rs_respawns""1" )
}

public 
round_start()
{
    
gRoundStartTime halflife_time();
    
gbRespawnAble true;
}
    
public 
round_end()
{
    
arraysetgRespawns033 )
    
gbRespawnAble false;
}

public 
respawn(id)
{
    new 
Float:Time halflife_time()
    
    if ( 
is_user_alive(id) || !gbRespawnAble || Time gRoundStartTime get_pcvar_floatgcvar_Time ) || gRespawns[id]++ > get_pcvar_numgcvar_Respawns ) )
        return 
PLUGIN_CONTINUE

Last edited by Erox902; 12-05-2011 at 06:43.
Erox902 is offline
boyca
BANNED
Join Date: Nov 2011
Old 12-05-2011 , 07:11   Re: REQ plugin respawn
Reply With Quote #7

Quote:
Originally Posted by Erox902 View Post
Try this out
PHP Code:
/*Say /respawn to respawn
Cvar for how long they can respawn
Cvar for how many times they can respawn.*/

#include <amxmodx>
#include <amxmisc>
#include <engine>
#include <hamsandwich>

new gcvar_Time
new gcvar_Respawns
new gRespawns[33]

new 
Float:gRoundStartTime
new bool:gbRespawnAble

public plugin_init()
{
    
register_plugin"Respawn""1.0""Rtk.Esc" )
    
register_logevent"round_start"2"1=Round_Start")
    
register_logevent"round_end"2"1=Round_End" )
    
register_clcmd"say /respawn""respawn" )
    
gcvar_Time register_cvar"rs_time""30.0" )
    
gcvar_Respawns register_cvar"rs_respawns""1" )
}

public 
round_start()
{
    
gRoundStartTime halflife_time();
    
gbRespawnAble true;
}
    
public 
round_end()
{
    
arraysetgRespawns033 )
    
gbRespawnAble false;
}

public 
respawn(id)
{
    new 
Float:Time halflife_time()
    
    if ( 
is_user_alive(id) || !gbRespawnAble || Time gRoundStartTime get_pcvar_floatgcvar_Time ) || gRespawns[id]++ > get_pcvar_numgcvar_Respawns ) )
        return 
PLUGIN_CONTINUE
I try to compile and shows me the error:
Quote:
tmp/textVUrUGD.sma(44) : error 001: expected token: "}", but found "-end of file-" 1 Error. Could not locate output file /home/groups/amxmodx/public_html/websc3/textVUrUGD.amx (compile failed).
boyca is offline
Erox902
Veteran Member
Join Date: Jun 2009
Location: Never Never Land
Old 12-05-2011 , 07:45   Re: REQ plugin respawn
Reply With Quote #8

Oops sorry didn't copy all of the script
change public respawn to this:
PHP Code:
public respawn(id)
{
    new 
Float:Time halflife_time()
    
    if ( 
is_user_alive(id) || !gbRespawnAble || Time gRoundStartTime get_pcvar_floatgcvar_Time ) || gRespawns[id] >= get_pcvar_numgcvar_Respawns ) )
        return 
PLUGIN_CONTINUE;
    
    else
    {
        
ExecuteHamBHam_CS_RoundRespawnid )
        
gRespawns[id]++
    }

Erox902 is offline
boyca
BANNED
Join Date: Nov 2011
Old 12-05-2011 , 08:00   Re: REQ plugin respawn
Reply With Quote #9

Now it compiles but still gives me an error
Quote:
/tmp/textDYddoh.sma(51) : warning 209: function "respawn" should return a value
Can you compile the plugin?
boyca is offline
Erox902
Veteran Member
Join Date: Jun 2009
Location: Never Never Land
Old 12-05-2011 , 08:06   Re: REQ plugin respawn
Reply With Quote #10

Quote:
Originally Posted by boyca View Post
Now it compiles but still gives me an error

Can you compile the plugin?
It does compile, you don't actually have to return any value.
Erox902 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:36.


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