AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Help About simple vip plugin (https://forums.alliedmods.net/showthread.php?t=312937)

Ali0mer 12-21-2018 14:37

Help About simple vip plugin
 
Hello Guys,

I need help to create a .ini file for vip in this plugin
Like users.ini different file where i can add vip for players

Code Below please help me!

Code:

#include <amxmodx>
#include <amxmisc>
#include <fakemeta>
#include <zombieplague>
#include <hamsandwich>


#define ADMIN_FLAG ADMIN_LEVEL_H

enum
{
    SCOREATTRIB_ARG_PLAYERID = 1,
    SCOREATTRIB_ARG_FLAGS
};

enum ( <<= 1 )
{
    SCOREATTRIB_FLAG_NONE = 0,
    SCOREATTRIB_FLAG_DEAD = 1,
    SCOREATTRIB_FLAG_BOMB,
    SCOREATTRIB_FLAG_VIP
};

new g_iStartHealth, g_iStartArmor

public plugin_init()
{
    register_plugin("Simple VIP", "0.1", "Alliedmodder")
   
    RegisterHam(Ham_Spawn, "player", "OnPlayerSpawnPost", 1)
    RegisterHam(Ham_Killed, "player", "OnPlayerKilled")

    g_iStartHealth = register_cvar("sv_start_HP", "150")
    g_iStartArmor = register_cvar("sv_start_armor", "100")
   
    register_message( get_user_msgid( "ScoreAttrib" ), "MessageScoreAttrib" );
}

public OnPlayerSpawnPost(id)
{
    if(is_user_alive(id) && get_user_flags(id) & ADMIN_FLAG)
    {
        set_pev(id, pev_health, get_pcvar_float(g_iStartHealth))
        set_pev(id, pev_armorvalue, get_pcvar_float(g_iStartArmor))
    }
}

public OnPlayerKilled(victim, attacker)
{
    if(!is_user_alive(attacker) || victim == attacker)
        return
}


public MessageScoreAttrib( iMsgId, iDest, iReceiver )
{
        new iPlayer = get_msg_arg_int( SCOREATTRIB_ARG_PLAYERID );
       
        if( access( iPlayer, ADMIN_FLAG ) )
        {
            set_msg_arg_int( SCOREATTRIB_ARG_FLAGS, ARG_BYTE, SCOREATTRIB_FLAG_VIP );
        }
}


OciXCrom 12-21-2018 15:49

Re: Help About simple vip plugin
 
What's the issue with adding the VIP flag in users.ini?
What's the point of using a separate file for something that is already doable with default AMXX?

Ali0mer 12-22-2018 01:59

Re: Help About simple vip plugin
 
Hii oci

If you say I don’t need a separate file
Then can you help me adding a model into this plugin? Model for vip

Natsheh 12-22-2018 03:33

Re: Help About simple vip plugin
 
If you wait a bit i will release a vip system with alot of features + amxbans vip settings.

Ali0mer 12-22-2018 06:54

Re: Help About simple vip plugin
 
I just want a Smiple plugin not with a lot of features
Thats why i use this plugin in first post!

But my problem is i need to Add a model in it

Natsheh 12-22-2018 07:48

Re: Help About simple vip plugin
 
My problem is i cant release something redundant.
If you don't want to be patient you can wait for others to help or look up for tutorials and fix it yourself.

OciXCrom 12-22-2018 08:36

Re: Help About simple vip plugin
 
Then go ahead and add it. This is the scripting help section, so you script by yourself.
How is creating an .ini file going to help with the model?...

Nutu_ 12-22-2018 09:15

Re: Help About simple vip plugin
 
you can add another plugin for VIP Model, no need to merge :P

Ali0mer 12-22-2018 14:29

Re: Help About simple vip plugin
 
Quote:

Originally Posted by OciXCrom (Post 2630506)
Then go ahead and add it. This is the scripting help section, so you script by yourself.
How is creating an .ini file going to help with the model?...

You are useless
Just talking not helping if you can’t help then you don’t need to reply on my topic

Ali0mer 12-22-2018 14:30

Re: Help About simple vip plugin
 
Quote:

Originally Posted by Nutu_ (Post 2630510)
you can add another plugin for VIP Model, no need to merge :P

Thank you my friend


All times are GMT -4. The time now is 01:04.

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