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

[CS:S] Compiling Errors Help


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Sgt.Soldier
SourceMod Donor
Join Date: Mar 2011
Location: Los Angeles,CA
Old 06-17-2013 , 11:21   [CS:S] Compiling Errors Help
Reply With Quote #1

I've been trying to make some changes to a few a things for my server(linux) and come into problems:

1st Problem:
Trying to edit the edit and re-compile the ban.sp (Editing Times and Ban Reasons)
Error


ban.sp


2nd Problem: Was trying to edit advcommands flags + Hide Root Admins from !admins

Error even though I used spider.limetech.org & attached include)


advcommands.sp


Could someone fix the problem/compile for me please? Much appreciated/Thanks in advance
__________________
Sgt.Soldier is offline
Tom_Cruise
New Member
Join Date: Jun 2013
Old 06-18-2013 , 03:34   Re: [CS:S] Compiling Errors Help
Reply With Quote #2

you should ask the linux developers community to do that...!
__________________
Tom_Cruise is offline
Impact123
Veteran Member
Join Date: Oct 2011
Location: Germany
Old 06-18-2013 , 03:54   Re: [CS:S] Compiling Errors Help
Reply With Quote #3

As for the first problem, ban.sp is not a standalone plugin, it's a part of the basebans plugin iirc.

For the second problem, try to change the include statement from
PHP Code:
#include "include/advcommands.inc" 
to
PHP Code:
#include "advcommands.inc" 
Asherkin made a wonderful tool with spider, but for total flexibility you should compile on your own computer.

Yours sincerely
Impact
__________________

Last edited by Impact123; 06-18-2013 at 03:56.
Impact123 is offline
Sgt.Soldier
SourceMod Donor
Join Date: Mar 2011
Location: Los Angeles,CA
Old 06-18-2013 , 06:02   Re: [CS:S] Compiling Errors Help
Reply With Quote #4

Quote:
Originally Posted by Impact123 View Post
As for the first problem, ban.sp is not a standalone plugin, it's a part of the basebans plugin iirc.

For the second problem, try to change the include statement from
PHP Code:
#include "include/advcommands.inc" 
to
PHP Code:
#include "advcommands.inc" 
Asherkin made a wonderful tool with spider, but for total flexibility you should compile on your own computer.

Yours sincerely
Impact
Thank You for taking your time to reply and help me out,Impact.

I was able to succesfully compile the advcommands but was unsuccessful at editing the code to prevent it from showing root admins in the !admins list. Mind lending me a hand with editing the code? I believe it's this part of the code here

PHP Code:
//------------------------------------------------------------------------------------------------------------------------------------
public Action:Command_Admins(clientargs)
{
    if (!
g_iAdmList) return Plugin_Stop;
    new 
Adms[MAX_CLIENTS],count 0;
    for (new 
1<= MaxClientsi++)
    if (
IsClientInGame(i) && (GetUserFlagBits(i) & ADMFLAG_GENERIC)) Adms[count++] = i;

    if (
count)
    {
        
PrintToChatEx(client,client,"---------------------------------------------------");
        for (new 
0counti++)
        {
            if ((
GetUserFlagBits(Adms[i]) & ADMFLAG_ROOT) && (g_iAdmList 2)) PrintToChatEx(Adms[i],client,"\x04[ROOT]\x01 \x03%N\x01",Adms[i]);
            else if ((
GetUserFlagBits(Adms[i]) & ADMFLAG_GENERIC) && (g_iAdmList 1)) PrintToChatEx(Adms[i],client,"\x04[ADMIN]\x01 \x03%N\x01",Adms[i]);
        }
        
PrintToChatEx(client,client,"---------------------------------------------------");
    }
    return 
Plugin_Handled;
}
//------------------------------------------------------------------------------------------------------------------------------------ 
As for ban.sp, could you tell if there is any way by chance I could edit the ban.sp ban times and add more times + set flags on them? (E.G Add 2 Weeks but set it to a flag so it doesnt show to all admins)
__________________
Sgt.Soldier is offline
Impact123
Veteran Member
Join Date: Oct 2011
Location: Germany
Old 06-18-2013 , 12:46   Re: [CS:S] Compiling Errors Help
Reply With Quote #5

The original code of that function you posted is rather ugly and inefficient, i rewrote it in another style.
I've commented everything, you should have no problem undertanding what it does.
You can just take what you need from the existing function and implement it it the part where it says so.
Personally i would recommend a menu instead of spamming chat messages, but that's a matter of taste.
In general i'd also use a more flexible function for checking the admin access, but that's outside the scope of this solution.

Spoiler


Yours sincerely
Impact
__________________

Last edited by Impact123; 06-18-2013 at 13:09.
Impact123 is offline
11530
Veteran Member
Join Date: Sep 2011
Location: Underworld
Old 06-18-2013 , 13:10   Re: [CS:S] Compiling Errors Help
Reply With Quote #6

What's wrong with using CheckCommandAccess? Cleaner, simpler, and people could then override it at least.
__________________
11530 is offline
Impact123
Veteran Member
Join Date: Oct 2011
Location: Germany
Old 06-18-2013 , 13:13   Re: [CS:S] Compiling Errors Help
Reply With Quote #7

I also prefer CheckCommandAccess, but i don't want to confuse the thread starter and thus used code that is similar to the original.
I dropped a small note about that, if he is interested in that more flexible method he is going to ask

Yours sincerely
Impact
__________________

Last edited by Impact123; 06-18-2013 at 13:27.
Impact123 is offline
Sgt.Soldier
SourceMod Donor
Join Date: Mar 2011
Location: Los Angeles,CA
Old 06-19-2013 , 17:05   Re: [CS:S] Compiling Errors Help
Reply With Quote #8

Quote:
Originally Posted by Impact123 View Post
The original code of that function you posted is rather ugly and inefficient, i rewrote it in another style.
I've commented everything, you should have no problem undertanding what it does.
You can just take what you need from the existing function and implement it it the part where it says so.
Personally i would recommend a menu instead of spamming chat messages, but that's a matter of taste.
In general i'd also use a more flexible function for checking the admin access, but that's outside the scope of this solution.

Spoiler


Yours sincerely
Impact
Thanks again for replying but currently at the moment having host problems and my server is down until they fix the problem so sadly I can't try this out to see if it works at this moment but I'm sure it works ^^,but is there a way to make roots still show to Roots also I like your menu idea,but maybe prints to console still,like maybe !admins makes a hsay to the player listing the admins on + its in console,also could say maybe if exceeds like 5 Admins "See Console for rest of admins currently online" Also, what about the ban.sp? Is there a way I can add Ban Times but set the time to a flag or group?(Either or)
e.g
AddMenuItem (menu, "10080", "1 Week"); ADMFLAG_CUSTOM1
__________________

Last edited by Sgt.Soldier; 06-19-2013 at 17:06.
Sgt.Soldier is offline
Impact123
Veteran Member
Join Date: Oct 2011
Location: Germany
Old 06-20-2013 , 04:51   Re: [CS:S] Compiling Errors Help
Reply With Quote #9

Alright.
Spoiler

Like the last time, just look at the comments.
I have used another function in this example, it's more flexible and i recommend you to use it.
You can find some information on what you can do with this here.

Yours sincerely
Impact
__________________

Last edited by Impact123; 06-20-2013 at 04:56.
Impact123 is offline
11530
Veteran Member
Join Date: Sep 2011
Location: Underworld
Old 06-20-2013 , 10:22   Re: [CS:S] Compiling Errors Help
Reply With Quote #10

I'd mention though that the ban times taken from the OP are a bit off.

PHP Code:
AddMenuItem(menu"10""10 Minutes");
AddMenuItem(menu"30""30 Minutes");
AddMenuItem(menu"180""1 Hour");
AddMenuItem(menu"300""3 Hours");
AddMenuItem(menu"720""6 Hours")
AddMenuItem(menu"1440""1 Day"); 
Need to change the 1/3/6 hour times to 60/180/360 minutes.
__________________

Last edited by 11530; 06-20-2013 at 10:31.
11530 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 01:49.


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