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

Bug Plugin Respawn


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
raizo11
BANNED
Join Date: Dec 2013
Location: https://t.me/pump_upp
Old 03-20-2015 , 06:21   Bug Plugin Respawn
Reply With Quote #1

Can fIxed?

Code:
L 03/19/2015 - 10:51:07: [AMXX] Displaying debug trace (plugin "amx_respawn.amxx", version "0.9.4")
L 03/19/2015 - 10:51:07: [AMXX] Run time error 10: native error (native "spawn")
L 03/19/2015 - 10:51:07: [AMXX]    [0] 784.attach::respawn (line 46)
Code:
#include <amxmodx>
#include <fun>

public TeamSelect(id)
{
	if (get_cvar_num("amx_respawn") == 1)   {
		new sId[2]
		sId[0] = id
		set_task(10.0,"respawn",0,sId,2)
	}
	return PLUGIN_CONTINUE
}

public death_msg() 
{    
	if (get_cvar_num("amx_respawn") == 1)   { 
		new vIndex = read_data(2) 
		new svIndex[2]
		svIndex[0] = vIndex
		set_task(0.5,"respawn",0,svIndex,2) 
	} 
	return PLUGIN_CONTINUE 
} 

public respawn(svIndex[]) 
{ 
	new vIndex = svIndex[0] 
	if(get_user_team(vIndex) == 3 || is_user_alive(vIndex)) 
		return PLUGIN_CONTINUE 
	spawn(vIndex) 
	
	return PLUGIN_CONTINUE    
} 

public plugin_init() 
{ 
   	register_plugin("amx_respawn","0.9.4","f117bomb") 
	register_event("DeathMsg","death_msg","a") 
	register_event("ShowMenu","TeamSelect","b","4&Team_Select")
	register_event("VGUIMenu","TeamSelect","b","1=2")
	register_cvar("amx_respawn","0") 
	
	return PLUGIN_CONTINUE 
}
raizo11 is offline
Send a message via ICQ to raizo11 Send a message via AIM to raizo11 Send a message via MSN to raizo11 Send a message via Yahoo to raizo11 Send a message via Skype™ to raizo11
Obada
Senior Member
Join Date: Dec 2014
Location: Abu Dhabi
Old 03-20-2015 , 07:44   Re: Bug Plugin Respawn
Reply With Quote #2

Try this.

PHP Code:
#include <amxmodx>
#include <fun>

public TeamSelect(id)
{
    if (
get_cvar_num("amx_respawn") == 1)   {
        new 
sId[2]
        
sId[0] = id
        set_task
(10.0,"respawn",0,sId,2)
    }
    return 
PLUGIN_CONTINUE
}

public 
death_msg() 
{    
    if (
get_cvar_num("amx_respawn") == 1)   { 
        new 
vIndex read_data(2
        new 
svIndex[2]
        
svIndex[0] = vIndex
        set_task
(0.5,"respawn",0,svIndex,2
    } 
    return 
PLUGIN_CONTINUE 


public 
respawn(svIndex[]) 

    new 
vIndex svIndex[0
    if(
get_user_team(vIndex) == || is_user_alive(vIndex) || !is_user_connected(vIndex))
        return 
PLUGIN_CONTINUE 
    spawn
(vIndex
    
    return 
PLUGIN_CONTINUE    


public 
plugin_init() 

       
register_plugin("amx_respawn","0.9.4","f117bomb"
    
register_event("DeathMsg","death_msg","a"
    
register_event("ShowMenu","TeamSelect","b","4&Team_Select")
    
register_event("VGUIMenu","TeamSelect","b","1=2")
    
register_cvar("amx_respawn","0"
    
    return 
PLUGIN_CONTINUE 


Last edited by Obada; 03-20-2015 at 08:14.
Obada is offline
raizo11
BANNED
Join Date: Dec 2013
Location: https://t.me/pump_upp
Old 03-20-2015 , 07:54   Re: Bug Plugin Respawn
Reply With Quote #3

Not respawned now
raizo11 is offline
Send a message via ICQ to raizo11 Send a message via AIM to raizo11 Send a message via MSN to raizo11 Send a message via Yahoo to raizo11 Send a message via Skype™ to raizo11
Obada
Senior Member
Join Date: Dec 2014
Location: Abu Dhabi
Old 03-20-2015 , 08:14   Re: Bug Plugin Respawn
Reply With Quote #4

Oh my bad.

Try now.
Obada is offline
raizo11
BANNED
Join Date: Dec 2013
Location: https://t.me/pump_upp
Old 03-20-2015 , 08:25   Re: Bug Plugin Respawn
Reply With Quote #5

work now thanks man
raizo11 is offline
Send a message via ICQ to raizo11 Send a message via AIM to raizo11 Send a message via MSN to raizo11 Send a message via Yahoo to raizo11 Send a message via Skype™ to raizo11
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 10:20.


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