AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   menu help (https://forums.alliedmods.net/showthread.php?t=107919)

Doc-Holiday 10-31-2009 21:51

menu help
 
Using the new style menus

I can instead of using cl cmds to bring up the menu i can do something like


PHP Code:

public PlayerSpawn(id)
{
     
set_task(0.5"menu"id)


That would do it on player spawn right?

Also is there away to see if a user has a secondary weapon?

Alucard^ 10-31-2009 22:03

Re: menu help
 
Code:
#include <amxmodx> #define PLUGIN    "New Plugin" #define AUTHOR    "Alucard" #define VERSION    "1.0" new Menu public plugin_init() {     register_plugin(PLUGIN, VERSION, AUTHOR)         RegisterHam(Ham_Spawn, "player", "HookSpawnPL", 1)         Menu = menu_create("\ySomething here?", "HandleSpawnMenu")         menu_additem(Menu, "\wYes", "1", 0)     menu_additem(Menu, "\wNo", "2", 0)         menu_setprop(Menu, MPROP_EXIT, MEXIT_NEVER) } public HookSpawnPL(id) {     menu_display(id, Menu) } public HandleSpawnMenu(id, Menu, item) {     new iData[6]     new iAccess     new iCallback     new iName[64]         menu_item_getinfo(Menu, item, iAccess, iData, 5, iName, 63, iCallback)         switch(str_to_num(iData) )     {         case 1:         {             // Oh no!! you pressed 'Yes'         }         case 2:         {             // Oh no!! you pressed 'No'         }     }     return PLUGIN_HANDLED }

Doc-Holiday 10-31-2009 22:17

Re: menu help
 
Quote:

Originally Posted by Hx7r (Post 977298)
#include <hamsandwich>


LOL yeah i got that part...

Is there a way to get if player Hassecond like HasPrim


All times are GMT -4. The time now is 17:48.

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