Raised This Month: $32 Target: $400
 8% 

Solved [REQ] VIP Plugin


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
kennzo
Junior Member
Join Date: Sep 2019
Old 09-17-2019 , 03:46   [REQ] VIP Plugin
Reply With Quote #1

I need a VIP Plugin with Flags

a = VIP CONNECTED MESSAGES
b = 100 ARMOR
c = UNLIMITED CLIP
d = 2 MULTI-JUMPS
e = PASSWORD ON NAME

i need .amxx file
i need vip.txt file

Last edited by kennzo; 09-30-2019 at 06:49.
kennzo is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 09-17-2019 , 07:17   Re: [REQ] VIP Plugin
Reply With Quote #2

Quote:
e = PASSWORD ON NAME
users.ini

Quote:
i need .amxx file
You will get a .sma file or code that you need to compile. Posting .amxx files is not allowed and you should ALWAYS compile your plugins locally.

Quote:
i need vip.txt file
What is that?
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
LearninG
Senior Member
Join Date: Apr 2019
Location: Iran
Old 09-17-2019 , 13:10   Re: [REQ] VIP Plugin
Reply With Quote #3

tested and works fine , however let me know if it had any issues.
Code:
#include <amxmodx> #include <engine> #include <fakemeta> #include <hamsandwich> #if AMXX_VERSION_NUM < 183     #define MAX_PLAYERS     32     #define client_disconnected     client_disconnect #endif #define FLAG_A            ADMIN_IMMUNITY #define FLAG_B            ADMIN_RESERVATION #define FLAG_C            ADMIN_KICK #define FLAG_D            ADMIN_BAN // #define UNLIMITED_NADES new bool:has_flag_d[MAX_PLAYERS + 1] new bool:dojump[MAX_PLAYERS + 1] new jumpnum[MAX_PLAYERS + 1] enum {     AmmoX_AmmoID = 1,     AmmoX_Ammount } enum {     ammo_none,     ammo_338magnum = 1, // 30     ammo_762nato, // 90     ammo_556natobox, // 200     ammo_556nato, // 90     ammo_buckshot, // 32     ammo_45acp, // 100     ammo_57mm, // 100     ammo_50ae, // 35     ammo_357sig, // 52     ammo_9mm, // 120     ammo_flashbang, // 2     ammo_hegrenade, // 1     ammo_smokegrenade, // 1     ammo_c4 // 1 } new const g_iMaxBpAmmo[] = {     0,     30,     90,     200,     90,     32,     100,     100,     35,     52,     120,     2,     1,     1,     1 } #define XO_PLAYER 5 #define m_rgpPlayerItems_0 376 new const VERSION[] = "1.0" public plugin_init() {     register_plugin("VIP Plugin" , VERSION , "Unknown")     RegisterHam(Ham_Spawn, "player", "OnCBasePlayer_Spawn_Post", true)     register_message(get_user_msgid("AmmoX"), "Message_AmmoX") } public OnCBasePlayer_Spawn_Post(id) {     if (is_user_alive(id) && get_user_flags(id) & FLAG_B)     {         set_pev(id , pev_armorvalue , get_user_armor(id) + float(100))     } } public Message_AmmoX(iMsgId, iMsgDest, id) {     new iAmmoID = get_msg_arg_int(AmmoX_AmmoID)     if( is_user_alive(id) && iAmmoID && get_user_flags(id) & FLAG_C )     {         new iMaxBpAmmo = g_iMaxBpAmmo[iAmmoID]         if( get_msg_arg_int(AmmoX_Ammount) < iMaxBpAmmo )         {             #if defined UNLIMITED_NADES             if( iAmmoID < ammo_c4 )             #else             if( iAmmoID <= ammo_9mm )             #endif             {                 set_msg_arg_int(AmmoX_Ammount, ARG_BYTE, iMaxBpAmmo)                 set_pdata_int(id, m_rgpPlayerItems_0 + iAmmoID, iMaxBpAmmo, XO_PLAYER)             }         }     } } public client_putinserver(id) {     if (get_user_flags(id) & FLAG_D)     {         has_flag_d[id] = true     }     if (get_user_flags(id) & FLAG_A)     {         static szName[33]         get_user_name(id , szName , charsmax(szName)         client_print(0, print_chat , "[AMXX] VIP player %s connected" , szName)     } } public client_disconnected(id) {     dojump[id]  = false     has_flag_d[id] = false     jumpnum[id] = 0 } public client_PreThink(id) {     if(!is_user_alive(id)) return PLUGIN_CONTINUE     if(!has_flag_d[id]) return PLUGIN_CONTINUE     new nbut = get_user_button(id)     new obut = get_user_oldbutton(id)     if((nbut & IN_JUMP) && !(get_entity_flags(id) & FL_ONGROUND) && !(obut & IN_JUMP))     {         if(jumpnum[id] < 1)         {             dojump[id] = true             jumpnum[id]++             return PLUGIN_CONTINUE         }     }     if((nbut & IN_JUMP) && (get_entity_flags(id) & FL_ONGROUND))     {         jumpnum[id] = 0         return PLUGIN_CONTINUE     }     return PLUGIN_CONTINUE } public client_PostThink(id) {     if(!is_user_alive(id)) return PLUGIN_CONTINUE     if(!has_flag_d[id]) return PLUGIN_CONTINUE     if(dojump[id] == true)     {         new Float:velocity[3]            entity_get_vector(id,EV_VEC_velocity,velocity)         velocity[2] = random_float(265.0,285.0)         entity_set_vector(id,EV_VEC_velocity,velocity)         dojump[id] = false         return PLUGIN_CONTINUE     }     return PLUGIN_CONTINUE }
Quote:
Originally Posted by kennzo View Post
e = PASSWORD ON NAME
set password in users.ini

Last edited by LearninG; 09-17-2019 at 15:30.
LearninG is offline
kennzo
Junior Member
Join Date: Sep 2019
Old 09-29-2019 , 05:38   Re: [REQ] VIP Plugin
Reply With Quote #4

Quote:
Originally Posted by LearninG View Post
tested and works fine , however let me know if it had any issues.
Code:
#include <amxmodx> #include <engine> #include <fakemeta> #include <hamsandwich> #if AMXX_VERSION_NUM < 183     #define MAX_PLAYERS     32     #define client_disconnected     client_disconnect #endif #define FLAG_A            ADMIN_IMMUNITY #define FLAG_B            ADMIN_RESERVATION #define FLAG_C            ADMIN_KICK #define FLAG_D            ADMIN_BAN // #define UNLIMITED_NADES new bool:has_flag_d[MAX_PLAYERS + 1] new bool:dojump[MAX_PLAYERS + 1] new jumpnum[MAX_PLAYERS + 1] enum {     AmmoX_AmmoID = 1,     AmmoX_Ammount } enum {     ammo_none,     ammo_338magnum = 1, // 30     ammo_762nato, // 90     ammo_556natobox, // 200     ammo_556nato, // 90     ammo_buckshot, // 32     ammo_45acp, // 100     ammo_57mm, // 100     ammo_50ae, // 35     ammo_357sig, // 52     ammo_9mm, // 120     ammo_flashbang, // 2     ammo_hegrenade, // 1     ammo_smokegrenade, // 1     ammo_c4 // 1 } new const g_iMaxBpAmmo[] = {     0,     30,     90,     200,     90,     32,     100,     100,     35,     52,     120,     2,     1,     1,     1 } #define XO_PLAYER 5 #define m_rgpPlayerItems_0 376 new const VERSION[] = "1.0" public plugin_init() {     register_plugin("VIP Plugin" , VERSION , "Unknown")     RegisterHam(Ham_Spawn, "player", "OnCBasePlayer_Spawn_Post", true)     register_message(get_user_msgid("AmmoX"), "Message_AmmoX") } public OnCBasePlayer_Spawn_Post(id) {     if (is_user_alive(id) && get_user_flags(id) & FLAG_B)     {         set_pev(id , pev_armorvalue , get_user_armor(id) + float(100))     } } public Message_AmmoX(iMsgId, iMsgDest, id) {     new iAmmoID = get_msg_arg_int(AmmoX_AmmoID)     if( is_user_alive(id) && iAmmoID && get_user_flags(id) & FLAG_C )     {         new iMaxBpAmmo = g_iMaxBpAmmo[iAmmoID]         if( get_msg_arg_int(AmmoX_Ammount) < iMaxBpAmmo )         {             #if defined UNLIMITED_NADES             if( iAmmoID < ammo_c4 )             #else             if( iAmmoID <= ammo_9mm )             #endif             {                 set_msg_arg_int(AmmoX_Ammount, ARG_BYTE, iMaxBpAmmo)                 set_pdata_int(id, m_rgpPlayerItems_0 + iAmmoID, iMaxBpAmmo, XO_PLAYER)             }         }     } } public client_putinserver(id) {     if (get_user_flags(id) & FLAG_D)     {         has_flag_d[id] = true     }     if (get_user_flags(id) & FLAG_A)     {         static szName[33]         get_user_name(id , szName , charsmax(szName)         client_print(0, print_chat , "[AMXX] VIP player %s connected" , szName)     } } public client_disconnected(id) {     dojump[id]  = false     has_flag_d[id] = false     jumpnum[id] = 0 } public client_PreThink(id) {     if(!is_user_alive(id)) return PLUGIN_CONTINUE     if(!has_flag_d[id]) return PLUGIN_CONTINUE     new nbut = get_user_button(id)     new obut = get_user_oldbutton(id)     if((nbut & IN_JUMP) && !(get_entity_flags(id) & FL_ONGROUND) && !(obut & IN_JUMP))     {         if(jumpnum[id] < 1)         {             dojump[id] = true             jumpnum[id]++             return PLUGIN_CONTINUE         }     }     if((nbut & IN_JUMP) && (get_entity_flags(id) & FL_ONGROUND))     {         jumpnum[id] = 0         return PLUGIN_CONTINUE     }     return PLUGIN_CONTINUE } public client_PostThink(id) {     if(!is_user_alive(id)) return PLUGIN_CONTINUE     if(!has_flag_d[id]) return PLUGIN_CONTINUE     if(dojump[id] == true)     {         new Float:velocity[3]            entity_get_vector(id,EV_VEC_velocity,velocity)         velocity[2] = random_float(265.0,285.0)         entity_set_vector(id,EV_VEC_velocity,velocity)         dojump[id] = false         return PLUGIN_CONTINUE     }     return PLUGIN_CONTINUE }

set password in users.ini
how to chage .sma files to .amxx because i don't have scripting folder
Your plugin failed to compile! Read the errors below:
Welcome to the AMX Mod X 1.8.1-300 Compiler.
Copyright (c) 1997-2006 ITB CompuPhase, AMX Mod X Team

/tmp/textan7XqT.sma(119 -- 120) : error 001: expected token: ",", but found "-identifier-"

1 Error.
Could not locate output file /home/groups/amxmodx/public_html/websc3/textan7XqT.amx (compile failed).

Last edited by kennzo; 09-29-2019 at 05:50.
kennzo is offline
SHIELD755
Veteran Member
Join Date: Feb 2018
Location: FROM MARVEL STUDIO
Old 09-29-2019 , 06:15   Re: [REQ] VIP Plugin
Reply With Quote #5

he just forgot one ")"


PHP Code:
#include <amxmodx>
#include <engine>
#include <fakemeta>
#include <hamsandwich>

#if AMXX_VERSION_NUM < 183
    #define MAX_PLAYERS     32
    #define client_disconnected     client_disconnect
#endif

#define FLAG_A            ADMIN_IMMUNITY
#define FLAG_B            ADMIN_RESERVATION
#define FLAG_C            ADMIN_KICK
#define FLAG_D            ADMIN_BAN

// #define UNLIMITED_NADES


new bool:has_flag_d[MAX_PLAYERS 1]


new 
bool:dojump[MAX_PLAYERS 1]
new 
jumpnum[MAX_PLAYERS 1]

enum
{
    
AmmoX_AmmoID 1,
    
AmmoX_Ammount
}

enum
{
    
ammo_none,
    
ammo_338magnum 1// 30
    
ammo_762nato// 90
    
ammo_556natobox// 200
    
ammo_556nato// 90
    
ammo_buckshot// 32
    
ammo_45acp// 100
    
ammo_57mm// 100
    
ammo_50ae// 35
    
ammo_357sig// 52
    
ammo_9mm// 120
    
ammo_flashbang// 2
    
ammo_hegrenade// 1
    
ammo_smokegrenade// 1
    
ammo_c4 // 1
}

new const 
g_iMaxBpAmmo[] = {
    
0,
    
30,
    
90,
    
200,
    
90,
    
32,
    
100,
    
100,
    
35,
    
52,
    
120,
    
2,
    
1,
    
1,
    
1
}

#define XO_PLAYER 5
#define m_rgpPlayerItems_0 376

new const VERSION[] = "1.0"

public plugin_init()
{
    
register_plugin("VIP Plugin" VERSION "Unknown")
    
RegisterHam(Ham_Spawn"player""OnCBasePlayer_Spawn_Post"true)
    
register_message(get_user_msgid("AmmoX"), "Message_AmmoX")
}

public 
OnCBasePlayer_Spawn_Post(id)
{
    if (
is_user_alive(id) && get_user_flags(id) & FLAG_B)
    {
        
set_pev(id pev_armorvalue get_user_armor(id) + float(100))
    }
}

public 
Message_AmmoX(iMsgIdiMsgDestid)
{
    new 
iAmmoID get_msg_arg_int(AmmoX_AmmoID)

    if( 
is_user_alive(id) && iAmmoID && get_user_flags(id) & FLAG_C )
    {
        new 
iMaxBpAmmo g_iMaxBpAmmo[iAmmoID]
        if( 
get_msg_arg_int(AmmoX_Ammount) < iMaxBpAmmo )
        {
            
#if defined UNLIMITED_NADES
            
if( iAmmoID ammo_c4 )
            
#else
            
if( iAmmoID <= ammo_9mm )
            
#endif
            
{
                
set_msg_arg_int(AmmoX_AmmountARG_BYTEiMaxBpAmmo)
                
set_pdata_int(idm_rgpPlayerItems_0 iAmmoIDiMaxBpAmmoXO_PLAYER)
            }
        }
    }
}

public 
client_putinserver(id)
{
    if (
get_user_flags(id) & FLAG_D)
    {
        
has_flag_d[id] = true
    
}
    if (
get_user_flags(id) & FLAG_A)
    {
        static 
szName[33]
        
get_user_name(id szName charsmax(szName))   //HERE FIXED 
        
client_print(0print_chat "[AMXX] VIP player %s connected" szName)
    }
}

public 
client_disconnected(id)
{
    
dojump[id]  = false
    has_flag_d
[id] = false
    jumpnum
[id] = 0
}


public 
client_PreThink(id)
{
    if(!
is_user_alive(id)) return PLUGIN_CONTINUE
    
if(!has_flag_d[id]) return PLUGIN_CONTINUE
    
new nbut get_user_button(id)
    new 
obut get_user_oldbutton(id)
    if((
nbut IN_JUMP) && !(get_entity_flags(id) & FL_ONGROUND) && !(obut IN_JUMP))
    {
        if(
jumpnum[id] < 1)
        {
            
dojump[id] = true
            jumpnum
[id]++
            return 
PLUGIN_CONTINUE
        
}
    }
    if((
nbut IN_JUMP) && (get_entity_flags(id) & FL_ONGROUND))
    {
        
jumpnum[id] = 0
        
return PLUGIN_CONTINUE
    
}
    return 
PLUGIN_CONTINUE
}

public 
client_PostThink(id)
{
    if(!
is_user_alive(id)) return PLUGIN_CONTINUE
    
if(!has_flag_d[id]) return PLUGIN_CONTINUE
    
if(dojump[id] == true)
    {
        new 
Float:velocity[3]   
        
entity_get_vector(id,EV_VEC_velocity,velocity)
        
velocity[2] = random_float(265.0,285.0)
        
entity_set_vector(id,EV_VEC_velocity,velocity)
        
dojump[id] = false
        
return PLUGIN_CONTINUE
    
}
    return 
PLUGIN_CONTINUE

__________________
SED LYF !!!

Last edited by SHIELD755; 09-29-2019 at 06:16.
SHIELD755 is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 09-29-2019 , 07:01   Re: [REQ] VIP Plugin
Reply With Quote #6

How can you not have a scripting folder??? Don't ask help for problems if you didn't download AMXX from the official website.
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
kennzo
Junior Member
Join Date: Sep 2019
Old 09-29-2019 , 07:19   Re: [REQ] VIP Plugin
Reply With Quote #7

hmm i had it now
kennzo 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 04:12.


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