Raised This Month: $ Target: $400
 0% 

How to change default flag access


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
giris
Junior Member
Join Date: Sep 2009
Old 05-11-2012 , 14:25   How to change default flag access
Reply With Quote #1

Hello,

is there any plugin what allows to change amx_default_acess ?

I just want to gave free VIP for all players (called like Happy hour)

Found this, but doesnt work at all

PHP Code:
#include <amxmodx>
#include <csstats>
#include <hamsandwich>
#include <amxmisc>


new PLUGIN [] = ""
new VERSION [] = "0.0.1"
new AUTHOR [] = ""
new cvar_free_vipcvar_free_vip_access


public plugin_init()
{
    
register_pluginPLUGINVERSIONAUTHOR );
    
cvar_free_vip register_cvar("free_vip""0")
    
cvar_free_vip_access register_cvar("free_vip_access""btz")
    
}


public 
CheckPlayer(id)
{
    new 
string1[16]
    
get_pcvar_string(cvar_free_vip_accessstring115)
    new 
flags read_flags(string1)


    if(!(
get_user_flags(id) & ADMIN_USER))
        return 
PLUGIN_CONTINUE


    
if(<= get_pcvar_num(cvar_free_vip))
    {
        
set_user_flags(idget_user_flags(id) | flags)
    }
    else
    {
        
remove_user_flags(idflags)
    } 


    
    return 
PLUGIN_CONTINUE
}


public 
client_infochanged(id)
{
        new 
player_name[32], newName[32]
        
get_user_name(idplayer_name31)
        
get_user_info(id"name"newName31)


    if (!
equali(newNameplayer_name))
               
set_task(1.0"CheckPlayer"id)



There is way to always edit amx.cfg but its too boring. I cant be always here and doing this.

Is there any way to edit this code? Od any comand to change default flag "z" to "bit" for example for 30 minutes?

Please, help me, i cant solve this.

And of course... sorry for my bad english.
giris is offline
bazhenov93
Veteran Member
Join Date: Oct 2010
Old 05-11-2012 , 15:37   Re: How to change default flag access
Reply With Quote #2

This has nothing related to an Issue with AMXX.
bazhenov93 is offline
giris
Junior Member
Join Date: Sep 2009
Old 05-11-2012 , 15:54   Re: How to change default flag access
Reply With Quote #3

Quote:
Originally Posted by bazhenov93 View Post
This has nothing related to an Issue with AMXX.
Ok, sorry about that.

Please move this to the right section.

Btw, I see, where was the problem.

I used amx_default_access with one c... typical czech mistake.

It works now when I use this with plugin Amx Task:

amx_task 18:00 "amx_default_access "bit""

But everyone must reconnect and if I change level, amx_default_access is again with "z"

Is there another way to make it work?
giris is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 05-11-2012 , 23:58   Re: How to change default flag access
Reply With Quote #4

Change it in amxx.cfg.
__________________
fysiks is offline
giris
Junior Member
Join Date: Sep 2009
Old 05-12-2012 , 06:55   Re: How to change default flag access
Reply With Quote #5

Quote:
Originally Posted by fysiks View Post
Change it in amxx.cfg.
Sure, but if I want thist just for Hour?

18:00-19:00

If I change it in amxx.cfg from "z" to "bit" than its forever using "bit"

Is there any way to make server using diferent amxx.cfg (amxx2.cfg) from 18:00 to 19:00?

Or another way to use it?

Thx for reply ;-).
giris 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 04:09.


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