|
Member
|
07-29-2021
, 14:05
Re: Level + flag
|
#26
|
Quote:
Originally Posted by The overrated maniac
PHP Code:
#include <amxmisc>
#include <crxranks>
#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "author"
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_event("HLTV", "new_round", "a", "1=0", "2=0");
}
public new_round(id)
{
if(crxranks_get_user_level(id) >= 40)
{
SetVipFlag(id)
}
}
SetVipFlag( id )
{
set_user_flags( id, ADMIN_LEVEL_H );
}
-------------------->
#include <amxmisc>
#include <crxranks>
#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "author"
#define MAX_PLAYERS 32
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_event("HLTV", "new_round", "a", "1=0", "2=0");
}
public new_round(id)
{
for(new i = 0; i<MAX_PLAYERS; i++){
if(crxranks_get_user_level(i) >= 40 && is_user_connected(i))
{
SetVipFlag(i)
}
}
}
SetVipFlag( id )
{
set_user_flags( id, ADMIN_LEVEL_H );
}
|
this code works but when you said i don't recommend using that, i removed it
|
|
|
|