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

Simple Slots Reservation


Post New Thread Reply   
 
Thread Tools Display Modes
EthicalHacker007
Veteran Member
Join Date: May 2014
Old 05-31-2014 , 00:42   Re: Simple Slots Reservation
Reply With Quote #11

Hello Jhob

I don't know but is this possible?

Only reserve slots when admin joins.

Eg: Assume, I've a 10 slots pug server. The server is full, but I want to enter my server. So when I try to connect my server some random player gets kicked and I get a slot to play. This way players can play and admins get to play without waiting too.

Regards,
EH007
__________________
EthicalHacker007 is offline
Jhob94
AMX Mod X Donor
Join Date: Jul 2012
Old 05-31-2014 , 06:12   Re: Simple Slots Reservation
Reply With Quote #12

Quote:
Originally Posted by EthicalHacker007 View Post
Hello Jhob

I don't know but is this possible?

Only reserve slots when admin joins.

Eg: Assume, I've a 10 slots pug server. The server is full, but I want to enter my server. So when I try to connect my server some random player gets kicked and I get a slot to play. This way players can play and admins get to play without waiting too.

Regards,
EH007
Possible, but are you sure you want it? Cuz in that way you would be kicking someone "innocent". But it is your server, your decision
I will try to do it when i can, havent much time recently.
__________________
Jhob94 is offline
EthicalHacker007
Veteran Member
Join Date: May 2014
Old 05-31-2014 , 06:21   Re: Simple Slots Reservation
Reply With Quote #13

Very good, then. You can add a reason though.

"Sorry bro, you've been kicked due to slot reservation "

Just confirming once more.

I've a 10 slots server. And all 10 players aren't admins. I'm an admin with "b" flag. I try to connect my full server and then some random player gets kicked.

This way, all slots in my server are used (not vacant). Admins won't have to wait to connect.

Thanks
__________________
EthicalHacker007 is offline
Jhob94
AMX Mod X Donor
Join Date: Jul 2012
Old 06-01-2014 , 10:04   Re: Simple Slots Reservation
Reply With Quote #14

Quote:
Originally Posted by EthicalHacker007 View Post
Very good, then. You can add a reason though.

"Sorry bro, you've been kicked due to slot reservation "

Just confirming once more.

I've a 10 slots server. And all 10 players aren't admins. I'm an admin with "b" flag. I try to connect my full server and then some random player gets kicked.

This way, all slots in my server are used (not vacant). Admins won't have to wait to connect.

Thanks
Well now that i have more time to think about this, i am not sure if it is possible.
Because the game kicks you when server is full. But i dont know when it kicks. I dont know if server can be fast enough to register your join and kick someone before the game kick block your entry.
Well, i guess you will have to use some plugin for via website (that connects to the server) and via rcon you kick someone for you can join.
__________________
Jhob94 is offline
EthicalHacker007
Veteran Member
Join Date: May 2014
Old 06-01-2014 , 10:24   Re: Simple Slots Reservation
Reply With Quote #15

Quote:
Originally Posted by Jhob94 View Post
Well now that i have more time to think about this, i am not sure if it is possible.
Because the game kicks you when server is full. But i dont know when it kicks. I dont know if server can be fast enough to register your join and kick someone before the game kick block your entry.
Well, i guess you will have to use some plugin for via website (that connects to the server) and via rcon you kick someone for you can join.
Maybe you should give it a try!
__________________
EthicalHacker007 is offline
Jhob94
AMX Mod X Donor
Join Date: Jul 2012
Old 06-01-2014 , 10:39   Re: Simple Slots Reservation
Reply With Quote #16

Quote:
Originally Posted by EthicalHacker007 View Post
Maybe you should give it a try!
Sorry i dont have time for "Try". I do or i don't do.
__________________
Jhob94 is offline
Jhob94
AMX Mod X Donor
Join Date: Jul 2012
Old 09-30-2014 , 11:24   Re: Simple Slots Reservation
Reply With Quote #17

Made a small update. Not really anything new, basickly just made the code more readable.
I think there is nothing else to put into this plugin and this might be the final version. If there is some improvement that can be done, let me know.
__________________
Jhob94 is offline
Backstabnoob
Veteran Member
Join Date: Feb 2009
Location: Iwotadai Dorm
Old 10-05-2014 , 16:19   Re: Simple Slots Reservation
Reply With Quote #18

Code is ok, remove stock from those two functions, they're only helper functions called internally in the plugin. Also, szReason[] has no reason (no pun intended) to be static.

Approved
__________________
Currently busy working on a very large scale anime database project.
Backstabnoob is offline
Jhob94
AMX Mod X Donor
Join Date: Jul 2012
Old 10-05-2014 , 16:30   Re: Simple Slots Reservation
Reply With Quote #19

Quote:
Originally Posted by Backstabnoob View Post
Code is ok, remove stock from those two functions, they're only helper functions called internally in the plugin. Also, szReason[] has no reason (no pun intended) to be static.

Approved
Updated
__________________
Jhob94 is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 10-13-2014 , 04:47   Re: Simple Slots Reservation
Reply With Quote #20

Some thoughts while I'm passing here:
  • Use formatex. Actually since you don't use arguments, I don't see why you're using vformat.
  • No reason to use static on admins.
  • This would be welcomed you add some comments in your plugin about what does the plugin, listing/explaining cvars.
__________________

Last edited by Arkshine; 10-13-2014 at 10:34.
Arkshine 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 22:41.


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