Raised This Month: $ Target: $400
 0% 

[REQ] Vip menu for Cod MW4


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
waizedzzy
Member
Join Date: May 2016
Location: France
Old 06-01-2016 , 06:38   [REQ] Vip menu for Cod MW4
Reply With Quote #1

Hello guys,

I'd like to have a Vip menu for Cod mod MW4
I've 'searched' and 'finded' some plugins for it but they are bad and in another language.

I'll love to have for vip menu where we need to say:
/vm or /vipmenu .

In the vip menu id like:
150 HP
200 Armour
Gravity
Unlimited Clip

Can you guys add skin for vip in that plugin please.


Thank you so much in advance.
__________________
Invincible Wxx ^.^
waizedzzy is offline
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
Old 06-01-2016 , 10:55   Re: [REQ] Vip menu for Cod MW4
Reply With Quote #2

what do you mean with unlimited clip?
__________________
Napoleon_be is online now
Send a message via Skype™ to Napoleon_be
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
Old 06-01-2016 , 11:31   Re: [REQ] Vip menu for Cod MW4
Reply With Quote #3

untested, i will add "unlimited clip" and the model later on if i know what you're talking about.

Also, LMK if it works or not, will edit if not.

PHP Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>
#include <fun>
#include <hamsandwich>

#define PLUGIN "Cod4MW1 Mod VIP"
#define VERSION "1.0"
#define AUTHOR "NapoleoN#"

#define VIP_FLAG ADMIN_LEVEL_H

new bool:hasUsed[33]

new const 
szMenuItems[][] = {
    
"150 HP",
    
"200 Armor",
    
"Gravity",
    
//"Unlimited Clip"
}


public 
plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
register_clcmd("say /vm""vipmenu")
    
register_clcmd("say /vipmenu""vipmenu")
    
RegisterHam(Ham_Spawn"player""FwPlayerSpawnPost"1)
}

public 
vipmenu(id) {
    if(
is_user_alive(id) && get_user_flags(id) & VIP_FLAG) {
        new 
menu menu_create("[VIP] Menu""vip_handler")
        
        new 
szTemp[555 char]
        for(new 
isizeof(szMenuItems); i++) {
            
formatex(szTempsizeof(szTemp) - 1"%s"szMenuItems[i])
            
menu_additem(menuszTemp)
        }
        
menu_display(idmenu)
    }
}

public 
vip_handler(idmenuitem) {
    if(
item == MENU_EXIT) {
        
menu_destroy(menu)
        return 
PLUGIN_HANDLED
    
}
    
    if(
is_user_alive(id) && hasUsed[id] == false) {
        switch(
item) {
            case 
0: {
                
set_user_health(id150)
                
hasUsed[id] = true
            
}
            case 
1: {
                
set_user_armor(id150)
                
hasUsed[id] = true
            
}
            
            case 
2: {
                
set_user_gravity(id0.6)
                
hasUsed[id] = true
            
}
            
// case 3: GiveUserUnlimitedClip(id)
        
}
    }
    return 
PLUGIN_HANDLED
}

public 
FwPlayerSpawnPost(id) {
    
hasUsed[id] = false

__________________

Last edited by Napoleon_be; 06-02-2016 at 03:41.
Napoleon_be is online now
Send a message via Skype™ to Napoleon_be
waizedzzy
Member
Join Date: May 2016
Location: France
Old 06-01-2016 , 13:37   Re: [REQ] Vip menu for Cod MW4
Reply With Quote #4

Quote:
Originally Posted by Napoleon_be View Post
untested, i will add "unlimited clip" and the model later on if i know what you're talking about.

Also, LMK if it works or not, will edit if not.

PHP Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>
#include <fun>
#include <hamsandwich>

#define PLUGIN "Cod4MW1 Mod VIP"
#define VERSION "1.0"
#define AUTHOR "NapoleoN#"

#define VIP_FLAG ADMIN_LEVEL_H

new bool:hasUsed[33]

new const 
szMenuItems[] = {
    
"150 HP",
    
"200 Armor",
    
"Gravity",
    
//"Unlimited Clip"
}


public 
plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
register_clcmd("say /vm""vipmenu")
    
register_clcmd("say /vipmenu""vipmenu")
    
RegisterHam(Ham_Spawn"player""FwPlayerSpawnPost"1)
}

public 
vipmenu(id) {
    if(
is_user_alive(id) && get_user_flags(id) & VIP_FLAG) {
        new 
menu menu_create("[VIP] Menu""vip_handler")
        
        new 
szTemp[555 char]
        for(new 
isizeof(szMenuItems); i++) {
            
formatex(szTempsizeof(szTemp) - 1"%s"szMenuItems[i])
            
menu_additem(menuszTemp)
        }
        
menu_display(idmenu)
    }
}

public 
vip_handler(idmenuitem) {
    if(
item == MENU_EXIT) {
        
menu_destroy(menu)
        return 
PLUGIN_HANDLED
    
}
    
    if(
is_user_alive(id) && hasUsed[id] == false) {
        switch(
item) {
            case 
0: {
                
set_user_health(id150)
                
hasUsed[id] = true
            
}
            case 
1: {
                
set_user_armor(id150)
                
hasUsed[id] = true
            
}
            
            case 
2: {
                
set_user_gravity(id0.6)
                
hasUsed[id] = true
            
}
            
// case 3: GiveUserUnlimitedClip(id)
        
}
    }
    return 
PLUGIN_HANDLED
}

public 
FwPlayerSpawnPost(id) {
    
hasUsed[id] = false

I mean unlimited ammo without reloading.
Thanks.
__________________
Invincible Wxx ^.^
waizedzzy is offline
waizedzzy
Member
Join Date: May 2016
Location: France
Old 06-01-2016 , 14:33   Re: [REQ] Vip menu for Cod MW4
Reply With Quote #5

This plugins dont work to much.
When u want to choose that shows me like that:

1.150 HP
2.50 HP
3.0 HP
4.HP

Then its for all choices like that in others next pages...
(I cant upload any pictures because the filesize its bigger.)
__________________
Invincible Wxx ^.^
waizedzzy is offline
EFFx
Veteran Member
Join Date: Feb 2016
Location: São Paulo, Brasil
Old 06-01-2016 , 17:17   Re: [REQ] Vip menu for Cod MW4
Reply With Quote #6

1.
PHP Code:
new const szMenuItems[] = { 


->

PHP Code:
new const szMenuItems[][] = { 


2.
PHP Code:
new szTemp[555 char


->

PHP Code:
new szTemp[85

3.
PHP Code:
formatex(szTemp,sizeof(szTemp) - 1,"%s",szMenuItems[i]) 


->

PHP Code:
formatex(szTemp,charsmax(szTemp),"%s",szMenuItems[i]) 


4. https://forums.alliedmods.net/showthread.php?t=26991
__________________
• Ranking System • AutoMix 5vs5 System
• Web Ban System • Plugins for free

____________________________________________
For private works:
• Discord: EFFEXo#8850 • Steam: EFFEXo

Last edited by EFFx; 06-01-2016 at 17:20.
EFFx is offline
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
Old 06-02-2016 , 03:42   Re: [REQ] Vip menu for Cod MW4
Reply With Quote #7

Quote:
Originally Posted by EFFx View Post
1.
PHP Code:
new const szMenuItems[] = { 


->

PHP Code:
new const szMenuItems[][] = { 


2.
PHP Code:
new szTemp[555 char


->

PHP Code:
new szTemp[85

3.
PHP Code:
formatex(szTemp,sizeof(szTemp) - 1,"%s",szMenuItems[i]) 


->

PHP Code:
formatex(szTemp,charsmax(szTemp),"%s",szMenuItems[i]) 


4. https://forums.alliedmods.net/showthread.php?t=26991
1) Fixed.
2) That doesn't matter at all tbh..
3) idem dito, it has the same meaning.

Quote:
Originally Posted by waizedzzy View Post
This plugins dont work to much.
When u want to choose that shows me like that:

1.150 HP
2.50 HP
3.0 HP
4.HP

Then its for all choices like that in others next pages...
(I cant upload any pictures because the filesize its bigger.)
@waizedzzy, The problem should be fixed now. Also, like EFFx said, you can use the plugin he suggested. You can change the flags in that plugin by a cvar.
__________________

Last edited by Napoleon_be; 06-02-2016 at 03:47.
Napoleon_be is online now
Send a message via Skype™ to Napoleon_be
siriusmd99
Veteran Member
Join Date: Oct 2013
Location: Republic of Moldova
Old 06-02-2016 , 14:12   Re: [REQ] Vip menu for Cod MW4
Reply With Quote #8

Vip Menu:

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

#define PLUGIN "Vip Menu"
#define VERSION "1.0"
#define AUTHOR "siriusmd99"

#define is_vip(%1) get_user_flags(%1) & ADMIN_LEVEL_H

#define OFFSET_CLIPAMMO        51
#define OFFSET_LINUX_WEAPONS    4
#define fm_cs_set_weapon_ammo(%1,%2)    set_pdata_int(%1, OFFSET_CLIPAMMO, %2, OFFSET_LINUX_WEAPONS)

#define m_pActiveItem 373

new const vip_model_t[] = "models/player/vip_t/vip_t.mdl"
new const vip_model_ct[] = "models/player/vip_ct/vip_ct.mdl"

new hasUsed[33];

const 
NOCLIP_WPN_BS    = ((1<<CSW_HEGRENADE)|(1<<CSW_SMOKEGRENADE)|(1<<CSW_FLASHBANG)|(1<<CSW_KNIFE)|(1<<CSW_C4))

new const 
g_MaxClipAmmo[] = 
{
    
0,
    
13
    
0,
    
10
    
0,  
    
7,  
    
0,  
    
30,
    
30
    
0,  
    
15,
    
20,
    
25,
    
30
    
35
    
25
    
12,
    
20,
    
10
    
30,
    
100,
    
8,  
    
30
    
30,
    
20
    
0,  
    
7,  
    
30
    
30
    
0,  
    
50
}

public 
plugin_init() 
{
   
register_pluginPLUGIN VERSION AUTHOR );
   
register_clcmd("say /vm""vip_menu")
   
register_clcmd("say /vipmenu""vip_menu")
   
register_event("CurWeapon" "Event_CurWeapon" "be" "1=1" );
   
RegisterHam(Ham_Spawn"player""Player_Spawn_Post"1)
}

public 
plugin_precache(){
   new 
szModel64 ];
   
formatexszModel63"models/player/%s/%s.mdl"vip_model_ctvip_model_ct );
   
engfuncEngFunc_PrecacheModelszModel );
   
formatexszModel63"models/player/%s/%s.mdl"vip_model_ctvip_model_ct );
   
engfuncEngFunc_PrecacheModelszModel );
}    



public 
Player_Spawn_Post(id){
    if(
is_vip(id)){
      
hasUsed[id] = 0;
      
set_task(1.0"model_set"id)  
    }
}  

public 
model_set(id){

    if(
is_user_alive(id)){
    
        switch(
cs_get_user_team(id)){
          case 
CS_TEAM_Tcs_set_user_model(idvip_model_t)
          case 
CS_TEAM_CTcs_set_user_model(idvip_model_ct)
          default: 
cs_reset_user_model(id)
        }
    }    
}

public 
vip_menu(id) {
    
    if(
is_user_alive(id) && is_vip(id) && !hasUsed[id]) {
        
        new 
menu menu_create("[VIP] Menu""vip_menu_handler");
        
        
menu_additem(menu"150 HP");
        
menu_additem(menu"200 Armour");
        
menu_additem(menu"Gravity");
        
menu_additem(menu"Unlimited Clip");
        
        
menu_setpropmenuMPROP_EXITMEXIT_ALL );
        
        
menu_displayidmenu);
    }
    
}

public 
vip_menu_handler(idmenuitem) {
    
    if(
is_user_alive(id)) {
        switch(
item) {
            case 
0: {
                
set_pev(idpev_healthpev(idpev_health) + 150.0)
                
hasUsed[id] = 1;
            }
            case 
1: {
                
set_pev(idpev_armorvaluepev(idpev_armorvalue) + 200.0)
                
hasUsed[id] = 1;
            }
            case 
2: {
                
set_pev(idpev_gravity0.6)
                
hasUsed[id] = 1;
            }
            case 
3hasUsed[id] = 2;
            }
    }
    
    
menu_destroy(menu)
    return 
PLUGIN_HANDLED
}

public 
Event_CurWeaponid )
{
    if(
hasUsed[id] == 2){
        new 
iWeapon read_data(2)
        if( !( 
NOCLIP_WPN_BS & (1<<iWeapon) ) )
            
fm_cs_set_weapon_ammoget_pdata_cbase(idm_pActiveItem) , g_MaxClipAmmoiWeapon ] ) 
    }

Here is vip flag you can change :

PHP Code:
#define is_vip(%1) get_user_flags(%1) & ADMIN_LEVEL_H 
ADMIN_LEVEL_H is flag "t", if your vip flag is not "t" then change it to your flag.

Here you will change model for CT and Terrorist VIP:

PHP Code:
new const vip_model_t[] = "models/player/vip_t/vip_t.mdl"
new const vip_model_ct[] = "models/player/vip_ct/vip_ct.mdl" 

Last edited by siriusmd99; 06-02-2016 at 15:58.
siriusmd99 is offline
waizedzzy
Member
Join Date: May 2016
Location: France
Old 06-02-2016 , 14:14   Re: [REQ] Vip menu for Cod MW4
Reply With Quote #9

@All
Thanks guys for helping me .
__________________
Invincible Wxx ^.^
waizedzzy is offline
waizedzzy
Member
Join Date: May 2016
Location: France
Old 06-02-2016 , 14:50   Re: [REQ] Vip menu for Cod MW4
Reply With Quote #10

@siriusmd99
I have tried it it was good but can you make give+ and not set because when I have 100 hp and chose 150 hp that's set me 150 and not 250.
Ex: So if i have 240 hp that will give me 150 hp+ and my hp will be 390 hp.
The same for Armour please.
Hope you understand me. Thanks in advance.
__________________
Invincible Wxx ^.^
waizedzzy is offline
Reply



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 10:46.


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