AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   problem with cs_set_user_team (https://forums.alliedmods.net/showthread.php?t=132676)

D1ma 07-17-2010 16:26

problem with cs_set_user_team
 
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.

ot_207 07-17-2010 16:27

Re: problem with cs_set_user_team
 
check if user is connected

DarkGod 07-17-2010 16:33

Re: problem with cs_set_user_team
 
May also want to make it

Code:
server_cmd("amx_revive ^"%s^" ct",name)

wrecked_ 07-17-2010 16:34

Re: problem with cs_set_user_team
 
Use one of these to revive players:

Code:
//fakemeta set_pev( id, pev_deadflag, DEAD_RESPAWNABLE ) //hamsandwich ExecuteHamB( Ham_CS_RoundRespawn, id )

D1ma 07-17-2010 16:35

Re: problem with cs_set_user_team
 
Quote:

Originally Posted by ot_207 (Post 1242673)
check if user is connected

the public calls 1 second after the player connected
Quote:

Originally Posted by DarkGod (Post 1242678)
May also want to make it

Code:
server_cmd("amx_revive ^"%s^" ct",name)

amx_revive reviving you as spectator

wrecked_ 07-17-2010 16:36

Re: problem with cs_set_user_team
 
Quote:

Originally Posted by D1ma (Post 1242682)
the public calls 1 second after the player connected

That doesn't matter. Check it anyway.

D1ma 07-17-2010 16:42

Re: problem with cs_set_user_team
 
Quote:

Originally Posted by wrecked_ (Post 1242681)
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_ (Post 1242683)
That doesn't matter. Check it anyway.

thats not the problem now

wrecked_ 07-17-2010 16:50

Re: problem with cs_set_user_team
 
Quote:

Originally Posted by D1ma (Post 1242687)
Error: Undefined symbol "ExecuteHamB"

#include <hamsandwich>

at the top of your plugin.


All times are GMT -4. The time now is 07:13.

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