Raised This Month: $ Target: $400
 0% 

Solved Overflow because of a respawn plugin


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
^SmileY
Veteran Member
Join Date: Jan 2010
Location: Brazil [<o>]
Old 07-11-2018 , 10:14   Re: Overflow because of a respawn plugin
Reply With Quote #1

Code:
#include <amxmodx>
#include <cstrike>
#include <fakemeta>
#include <hamsandwich>

public plugin_init()
{
	register_plugin("Respawn Test","0.1","SmileY");
	
	register_clcmd("say respawn","HamKilled");
	
	RegisterHam(Ham_Killed,"player","HamKilled",true,true);
	RegisterHam(Ham_AddPlayerItem,"player","HamAddPlayerItem",true,true);
}

public HamKilled(id)
{
	if(cs_get_user_team(id) == CS_TEAM_T)
	{
		set_task(0.75,"Respawn",id);
	}
}

public Respawn(id)
{
	if(is_user_connected(id))
	{
		if(!is_user_alive(id))
		{
			ExecuteHamB(Ham_CS_RoundRespawn,id);
		}
	}
}

public HamAddPlayerItem(id,Ent)
{
	if(cs_get_user_team(id) == CS_TEAM_T)
	{
		if(cs_get_weapon_id(Ent) != CSW_KNIFE)
		{
			set_pev(Ent,pev_flags,FL_KILLME);
			SetHamReturnInteger(0);
			
			return HAM_SUPERCEDE;
		}
	}
	
	return HAM_IGNORED;
}
Code for AMXX 1.8.3, but i still have sure that is caused by mixed plugin between amxx versions.
Did you use same compiler that amxx you have installed in server?
__________________
Projects:

- See my Git Hub: https://github.com/SmileYzn
PHP Code:
set_pcvar_num(pCvar, !get_pcvar_num(pCvar)); 

Last edited by ^SmileY; 07-11-2018 at 10:30.
^SmileY is offline
Send a message via MSN to ^SmileY Send a message via Skype™ to ^SmileY
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 12:22.


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