Raised This Month: $60 Target: $400
 15% 

[REQ] Vipmenu Help


Post New Thread Closed Thread   
 
Thread Tools Display Modes
Kellan123
AlliedModders Donor
Join Date: Aug 2012
Old 06-02-2013 , 07:00   Re: [REQ] Vipmenu Help
#11

Bump ? ...
Kellan123 is offline
Blizzard_87
AlliedModders Donor
Join Date: Oct 2012
Old 06-02-2013 , 07:15   Re: [REQ] Vipmenu Help
#12

use this https://forums.alliedmods.net/showpo...64&postcount=7

thats the same just better code.
__________________
Blizzard_87 is offline
Kellan123
AlliedModders Donor
Join Date: Aug 2012
Old 06-02-2013 , 09:02   Re: [REQ] Vipmenu Help
#13

Quote:
Originally Posted by Blizzard_87 View Post
use this https://forums.alliedmods.net/showpo...64&postcount=7

thats the same just better code.
Code bad.
Kellan123 is offline
EpicMonkey
buttmonkey
Join Date: Feb 2012
Old 06-02-2013 , 09:39   Re: [REQ] Vipmenu Help
#14

Quote:
Originally Posted by Kellan123 View Post
Code bad.
what do you mean by code bad?
EpicMonkey is offline
xPez
Member
Join Date: Apr 2013
Location: Sweden
Old 06-02-2013 , 15:14   Re: [REQ] Vipmenu Help
#15

Quote:
Originally Posted by EpicMonkey View Post
what do you mean by code bad?
He means that its a bad code.
xPez is offline
Send a message via Skype™ to xPez
Blizzard_87
AlliedModders Donor
Join Date: Oct 2012
Old 06-02-2013 , 16:24   Re: [REQ] Vipmenu Help
#16

Quote:
Originally Posted by Kellan123 View Post
Code bad.
Will if you think it's bad you must know how to code. Stop criticising people who helped you. And make it yourself.
__________________
Blizzard_87 is offline
TheDS1337
Veteran Member
Join Date: Jun 2012
Old 06-02-2013 , 17:11   Re: [REQ] Vipmenu Help
#17

How to know if it's a bad coded plugin and you don't know scripting ?
TheDS1337 is offline
Kellan123
AlliedModders Donor
Join Date: Aug 2012
Old 06-03-2013 , 05:08   Re: [REQ] Vipmenu Help
#18

Old is a lot better than new.

I do not like them >

#define ADMIN_VIP ADMIN_LEVEL_H

public plugin_init()
{
register_plugin("[HNS] VIP", "1.0", "Some New Author ;)")

register_clcmd("say /vipmenu", "VIPMenu");
register_clcmd("say_team /vipmenu", "VIPMenu");

register_logevent("event_new_round", 2, "1=Round_Start"); g_iMenu = menu_create("Vipmenu:", "menu_handler" );

menu_additem( g_iMenu, "Health" );
menu_additem( g_iMenu, "Weapon" );
menu_additem( g_iMenu, "Grenade" );
}

Last edited by YamiKaitou; 06-03-2013 at 14:36.
Kellan123 is offline
TheDS1337
Veteran Member
Join Date: Jun 2012
Old 06-03-2013 , 05:21   Re: [REQ] Vipmenu Help
#19

Code:
#include <amxmodx>
#include <cstrike>
#include <engine>
#include <fun>
	
#define ACCESSFLAG_MAX_LENGTH 2
 
// Settings file
new bool:has_used[33]   
 
// Access flags
new g_access_vip[ACCESSFLAG_MAX_LENGTH] = "t"
 
public plugin_init()
{
       register_plugin("[HNS] VIP", "1.0", "FY E1")
 
       register_clcmd( "say /vipmenu", "VIPMenu");
       register_clcmd( "say_team /vipmenu", "VIPMenu");
 
       register_logevent("event_new_round", 2, "1=Round_Start")	   
}
 
public VIPMenu( id ) 
{ 
    if(!has_used[id]) 
    {          
        new vip_menu = menu_create( "Vipmenu:", "menu_handler" ); 
        menu_additem( vip_menu, "Health", "1", 0 ); 
        menu_additem( vip_menu, "Weapon", "2", 0 ); 
        menu_additem( vip_menu, "Granade", "3", 0); 
 
        menu_setprop( vip_menu, MPROP_EXIT, MEXIT_ALL ); 
        menu_display( id, vip_menu, 0 ); 
    }
} 
 
public menu_handler( id, key ) 
{ 
	switch( key ) 
	{ 
		case 1: 
		{ 
			if (!(get_user_flags(id) & read_flags(g_access_vip)))
				return;
 
			set_user_health( id, 150 );
		} 
		case 2: 
		{ 
			if (!(get_user_flags(id) & read_flags(g_access_vip)))
				return;
 
			give_item( id, "weapon_usp" )
		} 
		case 3: 
		{ 
			if (!(get_user_flags(id) & read_flags(g_access_vip)))
				return;
 
			give_item( id, "weapon_hegrenade" )
			give_item( id, "weapon_flashbang" )
			give_item( id, "weapon_smokegrenade" )
		}
 
                has_used[id] = true; 
                menu_destroy( menu ); 
                return PLUGIN_HANDLED; 
	} 
        return PLUGIN_HANDLED;
}	
 
public event_new_round() 
        arrayset(has_used, false, 33)

Last edited by TheDS1337; 06-03-2013 at 05:24.
TheDS1337 is offline
Kellan123
AlliedModders Donor
Join Date: Aug 2012
Old 06-03-2013 , 05:46   Re: [REQ] Vipmenu Help
#20

Quote:
Originally Posted by DeagLe.Studio View Post
Code:
#include <amxmodx>
#include <cstrike>
#include <engine>
#include <fun>

#define ACCESSFLAG_MAX_LENGTH 2

// Settings file
new bool:has_used[33] 

// Access flags
new g_access_vip[ACCESSFLAG_MAX_LENGTH] = "t"

public plugin_init()
{
register_plugin("[HNS] VIP", "1.0", "FY E1")

register_clcmd( "say /vipmenu", "VIPMenu");
register_clcmd( "say_team /vipmenu", "VIPMenu");

register_logevent("event_new_round", 2, "1=Round_Start") 
}

public VIPMenu( id ) 
{ 
if(!has_used[id]) 
{ 
new vip_menu = menu_create( "Vipmenu:", "menu_handler" ); 
menu_additem( vip_menu, "Health", "1", 0 ); 
menu_additem( vip_menu, "Weapon", "2", 0 ); 
menu_additem( vip_menu, "Granade", "3", 0); 

menu_setprop( vip_menu, MPROP_EXIT, MEXIT_ALL ); 
menu_display( id, vip_menu, 0 ); 
}
} 

public menu_handler( id, key ) 
{ 
switch( key ) 
{ 
case 1: 
{ 
if (!(get_user_flags(id) & read_flags(g_access_vip)))
return;

set_user_health( id, 150 );
} 
case 2: 
{ 
if (!(get_user_flags(id) & read_flags(g_access_vip)))
return;

give_item( id, "weapon_usp" )
} 
case 3: 
{ 
if (!(get_user_flags(id) & read_flags(g_access_vip)))
return;

give_item( id, "weapon_hegrenade" )
give_item( id, "weapon_flashbang" )
give_item( id, "weapon_smokegrenade" )
}

has_used[id] = true; 
menu_destroy( menu ); 
return PLUGIN_HANDLED; 
} 
return PLUGIN_HANDLED;
} 

public event_new_round() 
arrayset(has_used, false, 33)
warning 209: function "menu_handler" should return a value
warning 209: function "menu_handler" should return a value
warning 209: function "menu_handler" should return a value
error 002: only a single statement (or expression) can follow each "case"
error 029: invalid expression, assumed zero
warning 215: expression has no effect
error 001: expected token: ";", but found "]"
fatal error 107: too many error messages on one line

Compilation aborted.
4 Errors.

Last edited by YamiKaitou; 06-03-2013 at 14:36.
Kellan123 is offline
Closed Thread


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 - 2020, vBulletin Solutions, Inc.
Theme made by Freecode