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

Special weapon (help)


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
alex123pavlov
Member
Join Date: Jun 2018
Location: Moscow
Old 06-10-2018 , 00:40   Special weapon (help)
Reply With Quote #1

Hi how to make so when you select the menu were issued the weapon for himself?

How to do if a player in the hands of ak 47 then give him extra health?

Sorry for the bad English I used the translator.
Code:
#include <sourcemod>

public OnPluginStart()
{
	RegConsoleCmd("wepmen", wepmen);
}

public Action:wepmen(client, args)
{
	if (client > 0 && args < 1) ShowMyMenu(client);
	return Plugin_Handled;
}

public Action:wepmen(client, args)
{
	if (client > 0 && args < 1) ShowMyPanel(client);
	return Plugin_Handled;
}

ShowMyPanel(client)
{
	new Handle:panel = CreatePanel();
	SetPanelTitle(panel, "Животные:\n \n");
	DrawPanelItem(panel, "AK47");
	DrawPanelItem(panel, "Выход");
	SendPanelToClient(panel, client, Select_Panel, 0);
	CloseHandle(panel);
	ClientCommand(client, "playgamesound items/nvg_off.wav");
}

public Select_Panel(Handle:panel, MenuAction:action, client, option)
{
	if (action == MenuAction_Select)
	{
		PrintToChat(client, "%d", option);
		if (option < 2) ShowMyPanel(client);
	}
}

Last edited by alex123pavlov; 06-10-2018 at 01:20.
alex123pavlov is offline
 



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 20:37.


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