AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   General (https://forums.alliedmods.net/forumdisplay.php?f=58)
-   -   Special weapon (help) (https://forums.alliedmods.net/showthread.php?t=308194)

alex123pavlov 06-10-2018 00:40

Special weapon (help)
 
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);
        }
}


mug1wara 06-12-2018 06:04

Re: Special weapon (help)
 
I'm having a hard time understanding what you're trying to say. But let me get this right, you want so when a player selects the desired weapon, it will be given to the player? Also when selecting a AK-47, the player will be given extra health? If so, how much health?

alex123pavlov 06-14-2018 02:47

Re: Special weapon (help)
 
Quote:

Originally Posted by mug1wara (Post 2596498)
I'm having a hard time understanding what you're trying to say. But let me get this right, you want so when a player selects the desired weapon, it will be given to the player? Also when selecting a AK-47, the player will be given extra health? If so, how much health?

Yeah, right. 100 health


All times are GMT -4. The time now is 13:47.

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