Raised This Month: $32 Target: $400
 8% 

Solved How To show menu auto in spawn [HELP]


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
LiZou Mapper
Member
Join Date: Oct 2018
Location: Morocco
Old 11-20-2018 , 15:16   How To show menu auto in spawn [HELP]
Reply With Quote #1

How to show menu auto in spawn
I want show this menu auto in spawn

Thanks in advance

PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <fakemeta>
#include <hamsandwich>
#include <cstrike>
#include <fun>

#define PLUGIN "Gun CSDM LZ"
#define VERSION "1.0"
#define AUTHOR "LZ MAPPER"

public plugin_init() {

    
register_clcmd("menu_guns""cmdMenu");
    
register_event("HLTV""Event_HLTV_NewRound""a""1=0""2=0"); //New round start
    
    
RegisterHam(Ham_Spawn"player""fwdPlayerSpawn"1); //Player Spawn Post
    
    
register_plugin(PLUGINVERSIONAUTHOR);

}

public 
Event_HLTV_NewRound()
{
    
    
client_cmd(0"menu_guns")
    
}

public 
fwdPlayerSpawn(id){

    
client_cmd(0"menu_guns")

}

public 
cmdMenu(id) {
new 
i_Menu menu_create("\r[WeaPonS] \yBy: LiZou Mapper""menu_handler");
menu_additem(i_Menu"\wNeedLER""1"0);
menu_additem(i_Menu"\wJanus-3""2"0);
menu_additem(i_Menu"\wJanus-11""3"0);
menu_additem(i_Menu"\wBalRoG-XI""4"0);
menu_additem(i_Menu"\wOICW""5"0);
menu_additem(i_Menu"\wPlasmaGun""6"0);
menu_additem(i_Menu"\wCharger-7""7"0);
menu_additem(i_Menu"\wThunderBolt""8"0);
menu_additem(i_Menu"\wRail Cannon""9"0);
menu_additem(i_Menu"\wThanatos-7 - \r[VIP]""10"ADMIN_LEVEL_H);
menu_setprop(i_MenuMPROP_NEXTNAME"Next");
menu_setprop(i_MenuMPROP_BACKNAME"Back");
menu_setprop(i_MenuMPROP_EXITNAME"Exit");

menu_display(idi_Menu0)
}

//public client_authorized(id)
//{
//client_cmd(id, "bind ^"M^" ^"menu^"")
//}

public menu_handler(idmenuitem) {
if( 
item ) return PLUGIN_CONTINUE;
new 
cmd[3], accesscallback;
menu_item_getinfo(menuitemaccesscmd,2,_,_callback);
new 
Choise str_to_num(cmd)
switch (
Choise) {
case 
1: {
client_cmd(id"needler ; pps")
}
case 
2: {
client_cmd(id"janus3 ; pps")
}
case 
3: {
client_cmd(id"janus11 ; pps")
}
case 
4: {
client_cmd(id"balrog11 ; pps")
}
case 
5: {
client_cmd(id"oicw ; pps")
}
case 
6: {
client_cmd(id"plasmagun ; pps")
}
case 
7: {
client_cmd(id"c7 ; pps")

case 
8: {
client_cmd(id"thunderbolt ; pps")

case 
9: {
client_cmd(id"railcannon ; pps")

case 
10: {
client_cmd(id"thanatos7 ; pps")

}
return 
PLUGIN_HANDLED;

/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1036\\ f0\\ fs16 \n\\ par }
*/ 
__________________

-------------
My Maps !
Zombie Escape Mod !
-------------


Last edited by LiZou Mapper; 06-21-2022 at 21:02.
LiZou Mapper is offline
Old 11-20-2018, 15:28
Whai
This message has been deleted by DarkDeviL. Reason: Report, don't reply.
HvG Community
AlliedModders Donor
Join Date: Sep 2012
Old 11-21-2018 , 05:13   Re: How To show menu auto in spawn [HELP]
Reply With Quote #2

Fake Client command that triggers menu when player spawns
Its 4 lines of code.


But I don't know whats FakeClientCommand equivilent for pawn.
HvG Community is offline
eyal282
Veteran Member
Join Date: Aug 2011
Old 11-21-2018 , 05:20   Re: How To show menu auto in spawn [HELP]
Reply With Quote #3

Some plugins I worked with in amxx forced pressing 0. Try making the menu go after 0.2 seconds with set_task
__________________
I am available to make plugins for pay.

Discord: Eyal282#1334
eyal282 is offline
iceeedr
Veteran Member
Join Date: Apr 2017
Location: Brazil
Old 11-23-2018 , 07:16   Re: How To show menu auto in spawn [HELP]
Reply With Quote #4

PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <fakemeta>
#include <hamsandwich>
#include <cstrike>
#include <fun>

#define PLUGIN "Gun CSDM LZ"
#define VERSION "1.0"
#define AUTHOR "LZ MAPPER"

public plugin_init() {

    
register_clcmd("menu_guns""cmdMenu");
    
    
RegisterHam(Ham_Spawn"player""fwdPlayerSpawn"1); //Player Spawn Post
    
    
register_plugin(PLUGINVERSIONAUTHOR);

}


public 
fwdPlayerSpawn(id){

    
set_task(0.5"cmdMenu"id)

}

public 
cmdMenu(id) {
new 
i_Menu menu_create("\r[WeaPonS] \yBy: LiZou Mapper""menu_handler");
menu_additem(i_Menu"\wNeedLER""1"0);
menu_additem(i_Menu"\wJanus-3""2"0);
menu_additem(i_Menu"\wJanus-11""3"0);
menu_additem(i_Menu"\wBalRoG-XI""4"0);
menu_additem(i_Menu"\wOICW""5"0);
menu_additem(i_Menu"\wPlasmaGun""6"0);
menu_additem(i_Menu"\wCharger-7""7"0);
menu_additem(i_Menu"\wThunderBolt""8"0);
menu_additem(i_Menu"\wRail Cannon""9"0);
menu_additem(i_Menu"\wThanatos-7 - \r[VIP]""10"ADMIN_LEVEL_H);
menu_setprop(i_MenuMPROP_NEXTNAME"Next");
menu_setprop(i_MenuMPROP_BACKNAME"Back");
menu_setprop(i_MenuMPROP_EXITNAME"Exit");

menu_display(idi_Menu0)
}

//public client_authorized(id)
//{
//client_cmd(id, "bind ^"M^" ^"menu^"")
//}

public menu_handler(idmenuitem) {
if( 
item ) return PLUGIN_CONTINUE;
new 
cmd[3], accesscallback;
menu_item_getinfo(menuitemaccesscmd,2,_,_callback);
new 
Choise str_to_num(cmd)
switch (
Choise) {
case 
1: {
client_cmd(id"needler ; pps")
}
case 
2: {
client_cmd(id"janus3 ; pps")
}
case 
3: {
client_cmd(id"janus11 ; pps")
}
case 
4: {
client_cmd(id"balrog11 ; pps")
}
case 
5: {
client_cmd(id"oicw ; pps")
}
case 
6: {
client_cmd(id"plasmagun ; pps")
}
case 
7: {
client_cmd(id"c7 ; pps")

case 
8: {
client_cmd(id"thunderbolt ; pps")

case 
9: {
client_cmd(id"railcannon ; pps")

case 
10: {
client_cmd(id"thanatos7 ; pps")

}
return 
PLUGIN_HANDLED;

/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1036\\ f0\\ fs16 \n\\ par }
*/ 
__________________


Quote:
Originally Posted by fysiks View Post
Please stop trying to help. You appear to just be posting random stuff. Wait until you actually understand more about AMX Mod X and how the game works.
https://iceeedr.com.br/

Last edited by iceeedr; 11-23-2018 at 07:23.
iceeedr is offline
Send a message via Skype™ to iceeedr
LiZou Mapper
Member
Join Date: Oct 2018
Location: Morocco
Old 11-24-2018 , 13:08   Re: How To show menu auto in spawn [HELP]
Reply With Quote #5

Thanks all for Help
:')
__________________

-------------
My Maps !
Zombie Escape Mod !
-------------

LiZou Mapper 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 07:14.


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