Raised This Month: $51 Target: $400
 12% 

H-Reserved (Advanced Reserved Slots)


Post New Thread Reply   
 
Thread Tools Display Modes
DJ Tsunami
DJ Post Spammer
Join Date: Feb 2008
Location: The Netherlands
Old 05-04-2008 , 07:31   Re: H-Reserved (Advanced Reserved Slots)
Reply With Quote #251

They have to be added as admins (to admins.cfg or admins_simple.ini) with the a flag, which is for people with reserved slots.
__________________
Advertisements | REST in Pawn - HTTP client for JSON REST APIs
Please do not PM me with questions. Post in the plugin thread.
DJ Tsunami is offline
red!
Senior Member
Join Date: Sep 2007
Location: Germany
Old 05-08-2008 , 10:03   Re: H-Reserved (Advanced Reserved Slots)
Reply With Quote #252

@Roachy: I am running CS server since version 1.5. There never was a possibility to react on client connection attempts before they have been connected.

@dann: this is not the right place for sourcemod howtos - but look for the reserved flag in the admin list.
red! is offline
TSG_Server
Junior Member
Join Date: May 2008
Old 05-11-2008 , 07:30   Re: H-Reserved (Advanced Reserved Slots)
Reply With Quote #253

Hey everyone!

We're trying to use the h-reserved plugin but we figured out that in fact it wasn't doing what we had in mind. What we want is when an admin connects, he doesn't use a public slot but goes directly on the reserved slot and stays there.
We have a 12 maxplayers server and 4 hidden slots. So we're trying to work out how to change the h-reserved source file and any feedback would be appreciated. What we have now is that when an admin connects, he goes in the reserved slot and then returns to a public slot.

Code:
// hreserved_slots.cfg
sv_visiblemaxplayers 8
sm_hreserved_admin_protection "2"
sm_hreserved_bot_protection "0"
sm_hreserved_drop_method "0"
sm_hreserved_drop_select "0"
sm_hreserved_immunity_decrement "0"
sm_hreserved_redirect_target ""
sm_hreserved_redirect_timer "12"
sm_hreserved_slots_amount "4"
sm_hreserved_slots_enable "1"
sm_hreserved_use_immunity "1"
Code:
// that's what we changed in the hreserved_slots.sp (we swapped the 2 tests, 1st is the admin test and 2nd is the public slot test) and it works
public OnClientPostAdminCheck(clientSlot)
{
 // plugin deactivated
 if (GetConVarInt(s_smHreservedSlotsEnable)==0) return;
 
 new currentClientCount = GetClientCount(true); // changed for 1.3.1-r1
 new publicSlots = getPublicSlots();
 
 new userFlags = GetUserFlagBits(clientSlot);
 
 // test reserved slots
 if (userFlags & ADMFLAG_ROOT || userFlags & ADMFLAG_RESERVATION) // is allowed to use reserved slot?
 {
  // is admin -> drop other player
  PrintToServer("[hreserved_slots] connected to reserved slot, admin rights granted");
  PrintToConsole(clientSlot,"[hreserved_slots] connected to reserved slot, admin rights granted");
 
  if (GetConVarInt(s_smHreservedDropMethod)!=DROP_METHOD_NONE) 
  {
   // calculate list of connected clients with their priority for beeing dropped
   refreshPriorityVector();
   DropPlayerByWeight();
  }
 }
 // test public slots
 else 
 {
  if (currentClientCount <= publicSlots ) // public slots free?
  {
   // public slots available
   PrintToServer("[hreserved_slots] public slot used (%d/%d)", currentClientCount, publicSlots);
   PrintToConsole(clientSlot,"[hreserved_slots] public slot used (%d/%d)", currentClientCount, publicSlots);
//   return;
  }
  else
  {
   // not admin -> drop this player
   PrintToServer("[hreserved_slots] no free public slots");
   PrintToConsole(clientSlot,"[hreserved_slots] sorry, no free public slots");
 
   if ((GetConVarInt(s_smHreservedDropMethod)==DROP_METHOD_REDIRECT) && !IsFakeClient(clientSlot)) {
    CreateTimer(5.0, OnTimedRedirect, GetClientUserId(clientSlot));
   } else {
    CreateTimer(0.1, OnTimedKickForReject, GetClientUserId(clientSlot));
   }
  }
 }
 
 
}
What do we have to change in the hreserved_slots.sp to do that, and is it even possible?

Thanks

-TSG Admins
TSG_Server is offline
red!
Senior Member
Join Date: Sep 2007
Location: Germany
Old 05-11-2008 , 13:37   Re: H-Reserved (Advanced Reserved Slots)
Reply With Quote #254

Hmm, I am not sure what you me to do now. You ask how to modify my plugin, but the comment in the code say you're already finished with doing it by yourself.

Nevertheless I think the rerverved.smx plugin from the sourcemod basic package comes closer to what you wanted to do.
red! is offline
TSG_Server
Junior Member
Join Date: May 2008
Old 05-12-2008 , 05:44   Re: H-Reserved (Advanced Reserved Slots)
Reply With Quote #255

We modified a part but we still need to change the part where admins in reserved slot stay in the reserved slot.
Right now when an admin connects, he uses a rs and then goes back on a public slot immediatly.

We're looking for a plugin that puts admins in reserved slots only and clients in public slots only. I know its a bit confused but it's hard to explain

Thanks
TSG_Server is offline
DJ Tsunami
DJ Post Spammer
Join Date: Feb 2008
Location: The Netherlands
Old 05-12-2008 , 05:53   Re: H-Reserved (Advanced Reserved Slots)
Reply With Quote #256

That would mean that say you have 2 reserved slots, you can only have 2 admins at a time in the server. All the other admins aren't allowed to join because there's no reserved slot for them, and they're not allowed in the public slots.
__________________
Advertisements | REST in Pawn - HTTP client for JSON REST APIs
Please do not PM me with questions. Post in the plugin thread.
DJ Tsunami is offline
red!
Senior Member
Join Date: Sep 2007
Location: Germany
Old 05-12-2008 , 05:54   Re: H-Reserved (Advanced Reserved Slots)
Reply With Quote #257

Hm, yes. I think there is not a trivial solution. Maybe you should introduce a counter for connected admins and subtract this counter from the amount of reserved slots. But I do not see enough benefit for the public to add such a feature to the official release.
red! is offline
TSG_Server
Junior Member
Join Date: May 2008
Old 05-12-2008 , 13:04   Re: H-Reserved (Advanced Reserved Slots)
Reply With Quote #258

We have a question, We check the code, but We could not find the place weher the admins are placed in reserved slots.

Our case is: we have 4 admins maximum on the server and we want those admins to be placed always on reserved slots. But we could'nt find how to do that. Could you help us?

Thanks in advance.

-TSG Admins
TSG_Server is offline
red!
Senior Member
Join Date: Sep 2007
Location: Germany
Old 05-12-2008 , 13:13   Re: H-Reserved (Advanced Reserved Slots)
Reply With Quote #259

The game-engine assigns the players to the slots right before you are able to do anything with the players. Therefor you can not use fixed slot indices for the admin slots. You will have to track the usage of the admin slots by the amount of connected admins.
red! is offline
TSG_Server
Junior Member
Join Date: May 2008
Old 05-12-2008 , 17:22   Re: H-Reserved (Advanced Reserved Slots)
Reply With Quote #260

Ok, well we'll try and find a solution but anyway thanks for your answers and if we find something we'll post it here

Thanks again,

-TSG Admins
TSG_Server 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 13:38.


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