AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   How to make set_user_flags for everybody? (https://forums.alliedmods.net/showthread.php?t=172330)

Evaldas.Grigas 11-19-2011 02:36

How to make set_user_flags for everybody?
 
Here is the link: http://www.amxmodx.org/funcwiki.php?go=func&id=256.
But I still don't understand how to make this fork for everybody in my server.
P.S. I want to give players admin_chat flag.

ConnorMcLeod 11-19-2011 04:53

Re: How to make set_user_flags for everybody?
 
Code:

// Default access for all non admin players (see users.ini for access details)
//
// Default value: "z"
amx_default_access "z"

Put flags you want here.

Evaldas.Grigas 11-19-2011 05:18

Re: How to make set_user_flags for everybody?
 
Haha. Well perhaps I didn't explain everything. I am trying to make a plugin that gives player ADMIN_CHAT flag on some of the days. eg.:
PHP Code:

#include <amxmodx>
#include <amxmisc>

#define PLUGIN "Free Hollyday VIP"
#define VERSION "1.0"
#define AUTHOR "Evaldas.Grigas"

new temp[10]

public 
plugin_init() 
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
register_logevent"Event_RoundStart"2"1=Round_Start" );
}

public 
Event_RoundStart(id)
{
    
get_time("%m %d"tempsizeof(temp)-1)
    if(
equali(temp"11 19"))
    {
        
set_user_flags(id ADMIN_CHAT)
    } 



Korxu 11-19-2011 05:45

Re: How to make set_user_flags for everybody?
 
The event 'round start' don't pass any index.

ConnorMcLeod 11-19-2011 05:47

Re: How to make set_user_flags for everybody?
 
PHP Code:

#include <amxmodx>
#include <amxmisc>

#define PLUGIN "Free Hollyday VIP"
#define VERSION "1.0"
#define AUTHOR "Evaldas.Grigas"

new temp[10]

public 
plugin_init() 
{
    
register_plugin(PLUGINVERSIONAUTHOR)

    new 
szDate[5]
    
get_time("%m%d"szDatecharsmax(szDate))
    if( !
equal(szDate"1119") )
    {
        
pause("a")
    } 
}

public 
client_authorizedid )
{
    
set_user_flags(id ADMIN_CHAT)
}

public 
client_putinserverid )
{
    
set_user_flags(id ADMIN_CHAT)
}

public 
client_infochangedid )
{
    
set_user_flags(id ADMIN_CHAT)



Evaldas.Grigas 11-19-2011 06:12

Re: How to make set_user_flags for everybody?
 
Thanks it works. If I want to add flags I have to add them in client_authorized, putinserver and infochanged. Right?


All times are GMT -4. The time now is 08:30.

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