Raised This Month: $2 Target: $400
 0% 

Request to modify plugins


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Aleku
New Member
Join Date: Jun 2020
Old 06-18-2020 , 03:29   Request to modify plugins
Reply With Quote #1

Hello

I want you when you buy AWP to be able to buy it only after the 3rd round, every time a round starts! (sorry if I got a word wrong ...)

Code:
#include <amxmodx>
#include <fun>
#include <hamsandwich> 
#include <cstrike>

#define PLUGIN "VIP"
#define VERSION "v1.0"
#define AUTHOR "Aleku"

new PREFIX[] = "!t[V.I.P]!y"
new TITLE_MENIU[] = "\rRECOVER - \yv1.1 \r- \yMeniu \rArme"

#define VIP_LEVEL_ACCES ADMIN_LEVEL_H


public plugin_init()
 {
    register_plugin(PLUGIN, VERSION, AUTHOR)
  
  
    RegisterHam(Ham_Spawn, "player", "vip_menu", 1) //Foloseste Ham_Spawn pentru a detecta spawn-ul jucatorului
}
 

public vip_menu(id) 
{
	new menu
	switch(cs_get_user_team(id))
	{
		case CS_TEAM_CT:
		{
			menu = menu_create(TITLE_MENIU,"menu_ammunition" );
			menu_additem(menu, "\rAWP\d+\yDeagle\d+Set grenazi", "1", VIP_LEVEL_ACCES);
			menu_additem(menu, "\wM4A1\d+\yDeagle\d+Set grenazi", "2", VIP_LEVEL_ACCES);
			menu_additem(menu, "\wFamas\d+\yDeagle\d+Set grenazi", "3", VIP_LEVEL_ACCES);
			
		}
	
		case CS_TEAM_T:
		{
			menu = menu_create(TITLE_MENIU, "menu_ammunition");
			menu_additem(menu, "\rAWP\d+\yDeagle\d+\wSet grenazi", "1", VIP_LEVEL_ACCES)
			menu_additem(menu, "\wAK47\d+\yDeagle\d+\wSet grenazi", "2", VIP_LEVEL_ACCES);
			menu_additem(menu, "\wGalil\d+\yDeagle\d+\wSet grenazi", "3", VIP_LEVEL_ACCES);
			
		}
	}
	menu_display(id, menu, 0)
	return PLUGIN_HANDLED;
}
public menu_ammunition ( id, menu, item ) 
{
	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(cs_get_user_team(id) == CS_TEAM_CT)
		switch(key)
	{
		case 1:
	{
		give_item(id, "weapon_awp");
		give_item(id, "weapon_deagle");
		give_item(id, "weapon_hegrenade");
		give_item(id, "weapon_flashbang");
		cs_set_user_bpammo(id, CSW_HEGRENADE, 1);
		cs_set_user_bpammo(id, CSW_FLASHBANG, 2);
		cs_set_user_bpammo(id, CSW_AWP, 30);
		cs_set_user_bpammo(id, CSW_DEAGLE, 35);
		ChatColor(id,"%s Ai ales !gAwp!y+!gDeagle!y+!gSet grenazi!y.",PREFIX);
		         
	}
		case 2:
	{
	give_item(id, "weapon_m4a1");
	give_item(id, "weapon_deagle");
	give_item(id, "weapon_hegrenade");
	give_item(id, "weapon_flashbang");
	cs_set_user_bpammo(id, CSW_HEGRENADE, 1);
	cs_set_user_bpammo(id, CSW_FLASHBANG, 2);
	cs_set_user_bpammo(id, CSW_M4A1, 90);
	cs_set_user_bpammo(id, CSW_DEAGLE, 35);
	ChatColor(id,"%s Ai ales !gM4a1!y+!gDeagle!y+!gSet grenazi!y.",PREFIX);
			
			
	}
		case 3:
	{
	give_item(id, "weapon_famas");
	give_item(id, "weapon_deagle");
	give_item(id, "weapon_hegrenade");
	give_item(id, "weapon_flashbang");
	cs_set_user_bpammo(id, CSW_HEGRENADE, 1);
	cs_set_user_bpammo(id, CSW_FLASHBANG, 2);
	cs_set_user_bpammo(id, CSW_FAMAS, 90);
	cs_set_user_bpammo(id, CSW_DEAGLE, 35);
	ChatColor(id,"%s Ai ales !gFamas!y+!gDeagle!y+!gSet grenazi!y.",PREFIX);	
	}      
}
	if(cs_get_user_team(id) == CS_TEAM_T)
		switch(key)
	{
		case 1:
	{
	give_item(id, "weapon_awp");
	give_item(id, "weapon_deagle");
	give_item(id, "weapon_hegrenade");
	give_item(id, "weapon_flashbang");
	cs_set_user_bpammo(id, CSW_HEGRENADE, 1);
	cs_set_user_bpammo(id, CSW_FLASHBANG, 2);
	cs_set_user_bpammo(id, CSW_AWP, 30);
	cs_set_user_bpammo(id, CSW_DEAGLE, 35);
	ChatColor(id,"%s Ai ales !gAwp!y+!gDeagle!y+!gSet grenazi!y.",PREFIX);
			
			
	}      
		case 2:

	{
	give_item(id, "weapon_ak47");
	give_item(id, "weapon_deagle");
	give_item(id, "weapon_hegrenade");
	give_item(id, "weapon_flashbang");
	cs_set_user_bpammo(id, CSW_HEGRENADE, 1);
	cs_set_user_bpammo(id, CSW_FLASHBANG, 2);
	cs_set_user_bpammo(id, CSW_AK47, 90);
	cs_set_user_bpammo(id, CSW_DEAGLE, 35);
	ChatColor(id,"%s Ai ales !gAk47!y+!gDeagle!y+!gSet grenazi!y.",PREFIX);
			
			
	}
		case 3:
	{
	give_item(id, "weapon_galil");
	give_item(id, "weapon_deagle");
	give_item(id, "weapon_hegrenade");
	give_item(id, "weapon_flashbang");
	cs_set_user_bpammo(id, CSW_HEGRENADE, 1);
	cs_set_user_bpammo(id, CSW_FLASHBANG, 2);
	cs_set_user_bpammo(id, CSW_GALIL, 90);
	cs_set_user_bpammo(id, CSW_DEAGLE, 35);
	ChatColor(id,"%s Ai ales !gGalil!y+!gDeagle!y+!gSet grenazi!y.",PREFIX);		
	
	}
	}
	menu_destroy(menu);
	return PLUGIN_HANDLED;  
}
//==================================
stock ChatColor(const id, const input[], any:...)
{
    new count = 1, players[32];
    static msg[191];
    vformat(msg, 190, input, 3);
 
    replace_all(msg, 190, "!g", "^x04"); // verde
    replace_all(msg, 190, "!y", "^x01"); // default
    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();
            }
        }
    }
}
Aleku 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 12:01.


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