[Req] include

Useless Stuffs, Spam ... etc
Post Reply
sped
Member
Member
Posts: 17
Joined: 6 years ago
Contact:

[Req] include

#1

Post by sped » 6 years ago

Raheem can u give me the include for this plugin im need it and dont tell me you dont suport the old i dont cre its your plugin and i need it to fix shop on my server i Req for theat from 1 month and no one care Sersly this fourm for help member -_-

Code: Select all

#include <amxmodx>
#include <cstrike>
#include <fun>
#include <levels>

new menu
new xp

public plugin_init()
{
	register_plugin("Zombie Escape Nades Shop", "1.1", "Raheem")
	register_clcmd("grshop","ShowMenu")
}

public ShowMenu(id)
{
	menu = menu_create( "\yExtra-Item\w: \rOthers", "menu_handler" )
	
	menu_additem( menu, "Fire Nade \yx3         \r40 XP\R\dH", "", 0 )
	menu_additem( menu, "Frost Nade \yx2        \r80 XP\R\dH", "", 0 )
	menu_additem( menu, "Unlimited Clip        \r80 XP\R\dH", "", 0 )
	menu_additem( menu, "Madness               \r100 XP\R\dZ", "", 0 )  
	
	menu_setprop( menu, MPROP_EXIT, MEXIT_ALL )

	menu_display( id, menu, 0 )
}

public menu_handler(id, menu, item)
{
	xp = get_user_xp(id)
	
	switch(item)
	{
		case 0:
		{
			if ((xp >= 40) && is_user_alive(id) && (cs_get_user_team(id) == CS_TEAM_CT))
			{
				give_item( id, "weapon_hegrenade" )
				set_user_xp(id, get_user_xp(id) - 40)
				cs_set_user_bpammo(id, CSW_HEGRENADE, 3)
				client_print_color(id, "!y[!gZombie Escape!y] !tYou have bought 3 Fire Nades!y.")
			}
			else if ((xp >= 40) && !is_user_alive(id) && (cs_get_user_team(id) == CS_TEAM_CT))
			{
				client_print_color(id, "!y[!gZombie Escape!y] !tTo buy Fire Nades You need to be alive!y!")
			}
			else if (xp <= 40 && is_user_alive(id) && (cs_get_user_team(id) == CS_TEAM_CT))
			{
				client_print_color(id, "!y[!gZombie Escape!y] !tYou don't have enough XP!y.")
			}
			else if(cs_get_user_team(id) == CS_TEAM_T)
			{
				client_print_color(id, "!y[!gZombie Escape!y] !tThis Item for Humans only!y.")
			}
			else
			{
				return PLUGIN_HANDLED
			}
		}
		case 1:
		{
			if ((xp >= 80) && is_user_alive(id) && (cs_get_user_team(id) == CS_TEAM_CT))
			{
				give_item( id, "weapon_smokegrenade" )
				set_user_xp(id, get_user_xp(id) - 80)
				cs_set_user_bpammo(id, CSW_SMOKEGRENADE, 2)
				client_print_color(id, "!y[!gZombie Escape!y] !tYou have bought 2 Frost Nades!y.")
			}
			else if (xp >= 80 && !is_user_alive(id) && (cs_get_user_team(id) == CS_TEAM_CT))
			{
				client_print_color(id, "!y[!gZombie Escape!y] !tTo buy Frost Nades You need to be alive!y!")
			}
			else if (xp <= 80 && is_user_alive(id) && (cs_get_user_team(id) == CS_TEAM_CT))
			{
				client_print_color(id, "!y[!gZombie Escape!y] !tYou don't have enough XP!y.")
			}
			else if(cs_get_user_team(id) == CS_TEAM_T)
			{
				client_print_color(id, "!y[!gZombie Escape!y] !tThis Item for Humans only!y.")
			}
			else
			{
				return PLUGIN_HANDLED
			}
		}
		case 2:
		{
			client_cmd(id, "unlimitedclip")
		}
		case 3:
		{
			client_cmd(id, "madness")
		}
	}
	menu_destroy(menu)
	return PLUGIN_HANDLED
}
			
stock client_print_color(const id, const input[], any:...)  
{  
    new count = 1, players[32];  
    static msg[191];  
    vformat(msg, 190, input, 3);  

    replace_all(msg, 190, "!g", "^x04"); // Green Color  
    replace_all(msg, 190, "!y", "^x01"); // Default Color  
    replace_all(msg, 190, "!t", "^x03"); // Team Color  

    if (id) players[0] = id; else get_players(players, count, "ch");  
    {  
        for (new i = 0; i < count; i++)  
        {  
            if (is_user_connected(players[i]))  
            {  
                message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players[i]);  
                write_byte(players[i]);  
                write_string(msg);  
                message_end();  
            }  
        }  
    }  
}

User avatar
Raheem
Mod Developer
Mod Developer
Posts: 2214
Joined: 7 years ago
Contact:

#2

Post by Raheem » 6 years ago

Told you many times i don't support my old works. Why? Why supporting old/out-dated/badly-codded works? No way you will never understand the diffrence between the current Mod and old.... That's why you stick to the old... So please don't ask me for support.

Need support? This community can helps you in any issue related to it's Mod ONLY.

And as i'am kind here is the code just compile no need for includes, But please never ask for help for old MOD again here:
    1. #include <amxmodx>
    2. #include <cstrike>
    3. #include <fun>
    4.  
    5. new menu
    6. new xp
    7.  
    8. native set_user_xp(id, amount);
    9. native get_user_xp(id);
    10.  
    11. public plugin_init()
    12. {
    13.     register_plugin("Zombie Escape Nades Shop", "1.1", "Raheem")
    14.     register_clcmd("grshop","ShowMenu")
    15. }
    16.  
    17. public ShowMenu(id)
    18. {
    19.     menu = menu_create( "\yExtra-Item\w: \rOthers", "menu_handler" )
    20.    
    21.     menu_additem( menu, "Fire Nade \yx3         \r40 XP\R\dH", "", 0 )
    22.     menu_additem( menu, "Frost Nade \yx2        \r80 XP\R\dH", "", 0 )
    23.     menu_additem( menu, "Unlimited Clip        \r80 XP\R\dH", "", 0 )
    24.     menu_additem( menu, "Madness               \r100 XP\R\dZ", "", 0 )  
    25.    
    26.     menu_setprop( menu, MPROP_EXIT, MEXIT_ALL )
    27.  
    28.     menu_display( id, menu, 0 )
    29. }
    30.  
    31. public menu_handler(id, menu, item)
    32. {
    33.     xp = get_user_xp(id)
    34.    
    35.     switch(item)
    36.     {
    37.         case 0:
    38.         {
    39.             if ((xp >= 40) && is_user_alive(id) && (cs_get_user_team(id) == CS_TEAM_CT))
    40.             {
    41.                 give_item( id, "weapon_hegrenade" )
    42.                 set_user_xp(id, get_user_xp(id) - 40)
    43.                 cs_set_user_bpammo(id, CSW_HEGRENADE, 3)
    44.                 client_print_color(id, "!y[!gZombie Escape!y] !tYou have bought 3 Fire Nades!y.")
    45.             }
    46.             else if ((xp >= 40) && !is_user_alive(id) && (cs_get_user_team(id) == CS_TEAM_CT))
    47.             {
    48.                 client_print_color(id, "!y[!gZombie Escape!y] !tTo buy Fire Nades You need to be alive!y!")
    49.             }
    50.             else if (xp <= 40 && is_user_alive(id) && (cs_get_user_team(id) == CS_TEAM_CT))
    51.             {
    52.                 client_print_color(id, "!y[!gZombie Escape!y] !tYou don't have enough XP!y.")
    53.             }
    54.             else if(cs_get_user_team(id) == CS_TEAM_T)
    55.             {
    56.                 client_print_color(id, "!y[!gZombie Escape!y] !tThis Item for Humans only!y.")
    57.             }
    58.             else
    59.             {
    60.                 return PLUGIN_HANDLED
    61.             }
    62.         }
    63.         case 1:
    64.         {
    65.             if ((xp >= 80) && is_user_alive(id) && (cs_get_user_team(id) == CS_TEAM_CT))
    66.             {
    67.                 give_item( id, "weapon_smokegrenade" )
    68.                 set_user_xp(id, get_user_xp(id) - 80)
    69.                 cs_set_user_bpammo(id, CSW_SMOKEGRENADE, 2)
    70.                 client_print_color(id, "!y[!gZombie Escape!y] !tYou have bought 2 Frost Nades!y.")
    71.             }
    72.             else if (xp >= 80 && !is_user_alive(id) && (cs_get_user_team(id) == CS_TEAM_CT))
    73.             {
    74.                 client_print_color(id, "!y[!gZombie Escape!y] !tTo buy Frost Nades You need to be alive!y!")
    75.             }
    76.             else if (xp <= 80 && is_user_alive(id) && (cs_get_user_team(id) == CS_TEAM_CT))
    77.             {
    78.                 client_print_color(id, "!y[!gZombie Escape!y] !tYou don't have enough XP!y.")
    79.             }
    80.             else if(cs_get_user_team(id) == CS_TEAM_T)
    81.             {
    82.                 client_print_color(id, "!y[!gZombie Escape!y] !tThis Item for Humans only!y.")
    83.             }
    84.             else
    85.             {
    86.                 return PLUGIN_HANDLED
    87.             }
    88.         }
    89.         case 2:
    90.         {
    91.             client_cmd(id, "unlimitedclip")
    92.         }
    93.         case 3:
    94.         {
    95.             client_cmd(id, "madness")
    96.         }
    97.     }
    98.     menu_destroy(menu)
    99.     return PLUGIN_HANDLED
    100. }
    101.            
    102. stock client_print_color(const id, const input[], any:...)  
    103. {  
    104.     new count = 1, players[32];  
    105.     static msg[191];  
    106.     vformat(msg, 190, input, 3);  
    107.  
    108.     replace_all(msg, 190, "!g", "^x04"); // Green Color  
    109.     replace_all(msg, 190, "!y", "^x01"); // Default Color  
    110.     replace_all(msg, 190, "!t", "^x03"); // Team Color  
    111.  
    112.     if (id) players[0] = id; else get_players(players, count, "ch");  
    113.     {  
    114.         for (new i = 0; i < count; i++)  
    115.         {  
    116.             if (is_user_connected(players[i]))  
    117.             {  
    118.                 message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players[i]);  
    119.                 write_byte(players[i]);  
    120.                 write_string(msg);  
    121.                 message_end();  
    122.             }  
    123.         }  
    124.     }  
    125. }


Trashed.
He who fails to plan is planning to fail

Post Reply

Create an account or sign in to join the discussion

You need to be a member in order to post a reply

Create an account

Not a member? register to join our community
Members can start their own topics & subscribe to topics
It’s free and only takes a minute

Register

Sign in

Who is online

Users browsing this forum: No registered users and 1 guest