Raised This Month: $ Target: $400
 0% 

REQ plugin respawn


Post New Thread Reply   
 
Thread Tools Display Modes
Korxu
Senior Member
Join Date: Sep 2010
Old 12-05-2011 , 08:08   Re: REQ plugin respawn
Reply With Quote #11

Add

PHP Code:
return PLUGIN_HANDLED 
before the last bracket, and compile again.
Korxu is offline
boyca
BANNED
Join Date: Nov 2011
Old 12-05-2011 , 08:36   Re: REQ plugin respawn
Reply With Quote #12

ok but I want to give them automatically respawn for the first 30 seconds of the round, do not need to write /respawn .
thank you very much for your help
boyca is offline
Erox902
Veteran Member
Join Date: Jun 2009
Location: Never Never Land
Old 12-05-2011 , 10:25   Re: REQ plugin respawn
Reply With Quote #13

Try this, I'm not sure been getting tag missmatches but I can't figure out why
PHP Code:
#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_event"DeathMsg""event_death""a" )
    
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 
event_death()
{
    new 
iVictim read_data(2)
    new 
float:Time halflife_time()
    
    if ( !
gbRespawnAble || Time gRoundStartTime get_pcvar_floatgcvar_Time ) || gRespawns[iVictim] <= get_pcvar_numgcvar_Respawns ) )
        return 
PLUGIN_CONTINUE;
        
    else
        
set_task1.0"respawn"iVictim )
    
    return 
PLUGIN_CONTINUE;
}

public 
respawn(id)
{
    
ExecuteHamBHam_CS_RoundRespawnid )
    
gRespawns[id]++

Erox902 is offline
boyca
BANNED
Join Date: Nov 2011
Old 12-05-2011 , 10:28   Re: REQ plugin respawn
Reply With Quote #14

Quote:
/tmp/textfv3M3F.sma(41) : warning 213: tag mismatch
/tmp/textfv3M3F.sma(41) : warning 213: tag mismatch
/tmp/textfv3M3F.sma(41) : warning 213: tag mismatch
Can you fix it ?
Thanks

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

Quote:
Originally Posted by Erox902 View Post
Try this, I'm not sure been getting tag missmatches but I can't figure out why
Can't find anything to solve those warnings So sorry no.
Try it out a plugin can still work if there are warnings.
Erox902 is offline
drekes
Veteran Member
Join Date: Jul 2009
Location: Vault 11
Old 12-05-2011 , 13:35   Re: REQ plugin respawn
Reply With Quote #16

PHP Code:
new float:Time halflife_time() 
=>
PHP Code:
new Float:Time halflife_time() 
__________________

Quote:
Originally Posted by nikhilgupta345 View Post
You're retarded.
drekes is offline
Send a message via MSN to drekes
boyca
BANNED
Join Date: Nov 2011
Old 12-05-2011 , 23:42   Re: REQ plugin respawn
Reply With Quote #17

Quote:
Originally Posted by Erox902 View Post
Can't find anything to solve those warnings So sorry no.
Try it out a plugin can still work if there are warnings.
Works very well, i try it,
thanks.
boyca 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 20:29.


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