AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Massive kick (https://forums.alliedmods.net/showthread.php?t=57031)

bwgrubbs1 06-26-2007 18:40

Massive kick
 
1 Attachment(s)
I have tried over and over to fix this...but can't seen to find out why ?

In one of my servers, which is a hide n seek server, i am using OneEyed's Hide N Seek plugin. For some reason I get this error message all the time...more like once every five to ten rounds...

Quote:

Originally Posted by Error Log
L 06/26/2007 - 10:37:56: Start of error session.
L 06/26/2007 - 10:37:56: Info (map "cs_militia") (logfile "error_062607.log")
L 06/26/2007 - 10:37:56: [FUN] Invalid player 11
L 06/26/2007 - 10:37:56: [AMXX] Run time error 10 (plugin "hidenseek.amxx") (native "strip_user_weapons") - debug not enabled!
L 06/26/2007 - 10:37:56: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
L 06/26/2007 - 10:37:56: [FUN] Invalid player 16
L 06/26/2007 - 10:37:56: [AMXX] Run time error 10 (plugin "hidenseek.amxx") (native "strip_user_weapons") - debug not enabled!
L 06/26/2007 - 10:37:56: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
L 06/26/2007 - 10:58:01: [FUN] Invalid player 3
L 06/26/2007 - 10:58:01: [AMXX] Run time error 10 (plugin "hidenseek.amxx") (native "strip_user_weapons") - debug not enabled!
L 06/26/2007 - 10:58:01: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
L 06/26/2007 - 10:58:01: [FUN] Invalid player 4
L 06/26/2007 - 10:58:01: [AMXX] Run time error 10 (plugin "hidenseek.amxx") (native "strip_user_weapons") - debug not enabled!
L 06/26/2007 - 10:58:01: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
L 06/26/2007 - 10:58:01: [FUN] Invalid player 5
L 06/26/2007 - 10:58:01: [AMXX] Run time error 10 (plugin "hidenseek.amxx") (native "strip_user_weapons") - debug not enabled!
L 06/26/2007 - 10:58:01: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
L 06/26/2007 - 10:58:01: [FUN] Invalid player 7
L 06/26/2007 - 10:58:01: [AMXX] Run time error 10 (plugin "hidenseek.amxx") (native "strip_user_weapons") - debug not enabled!
L 06/26/2007 - 10:58:01: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
L 06/26/2007 - 10:58:01: [FUN] Invalid player 8
L 06/26/2007 - 10:58:01: [AMXX] Run time error 10 (plugin "hidenseek.amxx") (native "strip_user_weapons") - debug not enabled!
L 06/26/2007 - 10:58:01: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
L 06/26/2007 - 10:58:01: [FUN] Invalid player 10
L 06/26/2007 - 10:58:01: [AMXX] Run time error 10 (plugin "hidenseek.amxx") (native "strip_user_weapons") - debug not enabled!
L 06/26/2007 - 10:58:01: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
L 06/26/2007 - 10:58:01: [FUN] Invalid player 11
L 06/26/2007 - 10:58:01: [AMXX] Run time error 10 (plugin "hidenseek.amxx") (native "strip_user_weapons") - debug not enabled!
L 06/26/2007 - 10:58:01: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
L 06/26/2007 - 10:58:01: [FUN] Invalid player 13
L 06/26/2007 - 10:58:01: [AMXX] Run time error 10 (plugin "hidenseek.amxx") (native "strip_user_weapons") - debug not enabled!
L 06/26/2007 - 10:58:01: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
L 06/26/2007 - 10:58:01: [FUN] Invalid player 15
L 06/26/2007 - 10:58:01: [AMXX] Run time error 10 (plugin "hidenseek.amxx") (native "strip_user_weapons") - debug not enabled!
L 06/26/2007 - 10:58:01: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).

It happens on round start...and it kicks massive amounts of people from the server, like 10-15 at a time.

Here is his plugin...can someone please help me figure out why it does this ?

|PJ| Shorty 06-26-2007 21:59

Re: Massive kick
 
Add "debug" after your hidenseek.amxx in the plugins.ini and post error logs again

bwgrubbs1 06-27-2007 00:24

Re: Massive kick
 
Quote:

Originally Posted by error_062707
L 06/27/2007 - 00:17:27: Start of error session.
L 06/27/2007 - 00:17:27: Info (map "de_dust") (logfile "error_062707.log")
L 06/27/2007 - 00:17:27: [FUN] Invalid player 3
L 06/27/2007 - 00:17:27: [AMXX] Displaying debug trace (plugin "hidenseek.amxx")
L 06/27/2007 - 00:17:27: [AMXX] Run time error 10: native error (native "strip_user_weapons")
L 06/27/2007 - 00:17:27: [AMXX] [0] phpf9uw00.sma::HiderItems (line 592)
L 06/27/2007 - 00:17:27: [FUN] Invalid player 4
L 06/27/2007 - 00:17:27: [AMXX] Displaying debug trace (plugin "hidenseek.amxx")
L 06/27/2007 - 00:17:27: [AMXX] Run time error 10: native error (native "strip_user_weapons")
L 06/27/2007 - 00:17:27: [AMXX] [0] phpf9uw00.sma::HiderItems (line 592)
L 06/27/2007 - 00:17:27: [FUN] Invalid player 5
L 06/27/2007 - 00:17:27: [AMXX] Displaying debug trace (plugin "hidenseek.amxx")
L 06/27/2007 - 00:17:27: [AMXX] Run time error 10: native error (native "strip_user_weapons")
L 06/27/2007 - 00:17:27: [AMXX] [0] phpf9uw00.sma::SeekerItems (line 584)
L 06/27/2007 - 00:17:27: [FUN] Invalid player 6
L 06/27/2007 - 00:17:27: [AMXX] Displaying debug trace (plugin "hidenseek.amxx")
L 06/27/2007 - 00:17:27: [AMXX] Run time error 10: native error (native "strip_user_weapons")
L 06/27/2007 - 00:17:27: [AMXX] [0] phpf9uw00.sma::SeekerItems (line 584)
L 06/27/2007 - 00:17:27: [FUN] Invalid player 7
L 06/27/2007 - 00:17:27: [AMXX] Displaying debug trace (plugin "hidenseek.amxx")
L 06/27/2007 - 00:17:27: [AMXX] Run time error 10: native error (native "strip_user_weapons")
L 06/27/2007 - 00:17:27: [AMXX] [0] phpf9uw00.sma::HiderItems (line 592)
L 06/27/2007 - 00:17:27: [FUN] Invalid player 11
L 06/27/2007 - 00:17:27: [AMXX] Displaying debug trace (plugin "hidenseek.amxx")
L 06/27/2007 - 00:17:27: [AMXX] Run time error 10: native error (native "strip_user_weapons")
L 06/27/2007 - 00:17:27: [AMXX] [0] phpf9uw00.sma::SeekerItems (line 584)

What is going on...here is some code from within the plugin.


Code:
//------------------------------------------------------------------------------------------------------------ public server_fakeFrame(entid){     if(get_cvar_num("hide_n_seek") >= 1 && round >= 1) {         if(timer > 0) {             set_hudmessage(255, 0, 0, -1.0, 0.60, 0, 1.0, 1.0, 0.2, 0.1, 4)             show_hudmessage(0,"[Hiders] have %i seconds to hide...",timer)             client_cmd(0,"spk vox/%s.wav",countername[timer])             for(new b=1;b<=maxplayers;b++)                 if(get_user_team(b) == 2 && is_user_alive(b)) {                     doFlash(b, 15)                     entity_set_float(b,EV_FL_maxspeed,-200.0)                 }         }         if(timer == 0) {             for(new b=1;b<=maxplayers;b++) {                 if(get_user_team(b) == 2 && is_user_alive(b)) {                     doFlash(b, 0)                     entity_set_float(b,EV_FL_maxspeed,250.0)                 }             }             set_hudmessage(255, 0, 0, -1.0, 0.60, 0, 1.0, 6.0, 0.2, 0.1, 4)             show_hudmessage(0,"READY OR NOT BITCHES, HERE WE COME!",timer)             return PLUGIN_HANDLED         }         if(timer < 0) {             for(new b=1;b<=maxplayers;b++)                 if(get_user_team(b) == 2 && is_user_alive(b)) {                     doFlash(b, 0)                     entity_set_float(b,EV_FL_maxspeed,250.0)                 }             return PLUGIN_HANDLED         }         timer--         entity_set_float(entid,EV_FL_nextthink,halflife_time() + 1.0)     }     return PLUGIN_HANDLED }

Here is where the strip gets called through a task...
Code:
//------------------------------------------------------------------------------------------------------------ public StartRound() {     new t, c     for(new x=1;x<=maxplayers;x++) {         if(!is_user_connected(x)) continue         if(get_user_team(x) == 1) t = 1         if(get_user_team(x) == 2) c = 1     }     //Give team weapons on start round, and begin rounds     if(c == 1 && t == 1) {         if(get_cvar_num("hide_n_seek") == 1) {             if(round == 0) { // Knife Round Stuff                     format(g_message,255,"Knife Round^nWinning Team will become [Hiders] first.")                     for(new a=1;a<=maxplayers;a++) {                         if(is_user_alive(a))                             set_task(1.5,"stripAndGiveKnife",a)                     }                     set_hudmessage(255, 0, 0, -1.0, 0.5, 0, 1.0, 7.0, 0.1, 0.1, 4)                     show_hudmessage(0,"%s",g_message)                     entity_set_float(scoreB,EV_FL_nextthink,halflife_time() + 0.01)             }             if(round == 1) {    // Begin Round 1 stuff                 timer = get_cvar_num("hide_n_seek_timer")                 entity_set_float(fakeEnt,EV_FL_nextthink,halflife_time() + 0.01)                 for(new a=1;a<=maxplayers;a++) {                     if(get_user_team(a) == 1 && is_user_alive(a))                         set_task(1.5,"HiderItems",a)                     if(get_user_team(a) == 2 && is_user_alive(a))                         set_task(1.5,"SeekerItems",a)                 }             }         }         if(get_cvar_num("hide_n_seek") == 2) {             if(round >= 1) {    // Begin Round 1 stuff                 timer = get_cvar_num("hide_n_seek_timer")                 entity_set_float(fakeEnt,EV_FL_nextthink,halflife_time() + 0.01)                 for(new a=1;a<=maxplayers;a++) {                     if(get_user_team(a) == 1 && is_user_alive(a))                         set_task(1.5,"HiderItems",a)                     if(get_user_team(a) == 2 && is_user_alive(a))                         set_task(1.5,"SeekerItems",a)                 }             }         }     } }

Here is the Hider items...
Code:
//------------------------------------------------------------------------------------------------------------ public HiderItems(id) {     strip_user_weapons(id)     give_item(id, "weapon_hegrenade")     give_item(id, "weapon_flashbang")     give_item(id, "weapon_flashbang")     give_item(id, "weapon_smokegrenade")     csset_user_armor(id, 100.0, 2)     set_user_footsteps(id, 1)     cs_set_user_nvg(id, 0) }

Here are the Seeker Items
Code:
//------------------------------------------------------------------------------------------------------------ public SeekerItems(id) {     strip_user_weapons(id)     give_item(id, "weapon_knife")     set_user_footsteps(id, 0)     cs_set_user_nvg(id) }

Anyone...this has happened ever since i got the mod.

Drak 06-27-2007 00:43

Re: Massive kick
 
I guess for a simple fix, change all "strip_user_weapons(id)" to:
Code:
 if(is_user_alive(id)) strip_user_weapons(id)

So like, the "HiderItems(id)" would look like this:
Code:
public HiderItems(id)  {         if(is_user_alive(id)) strip_user_weapons(id)         give_item(id, "weapon_hegrenade")         give_item(id, "weapon_flashbang")         give_item(id, "weapon_flashbang")         give_item(id, "weapon_smokegrenade")         set_user_armor(id, 100.0, 2)         set_user_footsteps(id, 1)       cs_set_user_nvg(id, 0) }

bwgrubbs1 06-27-2007 00:57

Re: Massive kick
 
But isn't that checking it before it gets to the hideritems and seekeritems...

if(get_user_team(a) == 1 && is_user_alive(a))
set_task(1.5,"HiderItems",a)
if(get_user_team(a) == 2 && is_user_alive(a))
set_task(1.5,"SeekerItems",a)

bwgrubbs1 06-27-2007 01:53

Re: Massive kick
 
Well...to be honest...I don't know what I did, but I got it to work...

I sat there and spammed amx_cvar sv_restart 1 and had a full server 20 ppl and had not 1 disconnect for about 5 minutes of me restarting CONSTANTLY...no errors...all good...thanks for helping...

Drak 06-27-2007 04:50

Re: Massive kick
 
Quote:

Originally Posted by bwgrubbs1 (Post 495264)
But isn't that checking it before it gets to the hideritems and seekeritems...

if(get_user_team(a) == 1 && is_user_alive(a))
set_task(1.5,"HiderItems",a)
if(get_user_team(a) == 2 && is_user_alive(a))
set_task(1.5,"SeekerItems",a)

Oh...didn't notice that. But good to hear you got it to work. ^^

Lee 06-27-2007 12:48

Re: Massive kick
 
There is no chance of a user being killed in 1.5 seconds? You also need to make use of is_user_connected(id). The plugin is poorly written in my opinion and could do with a rewrite.

Restarting the round will not have solved your problem.

_Master_ 06-27-2007 12:56

Re: Massive kick
 
A good thing to know when dealing with tasks:
Testing for client connect BEFORE setting the task will do shit !!!
The test must be placed inside the task itself.


All times are GMT -4. The time now is 21:24.

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