Raised This Month: $51 Target: $400
 12% 

(HELP) For VIP Menu


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
ProGamerSS2
Junior Member
Join Date: May 2017
Old 05-21-2017 , 04:51   (HELP) For VIP Menu
Reply With Quote #1

I have create a cs 1.6 vipmenu and i need to make it only for ct who can help my ???

Last edited by ProGamerSS2; 05-21-2017 at 05:11.
ProGamerSS2 is offline
hmmmmm
Great Tester of Whatever
Join Date: Mar 2017
Location: ...
Old 05-21-2017 , 05:01   Re: (HELP) For VIP Menu
Reply With Quote #2

https://sm.alliedmods.net/new-api/clients/GetClientTeam
hmmmmm is offline
ProGamerSS2
Junior Member
Join Date: May 2017
Old 05-21-2017 , 05:08   Re: (HELP) For VIP Menu
Reply With Quote #3

Quote:
Originally Posted by hmmmmm View Post
no have for it to make it can you send my the code
ProGamerSS2 is offline
Arkarr
Veteran Member
Join Date: Sep 2012
Location: Just behind my PC screen
Old 05-21-2017 , 09:13   Re: (HELP) For VIP Menu
Reply With Quote #4

PHP Code:
if(GetClientTeam(client) != CS_TEAM_CT)
    return 
Plugin_Handled
__________________
Want to check my plugins ?

Last edited by Arkarr; 05-21-2017 at 09:13.
Arkarr is offline
Vaggelis
Senior Member
Join Date: May 2017
Old 05-21-2017 , 11:28   Re: (HELP) For VIP Menu
Reply With Quote #5

Add this before the menu_create,
this is sourcemod section btw

PHP Code:
if(cs_get_user_team(id) != CS_TEAM_CT)
{
    return 
PLUGIN_HANDLED

Vaggelis is offline
BassPower
Member
Join Date: Mar 2011
Location: Lithuania
Old 05-22-2017 , 05:57   Re: (HELP) For VIP Menu
Reply With Quote #6

how create vipmenu for vips in menu items enable : disable ?
no code have, just idea. Need help

Quote:
VIP menu
1. Enable on Spawn HE (Enable : Disable)
2. Enable on Spawn 2 FB (Enable : Disable)
0. Exit
BassPower is offline
Arkarr
Veteran Member
Join Date: Sep 2012
Location: Just behind my PC screen
Old 05-22-2017 , 11:59   Re: (HELP) For VIP Menu
Reply With Quote #7

Quote:
Originally Posted by BassPower View Post
how create vipmenu for vips in menu items enable : disable ?
no code have, just idea. Need help
Do a boolean. Check if the boolean is true/false, display according text.
__________________
Want to check my plugins ?
Arkarr is offline
hmmmmm
Great Tester of Whatever
Join Date: Mar 2017
Location: ...
Old 05-22-2017 , 18:27   Re: (HELP) For VIP Menu
Reply With Quote #8

PHP Code:
Format(C_Buffersizeof(C_Buffer), "Example: %s", (gB_SomeBoolean) ? "Enabled":"Disabled"); 
hmmmmm is offline
BassPower
Member
Join Date: Mar 2011
Location: Lithuania
Old 06-01-2017 , 06:33   Re: (HELP) For VIP Menu
Reply With Quote #9

Quote:
#define CHOICE1 "#choice1"
#define CHOICE2 "#choice2"

RegConsoleCmd("sm_vipmenu", Command_VIPmenu, "");

public Action Command_VIPmenu(int client, int args)
{
Menu menu = new Menu(VIPMenuHandler, MENU_ACTIONS_ALL);
menu.SetTitle("VIP Menu");
menu.AddItem("CHOICE1", "110HP Enabled":"Disabled", client ? ITEMDRAW_DEFAULT : ITEMDRAW_DISABLED);
menu.AddItem("CHOICE2", "BonusHP Enabled":"Disabled", client ? ITEMDRAW_DEFAULT : ITEMDRAW_DISABLED);
menu.ExitBackButton = false;
menu.ExitButton = true;
menu.Display(client, MENU_TIME_FOREVER);

return Plugin_Handled;
}

public int VIPMenuHandler(Menu menu, MenuAction action, int client, int param2) {

char name[MAX_NAME_LENGTH];
GetClientName(client, name, sizeof(name));

switch(action) {

case MenuAction_Start:
{
//CPrintToChat(client, "Opening menu...");
}
case MenuAction_Display:
{
char buffer[255];
Format(buffer, sizeof(buffer), "VIP Menu", client);

Panel panel = view_as<Panel>(param2);
panel.SetTitle(buffer);
//CPrintToChat(client, "Client %d was sent menu with panel %x", name, param2);
}
case MenuAction_Select:
{
char info[32];
menu.GetItem(param2, info, sizeof(info));
if(StrEqual(info, CHOICE1)) {
SetEntProp(client, Prop_Data, "m_iHealth", 110);
} else {
return 0;
}
if(StrEqual(info, CHOICE2)) {
//hp vampire code
} else {
return 0;
}
}
case MenuAction_DrawItem:
{
int style;
char info[32];
menu.GetItem(param2, info, sizeof(info), style);

if(StrEqual(info, CHOICE3)) {
return ITEMDRAW_DISABLED;
} else {
return style;
}
}
}
return 0;
}
Who can fix and paste here?
BassPower is offline
Divin12
Senior Member
Join Date: Nov 2011
Old 06-01-2017 , 07:29   Re: (HELP) For VIP Menu
Reply With Quote #10

You need to use event onclient spawn to set hp because in your plugin every time when you choose hp from menu it will give you 110 hp.
__________________
Divin12 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 03:08.


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