Raised This Month: $ Target: $400
 0% 

Solved Level + flag


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
1M1e
Member
Join Date: Mar 2020
Old 07-29-2021 , 04:10   Level + flag
Reply With Quote #1

hi,

can some one tell me whats the problem?

i want when some one got in level 40 he will get ADMIN_LEVEL_H

PHP Code:
#include <amxmisc>
#include <crxranks>

#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "author"

public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
register_event("HLTV""new_round""a""1=0""2=0");
}

public 
new_round(id)
{
    if(
crxranks_get_user_level(id) >= 40)
    {
        
SetVipFlag(id)
    }

}

SetVipFlagid )
{
    
set_user_flagsidADMIN_LEVEL_H );


Last edited by 1M1e; 07-29-2021 at 14:17.
1M1e is offline
ConorCC
Member
Join Date: Feb 2014
Old 07-29-2021 , 05:57   Re: Level + flag
Reply With Quote #2

You cannot reach client_id directly from an event. You have to loop or something.
ConorCC is offline
1M1e
Member
Join Date: Mar 2020
Old 07-29-2021 , 06:20   Re: Level + flag
Reply With Quote #3

and how i can do that?

Set_task ?

Last edited by 1M1e; 07-29-2021 at 06:27.
1M1e is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Old 07-29-2021 , 07:30   Re: Level + flag
Reply With Quote #4

public crxranks_user_level_update(id, level, bool:levelup)
__________________
@Jailbreak Main Mod v2.6.6 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !

Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
1M1e
Member
Join Date: Mar 2020
Old 07-29-2021 , 09:40   Re: Level + flag
Reply With Quote #5

Quote:
Originally Posted by Natsheh View Post
public crxranks_user_level_update(id, level, bool:levelup)
Like this?

PHP Code:
#include <amxmisc>
#include <crxranks>
#include <zombie_escape>

#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "author"

public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
}



public 
crxranks_user_level_updated(idtrue)
{
    if(
crxranks_get_user_level(id) >= 40)
    {
        
SetVipFlagid )
    }
    return 
PLUGIN_HANDLED
    
}

SetVipFlagid )
{
    
set_user_flagsidADMIN_LEVEL_H );

this way its only effect when the level of player updated and the player will lose his flag after the map change

i want when he in level 40 he will get admin level h

Last edited by 1M1e; 07-29-2021 at 10:18.
1M1e is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Old 07-29-2021 , 11:45   Re: Level + flag
Reply With Quote #6


PHP Code:
public client_putinserver(id)
{
    if(
crxranks_get_user_level(id) >= 40)
    {
        
SetVipFlagid )
    }
}

public 
crxranks_user_level_updated(idlevelbool:levelup)
{
    if(
level >= 40)
    {
        
SetVipFlagid )
    }
    

__________________
@Jailbreak Main Mod v2.6.6 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !


Last edited by Natsheh; 07-29-2021 at 11:47.
Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
The overrated maniac
Member
Join Date: Jun 2021
Location: Argentina
Old 07-29-2021 , 12:20   Re: Level + flag
Reply With Quote #7

PHP Code:

#include <amxmisc>
#include <crxranks>

#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "author"

public plugin_init() {
register_plugin(PLUGINVERSIONAUTHOR)

register_event("HLTV""new_round""a""1=0""2=0");
}

public 
new_round(id)
{
if(
crxranks_get_user_level(id) >= 40)
{
SetVipFlag(id)
}

}

SetVipFlagid )
{
set_user_flagsidADMIN_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(PLUGINVERSIONAUTHOR)

register_event("HLTV""new_round""a""1=0""2=0");
}

public 
new_round(id)
{
for(new 
0i<MAX_PLAYERSi++){
if(
crxranks_get_user_level(i) >= 40 && is_user_connected(i))
{
SetVipFlag(i)
}
}
}

SetVipFlagid )
{
set_user_flagsidADMIN_LEVEL_H );


Last edited by The overrated maniac; 07-29-2021 at 12:21.
The overrated maniac is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Old 07-29-2021 , 12:28   Re: Level + flag
Reply With Quote #8

I wouldn't recommend using that.
__________________
@Jailbreak Main Mod v2.6.6 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !

Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
1M1e
Member
Join Date: Mar 2020
Old 07-29-2021 , 12:37   Re: Level + flag
Reply With Quote #9

Quote:
Originally Posted by Natsheh View Post

PHP Code:
public client_putinserver(id)
{
    if(
crxranks_get_user_level(id) >= 40)
    {
        
SetVipFlagid )
    }
}

public 
crxranks_user_level_updated(idlevelbool:levelup)
{
    if(
level >= 40)
    {
        
SetVipFlagid )
    }
    

dose not work
1M1e is offline
1M1e
Member
Join Date: Mar 2020
Old 07-29-2021 , 12:38   Re: Level + flag
Reply With Quote #10

Quote:
Originally Posted by Natsheh View Post
I wouldn't recommend using that.
Why?
1M1e is offline
Reply


Thread Tools
Display Modes

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 11:56.


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