Raised This Month: $ Target: $400
 0% 

Unknown command: jointeam [HLDM]


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
BFK_GoNER
Junior Member
Join Date: Feb 2009
Location: Holland
Old 02-12-2009 , 01:14   Unknown command: jointeam [HLDM]
Reply With Quote #1

Hey everybody,

I am trying to strip the players of all weapons whenever they pick up one. I use the following code. However, it does not seem to work with grenades, bugs and satchels. It's really weird, try for yourself:

PHP Code:
#include <amxmodx>
#include <fun>
 
new PLUGIN[]="test123"
new AUTHOR[]="gonr"
new VERSION[]="1.00"
 
public plugin_init()
{
     
register_plugin(PLUGINVERSIONAUTHOR)
     
register_event("WeapPickup""WepPkd""be")
}

public 
WepPkd(id)
{
    
set_task(0.1"WeaponPicked"id)
    return 
PLUGIN_CONTINUE
}

public 
WeaponPicked(id)
{
    
strip_user_weapons(id)
    
client_print(idprint_chat"Picked up")
    return 
PLUGIN_CONTINUE

I would appreciate any help from you guys
Thanks!

Last edited by BFK_GoNER; 02-13-2009 at 02:00.
BFK_GoNER is offline
hleV
Veteran Member
Join Date: Mar 2007
Location: Lithuania
Old 02-12-2009 , 05:11   Re: strip_user_weapons works selectively [HLDM]
Reply With Quote #2

Why don't you block the pickup?
Code:
#include <amxmodx> #include <fakemeta_util> #include <hamsandwich>   #define MAX_CLASSNAMES 3   new g_szClassNames[MAX_CLASSNAMES][] = {         "weaponbox",         "armoury_entity",         "grenade" };   public plugin_init() {         register_forward(FM_Touch, "fwTouch");           RegisterHam(Ham_Spawn, "player", "hSpawn", 1); }   public fwTouch(iEnt, iCl) {         if (!pev_valid(iEnt) || !is_user_alive(iCl))                 return FMRES_IGNORED;           new szClassName[32];         pev(iEnt, pev_classname, szClassName, 31);           for (new i = 0; i < MAX_CLASSNAMES; i++)                 if (equal(szClassName, g_szClassNames[i]))                         return FMRES_SUPERCEDE;           return FMRES_IGNORED; }   public hSpawn(iCl) {         if (!is_user_alive(iCl))                 return;           fm_strip_user_weapons(iCl); }
__________________
hleV is offline
BFK_GoNER
Junior Member
Join Date: Feb 2009
Location: Holland
Old 02-12-2009 , 15:02   Re: strip_user_weapons works selectively [HLDM]
Reply With Quote #3

Thanks a lot! I've got another question.

I want my plugin to be able to switch players to spect mode and back. The first part is easy, I just execute the client command "spectate", but how do I bring the player back into the game? I can't use the jointeam command for some reason because this is what I get in console:

Code:
Unknown command: jointeam
I tried running the server in both DM and Teamplay modes but neither of them seem to work.
BFK_GoNER is offline
hleV
Veteran Member
Join Date: Mar 2007
Location: Lithuania
Old 02-12-2009 , 15:26   Re: strip_user_weapons works selectively [HLDM]
Reply With Quote #4

Did you try engclient_cmd()?
Code:
engclient_cmd(Client, "jointeam", "num"); // num - team's number
__________________
hleV is offline
BFK_GoNER
Junior Member
Join Date: Feb 2009
Location: Holland
Old 02-12-2009 , 16:28   Re: strip_user_weapons works selectively [HLDM]
Reply With Quote #5

Quote:
Originally Posted by hleV View Post
Did you try engclient_cmd()?
Code:
engclient_cmd(Client, "jointeam", "num"); // num - team's number

Yes, the client console gives this error: Unknown command: jointeam
BFK_GoNER is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 02-12-2009 , 17:23   Re: strip_user_weapons works selectively [HLDM]
Reply With Quote #6

He asked if you tried engclient_cmd(), not client_cmd().

engclient_cmd() shouldn't print anything to the console.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
BFK_GoNER
Junior Member
Join Date: Feb 2009
Location: Holland
Old 02-12-2009 , 18:47   Re: strip_user_weapons works selectively [HLDM]
Reply With Quote #7

Quote:
Originally Posted by Exolent[jNr] View Post
He asked if you tried engclient_cmd(), not client_cmd().

engclient_cmd() shouldn't print anything to the console.

Strangely enough, mine does Here's the code. Type me_spectate or me_play:

PHP Code:
#include <amxmodx>

new PLUGIN[]="spectate and back"
new AUTHOR[]="me"
new VERSION[]="1.00"

public plugin_init()
{
     
register_plugin(PLUGINVERSIONAUTHOR)
     
register_concmd("me_spectate""X_spect"ADMIN_USER)
     
register_concmd("me_play""X_play"ADMIN_USER)
}

public 
X_spect(idlevelcid)
{
     
engclient_cmd(id"jointeam""0");
     return 
PLUGIN_CONTINUE
}

public 
X_play(idlevelcid)
{
     
engclient_cmd(id"jointeam""1");
     return 
PLUGIN_CONTINUE

BFK_GoNER is offline
BFK_GoNER
Junior Member
Join Date: Feb 2009
Location: Holland
Old 02-14-2009 , 12:56   Re: Unknown command: jointeam [HLDM]
Reply With Quote #8

Ok, let's rephrase the question. In HLDM, to spectate you have to type "spectate" in console. My question is: what do you type to go back into the game??

Some people already told me that I just have to press Enter and choose a team, but then I'm still getting the Unknown command: jointeam error.
Has anyone encountered this problem before?? It's really frustrating..
BFK_GoNER 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 16:51.


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