Raised This Month: $ Target: $400
 0% 

HAM spawn after death?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
alonelive
Senior Member
Join Date: Jan 2011
Location: Big snow country.. :)
Old 01-18-2013 , 05:02   HAM spawn after death?
Reply With Quote #1

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

#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "author"

public plugin_init ()
{
    
register_plugin(PLUGINVERSIONAUTHOR)

    
RegisterHam Ham_Killed"player""fwd_Ham_Killed_post" )
    
//RegisterHam ( Ham_Spawn, "player", "fwHamPlayerSpawnPost", 1 )
}


public 
fwd_Ham_Killed_postid )
{
    
set_task2.0"spawn" );
}

public 
spawn id 
{
    if (!
is_user_alive id ) && ( CS_TEAM_T <= cs_get_user_teamid ) <= CS_TEAM_CT ) )
    {
    
ExecuteHamB Ham_CS_RoundRespawn id )
    }

Hello all
code modified.

L 01/18/2013 - 15:55:49: [CSTRIKE] Player out of range (0)
L 01/18/2013 - 15:55:49: [AMXX] Displaying debug trace (plugin "wmp.amxx")
L 01/18/2013 - 15:55:49: [AMXX] Run time error 10: native error (native "cs_get_user_team")
L 01/18/2013 - 15:55:49: [AMXX] [0] wmp.sma::spawn (line 54)


What's wrong ?
__________________
sorry my bad english...

Last edited by alonelive; 01-18-2013 at 07:00.
alonelive is offline
AngeIII
Senior Member
Join Date: Sep 2007
Location: Latvia
Old 01-18-2013 , 07:09   Re: HAM spawn after death?
Reply With Quote #2

set_task( 2.0, "spawn" );
to:
set_task( 2.0, "spawn",id );
__________________
skype: pavle_ivanof
-=ThQ=-
PRIVATE SUPPORT = PAID SUPPORT
AngeIII is offline
Send a message via Skype™ to AngeIII
bibu
Veteran Member
Join Date: Sep 2010
Old 01-18-2013 , 14:30   Re: HAM spawn after death?
Reply With Quote #3

And check also if user is connected.
__________________
Selling tons of my own private works.
Accepting paid work for clans and communities.
Don't hesitate to contact me.
bibu is offline
Xalus
Veteran Member
Join Date: Dec 2009
Location: Belgium
Old 01-18-2013 , 14:30   Re: HAM spawn after death?
Reply With Quote #4

PHP Code:
CS_TEAM_T <= cs_get_user_teamid ) <= CS_TEAM_CT 
->
PHP Code:
CS_TEAM_T >= cs_get_user_teamid ) <= CS_TEAM_CT 
__________________
Retired.
Xalus is offline
Old 01-18-2013, 14:41
guipatinador
This message has been deleted by guipatinador.
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 01-18-2013 , 15:42   Re: HAM spawn after death?
Reply With Quote #5

Quote:
Originally Posted by Xalus View Post
PHP Code:
CS_TEAM_T <= cs_get_user_teamid ) <= CS_TEAM_CT 
->
PHP Code:
CS_TEAM_T >= cs_get_user_teamid ) <= CS_TEAM_CT 
no no no


AngeIII found the problem already
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 01-18-2013 , 20:07   Re: HAM spawn after death?
Reply With Quote #6

Quote:
Originally Posted by bibu View Post
And check also if user is connected.
is_user_alive does this already, no need to check it again.
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
guipatinador
SourceMod Donner Party
Join Date: Oct 2009
Location: Poortugal
Old 01-18-2013 , 20:39   Re: HAM spawn after death?
Reply With Quote #7

Quote:
Originally Posted by YamiKaitou View Post
is_user_alive does this already, no need to check it again.
PHP Code:
if (!is_user_alive... 
is_user_connected is not necessary when is_user_alive is used, but, in this case, he is checking if the player is dead, so is better to check if the player is connected, because is_user_alive returns false when the player is dead / disconnected.

Last edited by guipatinador; 01-18-2013 at 20:46.
guipatinador is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 01-18-2013 , 20:43   Re: HAM spawn after death?
Reply With Quote #8

Quote:
Originally Posted by guipatinador View Post
He is checking if the player is dead.
Opps, missed that part, thanks
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
alonelive
Senior Member
Join Date: Jan 2011
Location: Big snow country.. :)
Old 01-19-2013 , 07:53   Re: HAM spawn after death?
Reply With Quote #9

Thank you all!
Be happy!
__________________
sorry my bad english...
alonelive is offline
Reply


Thread Tools
Display Modes

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 13:45.


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