Raised This Month: $7 Target: $400
 1% 

Solved I wanna show Weapons Menu when player Spawn


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
LiZou Mapper
Member
Join Date: Oct 2018
Location: Morocco
Old 11-16-2018 , 14:54   I wanna show Weapons Menu when player Spawn
Reply With Quote #1

Solved!!

PHP Code:
#include <amxmodx>

public plugin_init() {

    
register_clcmd("guns""cmdMenu");
    
    
    
register_plugin("""""");

}

public 
cmdMenu(id) {
new 
i_Menu menu_create("\r[WeaPonS] \y: 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"\wThanatos-9""8"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"thanatos7; pps")

}
return 
PLUGIN_HANDLED;

__________________

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


Last edited by LiZou Mapper; 06-21-2022 at 21:35. Reason: correction :D
LiZou Mapper is offline
_Black_Yuzia_
Member
Join Date: Oct 2017
Old 11-16-2018 , 15:31   Re: Please Please Read Me [I Need Help]
Reply With Quote #2

You don't need write in name of topic words like a "Please, check and help me etc"
Name of topic that short question or problem.
For example: Dead menu list [plugin:Meniu BB]

Last edited by _Black_Yuzia_; 11-16-2018 at 15:31.
_Black_Yuzia_ is offline
Relaxing
AlliedModders Donor
Join Date: Jun 2016
Location: White Plains
Old 11-16-2018 , 16:03   Re: Please Please Read Me [I Need Help]
Reply With Quote #3

You should better call the function that gives player the weapons he chose rather than calling a command which can be easily spammed to get all weapons at once.
Consider changing the thread's name to prevent moderators from sending this to trash.
__________________

Last edited by Relaxing; 11-16-2018 at 16:05.
Relaxing is offline
Old 11-17-2018, 06:34
LiZou Mapper
This message has been deleted by LiZou Mapper. Reason: I understand!!
Relaxing
AlliedModders Donor
Join Date: Jun 2016
Location: White Plains
Old 11-17-2018 , 07:33   Re: Please Please Read Me [I Need Help]
Reply With Quote #4

You can do that by following up this tutorial.
step by step
__________________
Relaxing is offline
Reply


Thread Tools
Display Modes

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 01:02.


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