AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Making my own admin system (https://forums.alliedmods.net/showthread.php?t=228890)

Jhob94 10-28-2013 19:04

Making my own admin system
 
Hi
I want to do my own admin system.
Whats wrong with default system? It does not let me add temporary admin.
Whats wrong with amxbans? It doesnt lets me add admins via console.
Whats wrong with Chronic admin system? Doesnt lets me edit stuff as i want.

So i need to do by my own. Can someone tell me how i work with set_user_flags?

YamiKaitou 10-28-2013 19:10

Re: Making my own admin system
 
Quote:

Originally Posted by Jhob94 (Post 2053979)
Whats wrong with amxbans? It doesnt lets me add admins via console.

So you don't want to be patient and wait for it to be added? Or even create it yourself?


Quote:

So i need to do by my own. Can someone tell me how i work with set_user_flags?
Look at the other admin plugins for assistance. Both AMXBans and AMXX give you a great example in their code

Jhob94 10-28-2013 21:54

Re: Making my own admin system
 
Quote:

Originally Posted by YamiKaitou (Post 2053983)
So you don't want to be patient and wait for it to be added? Or even create it yourself?

Isnt a question of i be patient or not.
I waited long time and i cant wait much more, so i am trying to do it by myself. I could edit amxbans in order to can add admin with amount of days, but i dont have much experience related to websites and sql connections.

DruGzOG 10-28-2013 22:32

Re: Making my own admin system
 
Quote:

Originally Posted by Jhob94 (Post 2054019)
Isnt a question of i be patient or not.
I waited long time and i cant wait much more, so i am trying to do it by myself. I could edit amxbans in order to can add admin with amount of days, but i dont have much experience related to websites and sql connections.

Then read, and explore plugins that do.

fysiks 10-29-2013 00:18

Re: Making my own admin system
 
Quote:

Originally Posted by Jhob94 (Post 2054019)
I could edit amxbans in order to can add admin with amount of days, but i dont have much experience related to websites and sql connections.

Then add it to the default AMX Mod X system. I've seen plugins that do this. It's even possible that I've done it before, I can't remember for sure since I've done several different edits involving users.ini.

Jhob94 10-29-2013 11:45

Re: Making my own admin system
 
Quote:

Originally Posted by fysiks (Post 2054031)
Then add it to the default AMX Mod X system. I've seen plugins that do this. It's even possible that I've done it before, I can't remember for sure since I've done several different edits involving users.ini.

Can you take a look if you have it?

Edit:
This is what i have for check if time expired
PHP Code:

#include <amxmodx>

public plugin_init(){
    
register_concmd("amx_addvip""add_vip"ADMIN_RCON"<Steam ID> <expire day> <expire month> <expire year>"// flag "t"
}

stock is_valid_vip(expire_yearexpire_monthexpire_day)
{
    new 
y[5], m[3], d[3], today_yeartoday_monthtoday_day
    get_time
("%Y"y4)
    
get_time("%m"m2)
    
get_time("%d"d2)
    
    
today_year str_to_num(y)
    
today_month str_to_num(m)
    
today_day str_to_num(d)
    
    if(
today_year expire_year)
        return 
0
    
    
else if(today_year == expire_year)
    {
        if(
today_month expire_month)
            return 
0
        
        
else if(today_month == expire_month)
        {
            if(
today_day expire_day)
                return 
0
        
}
            
    }
    
    return 
1



fysiks 10-29-2013 20:37

Re: Making my own admin system
 
Quote:

Originally Posted by Jhob94 (Post 2054209)
Can you take a look if you have it?

I don't keep any of these (requested) plugins on purpose. All my [request] plugins are in the forums.


All times are GMT -4. The time now is 23:17.

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