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

SURF - Spawn menu for players


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
tom .
Member
Join Date: May 2016
Old 07-16-2020 , 09:41   SURF - Spawn menu for players
Reply With Quote #1

I want a menu with items for the surf mode to appear at each respawn

PHP Code:
SURF Choose pack:

1. Noob Pack -  M4A1Deagle150 Health1 He
2. Only Pro Pack 
Deagle125 Health1 He
3. Master Pack 
1 He 125 Health
4. Admins Only 
M4A1Deagle250 HP1 He flag "t" 
Thanks !

Last edited by tom .; 07-16-2020 at 09:44.
tom . is offline
Old 07-16-2020, 11:40
alferd
This message has been deleted by alferd. Reason: for Fix
alferd
Veteran Member
Join Date: Dec 2019
Location: Iran is Always Eternal
Old 07-16-2020 , 11:47   Re: SURF - Spawn menu for players
Reply With Quote #2

Code:
#include <amxmodx> #include <amxmisc> #include <cstrike> #include <fun> #include <hamsandwich> #define PLUGIN "Surf Weapon Menu" #define VERSION "1.0" #define AUTHOR "AlferD" new g_MenuName new g_Item1_Rifel, g_Item1_Pistol, g_Item1_Health, g_Item1_Name new g_Item2_Rifel, g_Item2_Pistol, g_Item2_Health, g_Item2_Name new g_Item3_Rifel, g_Item3_Pistol, g_Item3_Health, g_Item3_Name new g_Item4_Rifel, g_Item4_Pistol, g_Item4_Health, g_Item4_Name public plugin_init() {     register_plugin(PLUGIN, VERSION, AUTHOR)         g_MenuName = register_cvar("swm_menuname", "[ SURF ] Choose pack:", ADMIN_IMMUNITY)         /* Start Cvar Item 1 */         g_Item1_Name = register_cvar("swm_item1_name", "Noob Pack")     g_Item1_Rifel = register_cvar("swm_item1_rifel", "m4a1")     g_Item1_Pistol = register_cvar("swm_item1_pistol", "deagle")     g_Item1_Health = register_cvar("swm_item1_health", "150")         /* End Cvar Item 1 */     /*-----------------*/     /* Start Cvar Item 2 */         g_Item2_Name = register_cvar("swm_item2_name", "Only Pro Pack")     g_Item2_Rifel = register_cvar("swm_item2_rifel", "")     g_Item2_Pistol = register_cvar("swm_item2_pistol", "deagle")     g_Item2_Health = register_cvar("swm_item2_health", "125")         /* End Cvar Item 2 */     /*-----------------*/     /* Start Cvar Item 3 */         g_Item3_Name = register_cvar("swm_item3_name", "Master Pack")     g_Item3_Rifel = register_cvar("swm_item3_rifel", "")     g_Item3_Pistol = register_cvar("swm_item3_pistol", "")     g_Item3_Health = register_cvar("swm_item3_health", "125")         /* End Cvar Item 3 */     /*-----------------*/     /* Start Cvar Item 4 */         g_Item4_Name = register_cvar("swm_item4_name", "Admins Only")     g_Item4_Rifel = register_cvar("swm_item4_rifel", "m4a1")     g_Item4_Pistol = register_cvar("swm_item4_pistol", "deagle")     g_Item4_Health = register_cvar("swm_item4_health", "250")         /* End Cvar Item 4 */         RegisterHam(Ham_Spawn, "player", "ShowMenu", 1) } public ShowMenu(id) {     new szMenuName[32]     get_pcvar_string(g_MenuName, szMenuName, 31)         new szItem1[32], szItem2[32], szItem3[32], szItem4[32]         get_pcvar_string(g_Item1_Name, szItem1, 31)     get_pcvar_string(g_Item2_Name, szItem2, 31)     get_pcvar_string(g_Item3_Name, szItem3, 31)     get_pcvar_string(g_Item4_Name, szItem4, 31)         new menu = menu_create(szMenuName, "KeyMenu")         menu_additem(menu, szItem1, "1")     menu_additem(menu, szItem2, "2")     menu_additem(menu, szItem3, "3")     menu_additem(menu, szItem4, "4", ADMIN_LEVEL_H)         menu_setprop(menu, MPROP_EXIT, MEXIT_ALL)         menu_display(id, menu, 0) } public KeyMenu(id, menu, item) {     if (item == MENU_EXIT)     {         menu_destroy(menu)         return PLUGIN_HANDLED;     }              new data[6], szName[64];     new access, callback;     menu_item_getinfo(menu, item, access, data,charsmax(data), szName,charsmax(szName), callback);     new key = str_to_num(data);              if(!is_user_alive(id))         return PLUGIN_HANDLED             switch(key)     {         case 1:         {             Item1(id)         }                 case 2:         {             Item2(id)         }                 case 3:         {             Item3(id)         }                 case 4:         {             Item4(id)         }     }              return PLUGIN_CONTINUE; } public Item1(id) {     new szRifel[32], szPistol[32], Rifel[32], Pistol[32]         get_pcvar_string(g_Item1_Rifel, szRifel, 31)     get_pcvar_string(g_Item1_Pistol, szPistol, 31)         new Health = get_pcvar_num(g_Item1_Health)         format(Rifel, 31, "weapon_%s", szRifel)     format(Pistol, 31, "weapon_%s", szPistol)         strip_user_weapons(id)         set_user_health(id, Health)         give_item(id, Rifel)     give_item(id, Pistol)     give_item(id, "weapon_hegrenade")     give_item(id, "weapon_knife") } public Item2(id) {     new szRifel[32], szPistol[32], Rifel[32], Pistol[32]         get_pcvar_string(g_Item2_Rifel, szRifel, 31)     get_pcvar_string(g_Item2_Pistol, szPistol, 31)         new Health = get_pcvar_num(g_Item2_Health)         format(Rifel, 31, "weapon_%s", szRifel)     format(Pistol, 31, "weapon_%s", szPistol)         strip_user_weapons(id)         set_user_health(id, Health)         give_item(id, Rifel)     give_item(id, Pistol)     give_item(id, "weapon_hegrenade")     give_item(id, "weapon_knife") } public Item3(id) {     new szRifel[32], szPistol[32], Rifel[32], Pistol[32]         get_pcvar_string(g_Item3_Rifel, szRifel, 31)     get_pcvar_string(g_Item3_Pistol, szPistol, 31)         new Health = get_pcvar_num(g_Item3_Health)         format(Rifel, 31, "weapon_%s", szRifel)     format(Pistol, 31, "weapon_%s", szPistol)         strip_user_weapons(id)         set_user_health(id, Health)         give_item(id, Rifel)     give_item(id, Pistol)     give_item(id, "weapon_hegrenade")     give_item(id, "weapon_knife") } public Item4(id) {     new szRifel[32], szPistol[32], Rifel[32], Pistol[32]         get_pcvar_string(g_Item4_Rifel, szRifel, 31)     get_pcvar_string(g_Item4_Pistol, szPistol, 31)         new Health = get_pcvar_num(g_Item4_Health)         format(Rifel, 31, "weapon_%s", szRifel)     format(Pistol, 31, "weapon_%s", szPistol)         strip_user_weapons(id)         set_user_health(id, Health)         give_item(id, Rifel)     give_item(id, Pistol)     give_item(id, "weapon_hegrenade")     give_item(id, "weapon_knife") }
__________________
Jailbreak AD 2.0

The greatest civilization of 🇮🇷IRAN🇮🇷
alferd 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 05:53.


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