Raised This Month: $ Target: $400
 0% 

problem with cs_set_user_team


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
D1ma
Junior Member
Join Date: Jun 2010
Old 07-17-2010 , 16:26   problem with cs_set_user_team
Reply With Quote #1

that is the code:
Code:
public ct_move(id)
{
    new name[32];
    cs_set_user_team(id,CS_TEAM_CT);
    get_user_name(id, name, 31);
    server_cmd("amx_revive %s ct",name);
    log_amx("ct_move(%d)",id);
    return PLUGIN_CONTINUE;
    
}
and that is the errors:
Code:
L 07/17/2010 - 23:17:49: [CSTRIKE] Invalid player 5
L 07/17/2010 - 23:17:49: [AMXX] Displaying debug trace (plugin "ct_move.amxx")
L 07/17/2010 - 23:17:49: [AMXX] Run time error 10: native error (native "cs_set_user_team")
L 07/17/2010 - 23:17:49: [AMXX]    [0] ct_move.sma::ct_move (line 18)
what is the problem here?
thanks.
D1ma is offline
ot_207
Veteran Member
Join Date: Jan 2008
Location: Romania The Love Country
Old 07-17-2010 , 16:27   Re: problem with cs_set_user_team
Reply With Quote #2

check if user is connected
__________________
My approved plug-ins | Good for newbies! | Problems?

Back, will come around when I have time.
ot_207 is offline
DarkGod
SourceMod DarkCrab
Join Date: Jul 2007
Location: Sweden
Old 07-17-2010 , 16:33   Re: problem with cs_set_user_team
Reply With Quote #3

May also want to make it

Code:
server_cmd("amx_revive ^"%s^" ct",name)
__________________
DarkGod is offline
Send a message via AIM to DarkGod Send a message via MSN to DarkGod
wrecked_
Veteran Member
Join Date: Jan 2010
Location: New York (GMT-5)
Old 07-17-2010 , 16:34   Re: problem with cs_set_user_team
Reply With Quote #4

Use one of these to revive players:

Code:
//fakemeta set_pev( id, pev_deadflag, DEAD_RESPAWNABLE ) //hamsandwich ExecuteHamB( Ham_CS_RoundRespawn, id )
__________________
[ Paid Requests ]
DO NOT PM ME ABOUT BLOCKMAKER
NO PRIVATE SUPPORT
wrecked_ is offline
D1ma
Junior Member
Join Date: Jun 2010
Old 07-17-2010 , 16:35   Re: problem with cs_set_user_team
Reply With Quote #5

Quote:
Originally Posted by ot_207 View Post
check if user is connected
the public calls 1 second after the player connected
Quote:
Originally Posted by DarkGod View Post
May also want to make it

Code:
server_cmd("amx_revive ^"%s^" ct",name)
amx_revive reviving you as spectator
D1ma is offline
wrecked_
Veteran Member
Join Date: Jan 2010
Location: New York (GMT-5)
Old 07-17-2010 , 16:36   Re: problem with cs_set_user_team
Reply With Quote #6

Quote:
Originally Posted by D1ma View Post
the public calls 1 second after the player connected
That doesn't matter. Check it anyway.
__________________
[ Paid Requests ]
DO NOT PM ME ABOUT BLOCKMAKER
NO PRIVATE SUPPORT
wrecked_ is offline
D1ma
Junior Member
Join Date: Jun 2010
Old 07-17-2010 , 16:42   Re: problem with cs_set_user_team
Reply With Quote #7

Quote:
Originally Posted by wrecked_ View Post
Use one of these to revive players:

Code:
//fakemeta set_pev( id, pev_deadflag, DEAD_RESPAWNABLE ) //hamsandwich ExecuteHamB( Ham_CS_RoundRespawn, id )
Error: Undefined symbol "ExecuteHamB"

Quote:
Originally Posted by wrecked_ View Post
That doesn't matter. Check it anyway.
thats not the problem now
D1ma is offline
wrecked_
Veteran Member
Join Date: Jan 2010
Location: New York (GMT-5)
Old 07-17-2010 , 16:50   Re: problem with cs_set_user_team
Reply With Quote #8

Quote:
Originally Posted by D1ma View Post
Error: Undefined symbol "ExecuteHamB"
#include <hamsandwich>

at the top of your plugin.
__________________
[ Paid Requests ]
DO NOT PM ME ABOUT BLOCKMAKER
NO PRIVATE SUPPORT
wrecked_ 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 07:13.


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