Raised This Month: $75 Target: $400
 18% 

[Problem] Error VIP


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
VenomMix
Member
Join Date: Nov 2018
Old 08-11-2019 , 03:47   [Problem] Error VIP
Reply With Quote #1

Hi, I have this VIP plugin:
HTML Code:
#include <amxmodx>
#include <cstrike>
#include <fun>
#include <hamsandwich>
#include <engine>
#include <fakemeta>
#include <cc_colorchat>

#define p. "PREMIUM-FGL"
#define v. "1.1.Z"
#define a. "Jică Măcelaru'"

#define VIP_LEVEL_ACCES ADMIN_LEVEL_F

#define SCOREATTRIB_NONE    0
#define SCOREATTRIB_DEAD    ( 1 << 0 )
#define SCOREATTRIB_BOMB    ( 1 << 1 )
#define SCOREATTRIB_VIP     ( 1 << 2 )

#define REMOVE_FLAGS "r"

new const RMaps[][] = {
	"35hp",
	"35hp_2",
	"31hp",
	"1hp",
	"100hp",
	"awp_india"
};

const PRIMARY_WEAPONS_BIT_SUM = (1<<CSW_SCOUT)|(1<<CSW_XM1014)|(1<<CSW_MAC10)|(1<<CSW_AUG)|(1<<CSW_UMP45)|(1<<CSW_SG550)|(1<<CSW_GALIL)|(1<<CSW_FAMAS)|(1<<CSW_AWP)|(1<<CSW_MP5NAVY)|(1<<CSW_M249)|(1<<CSW_M3)|(1<<CSW_M4A1)|(1<<CSW_TMP)|(1<<CSW_G3SG1)|(1<<CSW_SG552)|(1<<CSW_AK47)|(1<<CSW_P90);
const SECONDARY_WEAPONS_BIT_SUM = (1<<CSW_P228)|(1<<CSW_ELITE)|(1<<CSW_FIVESEVEN)|(1<<CSW_USP)|(1<<CSW_GLOCK18)|(1<<CSW_DEAGLE);

new round[33] = 0;
new cvar_vip_mode, cvar_vip_maxmoney, cvar_vip_maxap, cvar_vip_maxhp, cvar_vip_showC, cvar_vip_in_out, cvar_tag, cvar_start_hp, cvar_start_ap, cvar_start_money, cvar_hp_kill, cvar_ap_kill, jumpnum[33], bool: dojump[33];

public plugin_init(){
	register_plugin(p., v., a.);
	
	register_clcmd("say /premium", "vip_info");
	register_clcmd("say", "say_pmenu");
	register_clcmd("say", "handle_say");
	register_clcmd("say_team", "handle_say");

	cvar_vip_mode = register_cvar("amx_vip_mode", "1");	
	cvar_tag = register_cvar("amx_vip_tag", "[PREMIUM]");
	cvar_start_hp = register_cvar("amx_start_hp", "50");
	cvar_start_ap = register_cvar("amx_start_ap", "80");
	cvar_start_money = register_cvar("amx_start_money", "8000");
	cvar_hp_kill = register_cvar("amx_vip_addhp", "10");	
	cvar_ap_kill = register_cvar("amx_vip_addap", "10");
	cvar_vip_in_out = register_cvar("amx_vip_in_out", "1");
	cvar_vip_showC = register_cvar("amx_vip_show_chat", "1");
	cvar_vip_maxhp = register_cvar("amx_vip_maxhp", "180");
	cvar_vip_maxap = register_cvar("amx_vip_maxap", "200");
	cvar_vip_maxmoney = register_cvar("amx_vip_maxmoney", "16000");

	register_event("DeathMsg", "eDeathMsg", "a");
	register_message(get_user_msgid( "ScoreAttrib" ), "MessageScoreAttrib");	
	RegisterHam(Ham_Spawn, "player", "Spawn", 1);	

	set_task(120.0, "mesaj_info", _, _, _, "b");
	set_task(1.0, "TaskDisplayVips", _, _, _, "b", 0);	
}

public vip_menu(id){
	if(!is_user_alive(id) || !(get_user_flags(id) & VIP_LEVEL_ACCES))
		return 1;	
	
	new menu;
	switch(cs_get_user_team(id)){
		case CS_TEAM_T:{
			menu = menu_create("\y[\rPREMIUM SYSTEM\y] \wMeniu \yPREMIUM", "menu_ammunition");
			menu_additem(menu, "AK47+Deagle+Set grenade", "1");
			menu_additem(menu, "SG552+USP+Set grenade", "2");
			menu_additem(menu, "AWP+Deagle+Set grenade", "3");
			menu_additem(menu, "G3SG1+Glock+Set grenade", "4");
		}
		
		case CS_TEAM_CT:{
			menu = menu_create("\y[\rPREMIUM SYSTEM\y] \wMeniu \yPREMIUM", "menu_ammunition");
			menu_additem(menu, "M4A1+Deagle+Set grenade", "1");
			menu_additem(menu, "AUG+USP+Set grenade", "2");
			menu_additem(menu, "AWP+Deagle+Set grenade", "3");
			menu_additem(menu, "SG550+Glock+Set grenade", "4");
		}
	}
	menu_display(id, menu, 0);
	return 1;
}

public menu_ammunition (id, menu, item){
	if(item == MENU_EXIT)
		return 1;

	new access, callback, data[6], szName[64], tag[32];
	menu_item_getinfo(menu, item, access, data,charsmax(data), szName,charsmax(szName), callback);
	get_pcvar_string(cvar_tag, tag, charsmax(tag));
	new key = str_to_num(data);
		
	if(cs_get_user_team(id) == CS_TEAM_T)
		switch(key){
			case 1:{
				drop_weapons(id, 1);
				drop_weapons(id, 2);
				give_item(id, "weapon_knife");
				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, 1);
				cs_set_user_bpammo(id, CSW_AK47, 160);
				cs_set_user_bpammo(id, CSW_DEAGLE, 70);
				ColorChat(id, RED, "^3%s ^1Ai ales ^3AK47^1+^3Deagle^1+^3Set grenade^1.", tag);
			}      
			case 2:{
				drop_weapons(id, 1);
				drop_weapons(id, 2);
				give_item(id, "weapon_knife");
				give_item(id, "weapon_sg552");
				give_item(id, "weapon_usp");
				give_item(id, "weapon_hegrenade");
				give_item(id, "weapon_flashbang");
				cs_set_user_bpammo(id, CSW_HEGRENADE, 2);
				cs_set_user_bpammo(id, CSW_FLASHBANG, 2);
				cs_set_user_bpammo(id, CSW_SG552, 120);
				cs_set_user_bpammo(id, CSW_USP, 70);
				ColorChat(id, RED, "^3%s ^1Ai ales ^3SG552^1+^3USP^1+^3Set grenade^1.", tag);
			}
			case 3:{
				drop_weapons(id, 1);
				drop_weapons(id, 2);
				give_item(id, "weapon_knife");
				give_item(id, "weapon_awp");
				give_item(id, "weapon_deagle");
				give_item(id, "weapon_hegrenade");
				give_item(id, "weapon_flashbang");
				give_item(id, "weapon_smokegrenade");
				cs_set_user_bpammo(id, CSW_FLASHBANG, 1);
				cs_set_user_bpammo(id, CSW_AWP, 90);
				cs_set_user_bpammo(id, CSW_DEAGLE, 70);
				ColorChat(id, RED, "^3%s ^1Ai ales ^3AWP^1+^3Deagle^1+^3Set grenade^1.", tag);
			}     
            case 4:{
                drop_weapons(id, 1);
                drop_weapons(id, 2);
                give_item(id, "weapon_knife");
                give_item(id, "weapon_g3sg1");
                give_item(id, "weapon_glock");
                give_item(id, "weapon_flashbang");
                give_item(id, "weapon_smokegrenade");
                cs_set_user_bpammo(id, CSW_FLASHBANG, 1);
				cs_get_user_bpammo(id, CSW_SMOKEGRENADE, 1;
                cs_get_user_bpammo(id, CSW_G3SG1, 80);
                cs_get_user_bpammo(id, CSW_GLOCK18, 65);	
				ColorChat(id, RED, "^3%s ^1Ai ales ^3G3SG1^1+^3Glock^1+^3Set grenade^1.", tag);
		    }
	}
	
	if(cs_get_user_team(id) == CS_TEAM_CT)
		switch(key){
			case 1:{
				drop_weapons(id, 1);
				drop_weapons(id, 2);
				give_item(id, "weapon_knife");	
				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, 1);
				cs_set_user_bpammo(id, CSW_M4A1, 160);
				cs_set_user_bpammo(id, CSW_DEAGLE, 70);
				ColorChat(id, RED, "^3%s ^1Ai ales ^3M4A1^1+^3Deagle^1+^3Set grenade^1.", tag);
			}
			case 2:{
				drop_weapons(id, 1);
				drop_weapons(id, 2);
				give_item(id, "weapon_knife");
				give_item(id, "weapon_aug");
				give_item(id, "weapon_usp");
				give_item(id, "weapon_hegrenade");
				give_item(id, "weapon_flashbang");
				cs_set_user_bpammo(id, CSW_HEGRENADE, 3);
				cs_set_user_bpammo(id, CSW_FLASHBANG, 3);
				cs_set_user_bpammo(id, CSW_AUG, 160);
				cs_set_user_bpammo(id, CSW_USP, 70);
				ColorChat(id, RED, "^3%s ^1Ai ales ^3AUG^1+^3USP^1+^3Set grenade^1.", tag);
			}
			case 3:{
				drop_weapons(id, 1);
				drop_weapons(id, 2);
				give_item(id, "weapon_knife");
				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, 1);
				cs_set_user_bpammo(id, CSW_AWP, 90);
				cs_set_user_bpammo(id, CSW_DEAGLE, 70);
				ColorChat(id, RED, "^3%s ^1Ai ales ^3AWP^1+^3Deagle^1+^3Set grenade^1.", tag);
			}      
			case 4:{
			    drop_weapons(id, 1);
				drop_weapons(id, 2);
				give_item(id, "weapon_knife");
				give_item(id, "weapon_sg550");
				give_item(id, "weapon_glock");
				give_item(id, "weapon_flashbang");
				give_item(id, "weapon_smokegrenade");
				cs_get_user_bpammo(id, CSW_FLASHBANG, 1);
				cs_get_user_bpammo(id, CSW_SMOKEGRENADE, 1);
				cs_get_user_bpammo(id, CSW_SG550, 80);
				cs_get_user_bpammo(id, CSW_GLOCK18, 65);
				ColorChat(id, RED, "^3%s ^1Ai ales ^3SG550^1+^3Glock^1+^3Set grenade^1.", tag);
			}
		}
	menu_destroy(menu);
	return 1;  
}

public Spawn(id) { 
	if(!is_user_alive(id) || !(get_user_flags(id) & VIP_LEVEL_ACCES))
		return 1;
		
	if(get_pcvar_num(cvar_vip_mode) == 2){
		if(round[id] >= 4) 
			vip_menu(id);
		
		round[id]++;	
	}

	set_user_health(id, get_pcvar_num(cvar_start_hp));
	set_user_armor(id, get_pcvar_num(cvar_start_ap));
	cs_set_user_money(id, cs_get_user_money(id) + get_pcvar_num(cvar_start_money));
	
	new VIP_MAXMONEY = get_pcvar_num(cvar_vip_maxmoney);
	new VIP_MONEY = cs_get_user_money(id);
	
	if(VIP_MONEY >= VIP_MAXMONEY){
		cs_set_user_money(id, get_pcvar_num(cvar_vip_maxmoney));
	}	
	
	new MapName[32]; 
	get_mapname(MapName, sizeof(MapName));
	for (new i = 0; i < sizeof (RMaps); i ++){
		if(equali (MapName, RMaps[i])){
			remove_user_flags (id, read_flags(REMOVE_FLAGS));
		}
	}
	return 1;
}

public client_putinserver(id){
	if(!(get_user_flags(id) & VIP_LEVEL_ACCES))
		return 1;
		
	set_task(2.0, "in", id);
	
	jumpnum[id] = 0;
	dojump[id] = false;
	round[id] = 0;	
	
	return 1;
}

public client_disconnected(id){
	if(!(get_user_flags(id) & VIP_LEVEL_ACCES))
		return 1;
		
	set_task(2.0, "out", id);
	
	jumpnum[id] = 0;
	dojump[id] = false;
	round[id] = 0;
	
	return 1;
}

public client_PostThink(id) {
	if(!is_user_alive(id)) 
		return 1;
		
	if(dojump[id] == true){
		new Float: velocity[3];
		entity_get_vector(id, EV_VEC_velocity, velocity)
		velocity[2] = random_float(265.0, 285.0);
		entity_set_vector(id, EV_VEC_velocity, velocity)
		dojump[id] = false;
	}

	return 0;
}

public eDeathMsg(){
	new id_Killer = read_data(1);
		
	if(!is_user_alive(id_Killer) || !(get_user_flags(id_Killer) & VIP_LEVEL_ACCES)) 
		return 1;

	new VIP_MAXHP = get_pcvar_num(cvar_vip_maxhp);
	new VIP_HP = get_user_health(id_Killer);
	new VIP_MAXAP = get_pcvar_num(cvar_vip_maxap);
	new VIP_AP = get_user_armor(id_Killer);
	
	set_user_armor(id_Killer, get_user_armor(id_Killer) + get_pcvar_num(cvar_ap_kill));

	if(VIP_HP >= VIP_MAXHP){
		set_user_health(id_Killer, get_pcvar_num(cvar_vip_maxhp));
	}else{
		set_user_health(id_Killer, get_user_health(id_Killer) + get_pcvar_num(cvar_hp_kill));
	}
	
	if(VIP_AP >= VIP_MAXAP){
		set_user_health(id_Killer, get_pcvar_num(cvar_vip_maxap));
	}else{
		set_user_health(id_Killer, get_user_health(id_Killer) + get_pcvar_num(cvar_ap_kill));
	}

	return 1;
}

public in(id){
	if(!(get_user_flags(id) & VIP_LEVEL_ACCES))
		return 1;
		
	if(get_pcvar_num(cvar_vip_in_out)){
		new tag[32], name[32];

		get_pcvar_string(cvar_tag, tag, charsmax(tag)); 
		get_user_name(id, name, charsmax(name)); 

		ColorChat(0, RED, "^3PREMIUM: ^4%s ^1s-a conectat.", name); 
		return 1;
	}
	
	return 1;
}	

public out(id){
	if(!(get_user_flags(id) & VIP_LEVEL_ACCES))
		return 1;
		
	if(get_pcvar_num(cvar_vip_in_out)){
		new tag[32], name[32];

		get_pcvar_string(cvar_tag, tag, charsmax(tag)); 
		get_user_name(id, name, charsmax(name)); 
		
		ColorChat(0, RED, "^3PREMIUM: ^4%s ^1s-a deconectat.", name); 

		return 1;
	}
	
	return 1;
}

public vip_info(id) show_motd(id, "/addons/amxmodx/configs/vip_info.html");

public mesaj_info(){
	new tag[32];
	get_pcvar_string(cvar_tag, tag, charsmax(tag));
	
	ColorChat(0, RED, "^3%s ^1Tastati in chat ^3/premium ^1pentru a vedea beneficiile si pretul vip-ului.", tag);
}

public handle_say(id) {
	new said[192];
	read_args(said,192);
	if(contain(said, "/vips") != -1)
	
	set_task(0.1,"print_adminlist",id);
	
	return 0;
}

public say_pmenu(id) {
	new said[192];
	read_args(said,192);
	if(get_pcvar_num(cvar_vip_mode) == 1){
		if(contain(said, "/pmenu") != -1)	
			set_task(0.1, "vip_menu", id);
	}
	return 0;
}

public print_adminlist(user){
	if(get_pcvar_num(cvar_vip_showC)){
		new tag[32];
		get_pcvar_string(cvar_tag, tag, charsmax(tag));
	
		new adminnames[33][32];
		new message[256];
		new id, count, x, len;

		for(id = 1 ; id <= get_maxplayers() ; id++)
			if(is_user_connected(id))
				if(get_user_flags(id) & VIP_LEVEL_ACCES)
					get_user_name(id, adminnames[count++], charsmax(adminnames[ ]));
    
		len = format(message, 255, "^4%s ^1PREMIUM-ii online sunt:^4 " ,tag);
		if(count > 0){
			for(x = 0 ; x < count ; x++){
				len += format(message[len], 255-len, "%s%s ", adminnames[x], x < (count-1) ? ", ":"");
				if(len > 96){
					print_message(user, message);
					len = format(message, 255, " ");
				}
			}
			
			print_message(user, message);
		}
		
		else{ 
			ColorChat(0, RED, "^3%s ^1Nu sunt ^3PREMIUM^1-i online.", tag);
		}			
	}
	return 0;  
}

print_message(id, msg[]) {
	message_begin(MSG_ONE, get_user_msgid("SayText"), {0,0,0}, id);
	write_byte(id);
	write_string(msg);
	message_end();
}

public MessageScoreAttrib(iMsgID, iDest, iReceiver){
    new iPlayer = get_msg_arg_int(1);
    if(is_user_connected(iPlayer) && (get_user_flags(iPlayer) & VIP_LEVEL_ACCES)){
        set_msg_arg_int(2, ARG_BYTE, is_user_alive(iPlayer) ? SCOREATTRIB_VIP : SCOREATTRIB_DEAD);
    }
}

stock fm_find_ent_by_owner(entity, const classname[], owner){
	while((entity = engfunc(EngFunc_FindEntityByString, entity, "classname", classname)) && pev(entity, pev_owner) != owner) {  }
	return entity;
}

stock drop_weapons(id, dropwhat){
	static Weapons[32], Num, i, WeaponID;
	Num = 0;
	get_user_weapons(id, Weapons, Num);
	for(i = 0; i < Num; i ++){
		WeaponID = Weapons[i];
		if((dropwhat == 1 && ((1 << WeaponID) & PRIMARY_WEAPONS_BIT_SUM)) || (dropwhat == 2 && ((1 << WeaponID) & SECONDARY_WEAPONS_BIT_SUM ))){
			static DropName[32], WeaponEntity;
			get_weaponname(WeaponID, DropName, charsmax(DropName));
			WeaponEntity = fm_find_ent_by_owner(-1, DropName, id);
			set_pev(WeaponEntity, pev_iuser1, cs_get_user_bpammo (id, WeaponID));
			engclient_cmd(id, "drop", DropName);
			cs_set_user_bpammo(id, WeaponID, 0);
		}
	}
}
and when I want to compile give me these errors:
HTML Code:
error 088: number of arguments does not match definition
the errors are in the lines 155, 156, 157, 213, 214, 215 and 216
VenomMix is offline
LearninG
Member
Join Date: Apr 2019
Location: Iran
Old 08-12-2019 , 01:57   Re: [Problem] Error VIP
Reply With Quote #2

Hey done ! if you faced any other problem just let me know.
PHP Code:
#include <amxmodx>
#include <cstrike>
#include <fun>
#include <hamsandwich>
#include <engine>
#include <fakemeta>
#include <cc_colorchat>

#define p. "PREMIUM-FGL"
#define v. "1.1.Z"
#define a. "Jic? M?celaru'"

#define VIP_LEVEL_ACCES ADMIN_LEVEL_F

#define SCOREATTRIB_NONE    0
#define SCOREATTRIB_DEAD    ( 1 << 0 )
#define SCOREATTRIB_BOMB    ( 1 << 1 )
#define SCOREATTRIB_VIP     ( 1 << 2 )

#define REMOVE_FLAGS "r"

new const RMaps[][] = {
    
"35hp",
    
"35hp_2",
    
"31hp",
    
"1hp",
    
"100hp",
    
"awp_india"
};

const 
PRIMARY_WEAPONS_BIT_SUM = (1<<CSW_SCOUT)|(1<<CSW_XM1014)|(1<<CSW_MAC10)|(1<<CSW_AUG)|(1<<CSW_UMP45)|(1<<CSW_SG550)|(1<<CSW_GALIL)|(1<<CSW_FAMAS)|(1<<CSW_AWP)|(1<<CSW_MP5NAVY)|(1<<CSW_M249)|(1<<CSW_M3)|(1<<CSW_M4A1)|(1<<CSW_TMP)|(1<<CSW_G3SG1)|(1<<CSW_SG552)|(1<<CSW_AK47)|(1<<CSW_P90);
const 
SECONDARY_WEAPONS_BIT_SUM = (1<<CSW_P228)|(1<<CSW_ELITE)|(1<<CSW_FIVESEVEN)|(1<<CSW_USP)|(1<<CSW_GLOCK18)|(1<<CSW_DEAGLE);

new 
round[33] = 0;
new 
cvar_vip_modecvar_vip_maxmoneycvar_vip_maxapcvar_vip_maxhpcvar_vip_showCcvar_vip_in_outcvar_tagcvar_start_hpcvar_start_apcvar_start_moneycvar_hp_killcvar_ap_killjumpnum[33], booldojump[33];

public 
plugin_init(){
    
register_plugin(p., v., a.);
    
    
register_clcmd("say /premium""vip_info");
    
register_clcmd("say""say_pmenu");
    
register_clcmd("say""handle_say");
    
register_clcmd("say_team""handle_say");

    
cvar_vip_mode register_cvar("amx_vip_mode""1");    
    
cvar_tag register_cvar("amx_vip_tag""[PREMIUM]");
    
cvar_start_hp register_cvar("amx_start_hp""50");
    
cvar_start_ap register_cvar("amx_start_ap""80");
    
cvar_start_money register_cvar("amx_start_money""8000");
    
cvar_hp_kill register_cvar("amx_vip_addhp""10");    
    
cvar_ap_kill register_cvar("amx_vip_addap""10");
    
cvar_vip_in_out register_cvar("amx_vip_in_out""1");
    
cvar_vip_showC register_cvar("amx_vip_show_chat""1");
    
cvar_vip_maxhp register_cvar("amx_vip_maxhp""180");
    
cvar_vip_maxap register_cvar("amx_vip_maxap""200");
    
cvar_vip_maxmoney register_cvar("amx_vip_maxmoney""16000");

    
register_event("DeathMsg""eDeathMsg""a");
    
register_message(get_user_msgid"ScoreAttrib" ), "MessageScoreAttrib");    
    
RegisterHam(Ham_Spawn"player""Spawn"1);    

    
set_task(120.0"mesaj_info"___"b");
    
set_task(1.0"TaskDisplayVips"___"b"0);    
}

public 
vip_menu(id){
    if(!
is_user_alive(id) || !(get_user_flags(id) & VIP_LEVEL_ACCES))
        return 
1;    
    
    new 
menu;
    switch(
cs_get_user_team(id)){
        case 
CS_TEAM_T:{
            
menu menu_create("\y[\rPREMIUM SYSTEM\y] \wMeniu \yPREMIUM""menu_ammunition");
            
menu_additem(menu"AK47+Deagle+Set grenade""1");
            
menu_additem(menu"SG552+USP+Set grenade""2");
            
menu_additem(menu"AWP+Deagle+Set grenade""3");
            
menu_additem(menu"G3SG1+Glock+Set grenade""4");
        }
        
        case 
CS_TEAM_CT:{
            
menu menu_create("\y[\rPREMIUM SYSTEM\y] \wMeniu \yPREMIUM""menu_ammunition");
            
menu_additem(menu"M4A1+Deagle+Set grenade""1");
            
menu_additem(menu"AUG+USP+Set grenade""2");
            
menu_additem(menu"AWP+Deagle+Set grenade""3");
            
menu_additem(menu"SG550+Glock+Set grenade""4");
        }
    }
    
menu_display(idmenu0);
    return 
1;
}

public 
menu_ammunition (idmenuitem)
{
    if(
item == MENU_EXIT)
        return 
1;

    new 
accesscallbackdata[6], szName[64], tag[32];
    
menu_item_getinfo(menuitemaccessdata,charsmax(data), szName,charsmax(szName), callback);
    
get_pcvar_string(cvar_tagtagcharsmax(tag));
    new 
key str_to_num(data);
        
    if(
cs_get_user_team(id) == CS_TEAM_T)
        switch(
key){
            case 
1:
            {
                if(
cs_get_user_team(id) == CS_TEAM_T)
                {
                    
                    
drop_weapons(id1);
                    
drop_weapons(id2);
                    
give_item(id"weapon_knife");
                    
give_item(id"weapon_ak47");
                    
give_item(id"weapon_deagle");
                    
give_item(id"weapon_hegrenade");
                    
give_item(id"weapon_flashbang");
                    
cs_set_user_bpammo(idCSW_HEGRENADE1);
                    
cs_set_user_bpammo(idCSW_FLASHBANG1);
                    
cs_set_user_bpammo(idCSW_AK47160);
                    
cs_set_user_bpammo(idCSW_DEAGLE70);
                    
ColorChat(idRED"^3%s ^1Ai ales ^3AK47^1+^3Deagle^1+^3Set grenade^1."tag);
                }
                else if (
cs_get_user_team(id) == CS_TEAM_CT)
                {
                    
drop_weapons(id1);
                    
drop_weapons(id2);
                    
give_item(id"weapon_knife");
                    
give_item(id"weapon_m4a1");
                    
give_item(id"weapon_deagle");
                    
give_item(id"weapon_hegrenade");
                    
give_item(id"weapon_flashbang");
                    
cs_set_user_bpammo(idCSW_HEGRENADE1);
                    
cs_set_user_bpammo(idCSW_FLASHBANG1);
                    
cs_set_user_bpammo(idCSW_M4A1160);
                    
cs_set_user_bpammo(idCSW_DEAGLE70);
                    
ColorChat(idRED"^3%s ^1Ai ales ^3M4A1^1+^3Deagle^1+^3Set grenade^1."tag);
                }
            }      
            case 
2:
            {
                if(
cs_get_user_team(id) == CS_TEAM_T)
                {
                    
drop_weapons(id1);
                    
drop_weapons(id2);
                    
give_item(id"weapon_knife");
                    
give_item(id"weapon_sg552");
                    
give_item(id"weapon_usp");
                    
give_item(id"weapon_hegrenade");
                    
give_item(id"weapon_flashbang");
                    
cs_set_user_bpammo(idCSW_HEGRENADE3);
                    
cs_set_user_bpammo(idCSW_FLASHBANG3);
                    
cs_set_user_bpammo(idCSW_SG552120);
                    
cs_set_user_bpammo(idCSW_USP70);
                    
ColorChat(idRED"^3%s ^1Ai ales ^3SG552^1+^3USP^1+^3Set grenade^1."tag);
                }
                else if (
cs_get_user_team(id) == CS_TEAM_CT)
                {
                    
drop_weapons(id1);
                    
drop_weapons(id2);
                    
give_item(id"weapon_knife");
                    
give_item(id"weapon_aug");
                    
give_item(id"weapon_usp");
                    
give_item(id"weapon_hegrenade");
                    
give_item(id"weapon_flashbang");
                    
cs_set_user_bpammo(idCSW_HEGRENADE3);
                    
cs_set_user_bpammo(idCSW_FLASHBANG3);
                    
cs_set_user_bpammo(idCSW_AUG160);
                    
cs_set_user_bpammo(idCSW_USP70);
                    
ColorChat(idRED"^3%s ^1Ai ales ^3AUG^1+^3USP^1+^3Set grenade^1."tag);
                }
            }
            case 
3:
            {
                if(
cs_get_user_team(id) == CS_TEAM_T)
                {
                    
drop_weapons(id1);
                    
drop_weapons(id2);
                    
give_item(id"weapon_knife");
                    
give_item(id"weapon_awp");
                    
give_item(id"weapon_deagle");
                    
give_item(id"weapon_hegrenade");
                    
give_item(id"weapon_flashbang");
                    
give_item(id"weapon_smokegrenade");
                    
cs_set_user_bpammo(idCSW_HEGRENADE1);
                    
cs_set_user_bpammo(idCSW_FLASHBANG1);
                    
cs_set_user_bpammo(idCSW_AWP90);
                    
cs_set_user_bpammo(idCSW_DEAGLE70);
                    
ColorChat(idRED"^3%s ^1Ai ales ^3AWP^1+^3Deagle^1+^3Set grenade^1."tag);
                }
                else if (
cs_get_user_team(id) == CS_TEAM_CT)
                {
                    
drop_weapons(id1);
                    
drop_weapons(id2);
                    
give_item(id"weapon_knife");
                    
give_item(id"weapon_awp");
                    
give_item(id"weapon_deagle")
                    ;
give_item(id"weapon_hegrenade");
                    
give_item(id"weapon_flashbang");
                    
cs_set_user_bpammo(idCSW_HEGRENADE1);
                    
cs_set_user_bpammo(idCSW_FLASHBANG1);
                    
cs_set_user_bpammo(idCSW_AWP90);
                    
cs_set_user_bpammo(idCSW_DEAGLE70);
                    
ColorChat(idRED"^3%s ^1Ai ales ^3AWP^1+^3Deagle^1+^3Set grenade^1."tag);
                }
            }
            case 
4:
            {
                if(
cs_get_user_team(id) == CS_TEAM_T)
                {
                    
drop_weapons(id1);
                    
drop_weapons(id2);
                    
give_item(id"weapon_knife");
                    
give_item(id"weapon_g3sg1");
                    
give_item(id"weapon_glock");
                    
give_item(id"weapon_flashbang");
                    
give_item(id"weapon_smokegrenade")
                    
cs_set_user_bpammo(idCSW_FLASHBANG1);
                    
cs_set_user_bpammo(idCSW_SMOKEGRENADE1);
                    
cs_set_user_bpammo(idCSW_G3SG180);
                    
cs_set_user_bpammo(idCSW_GLOCK1865);
                    
ColorChat(idRED"^3%s ^1Ai ales ^3G3SG1^1+^3Glock^1+^3Set grenade^1."tag);
                }
                else if (
cs_get_user_team(id) == CS_TEAM_CT)
                {
                    
drop_weapons(id1);
                    
drop_weapons(id2);
                    
give_item(id"weapon_knife");
                    
give_item(id"weapon_sg550");
                    
give_item(id"weapon_glock");
                    
give_item(id"weapon_flashbang");
                    
give_item(id"weapon_smokegrenade");
                    
cs_set_user_bpammo(idCSW_FLASHBANG1);
                    
cs_set_user_bpammo(idCSW_SMOKEGRENADE1);
                    
cs_set_user_bpammo(idCSW_SG55080);
                    
cs_set_user_bpammo(idCSW_GLOCK1865);
                    
ColorChat(idRED"^3%s ^1Ai ales ^3SG550^1+^3Glock^1+^3Set grenade^1."tag);
                }
            
            }
        }
    
menu_destroy(menu);
    return 
1;  
}

public 
Spawn(id) { 
    if(!
is_user_alive(id) || !(get_user_flags(id) & VIP_LEVEL_ACCES))
        return 
1;
        
    if(
get_pcvar_num(cvar_vip_mode) == 2){
        if(
round[id] >= 4
            
vip_menu(id);
        
        
round[id]++;    
    }

    
set_user_health(idget_pcvar_num(cvar_start_hp));
    
set_user_armor(idget_pcvar_num(cvar_start_ap));
    
cs_set_user_money(idcs_get_user_money(id) + get_pcvar_num(cvar_start_money));
    
    new 
VIP_MAXMONEY get_pcvar_num(cvar_vip_maxmoney);
    new 
VIP_MONEY cs_get_user_money(id);
    
    if(
VIP_MONEY >= VIP_MAXMONEY){
        
cs_set_user_money(idget_pcvar_num(cvar_vip_maxmoney));
    }    
    
    new 
MapName[32]; 
    
get_mapname(MapNamesizeof(MapName));
    for (new 
0sizeof (RMaps); ++){
        if(
equali (MapNameRMaps[i])){
            
remove_user_flags (idread_flags(REMOVE_FLAGS));
        }
    }
    return 
1;
}

public 
client_putinserver(id){
    if(!(
get_user_flags(id) & VIP_LEVEL_ACCES))
        return 
1;
        
    
set_task(2.0"in"id);
    
    
jumpnum[id] = 0;
    
dojump[id] = false;
    
round[id] = 0;    
    
    return 
1;
}

public 
client_disconnected(id){
    if(!(
get_user_flags(id) & VIP_LEVEL_ACCES))
        return 
1;
        
    
set_task(2.0"out"id);
    
    
jumpnum[id] = 0;
    
dojump[id] = false;
    
round[id] = 0;
    
    return 
1;
}

public 
client_PostThink(id) {
    if(!
is_user_alive(id)) 
        return 
1;
        
    if(
dojump[id] == true){
        new 
Floatvelocity[3];
        
entity_get_vector(idEV_VEC_velocityvelocity)
        
velocity[2] = random_float(265.0285.0);
        
entity_set_vector(idEV_VEC_velocityvelocity)
        
dojump[id] = false;
    }

    return 
0;
}

public 
eDeathMsg(){
    new 
id_Killer read_data(1);
        
    if(!
is_user_alive(id_Killer) || !(get_user_flags(id_Killer) & VIP_LEVEL_ACCES)) 
        return 
1;

    new 
VIP_MAXHP get_pcvar_num(cvar_vip_maxhp);
    new 
VIP_HP get_user_health(id_Killer);
    new 
VIP_MAXAP get_pcvar_num(cvar_vip_maxap);
    new 
VIP_AP get_user_armor(id_Killer);
    
    
set_user_armor(id_Killerget_user_armor(id_Killer) + get_pcvar_num(cvar_ap_kill));

    if(
VIP_HP >= VIP_MAXHP){
        
set_user_health(id_Killerget_pcvar_num(cvar_vip_maxhp));
    }else{
        
set_user_health(id_Killerget_user_health(id_Killer) + get_pcvar_num(cvar_hp_kill));
    }
    
    if(
VIP_AP >= VIP_MAXAP){
        
set_user_health(id_Killerget_pcvar_num(cvar_vip_maxap));
    }else{
        
set_user_health(id_Killerget_user_health(id_Killer) + get_pcvar_num(cvar_ap_kill));
    }

    return 
1;
}

public 
in(id){
    if(!(
get_user_flags(id) & VIP_LEVEL_ACCES))
        return 
1;
        
    if(
get_pcvar_num(cvar_vip_in_out)){
        new 
tag[32], name[32];

        
get_pcvar_string(cvar_tagtagcharsmax(tag)); 
        
get_user_name(idnamecharsmax(name)); 

        
ColorChat(0RED"^3PREMIUM: ^4%s ^1s-a conectat."name); 
        return 
1;
    }
    
    return 
1;
}    

public 
out(id){
    if(!(
get_user_flags(id) & VIP_LEVEL_ACCES))
        return 
1;
        
    if(
get_pcvar_num(cvar_vip_in_out)){
        new 
tag[32], name[32];

        
get_pcvar_string(cvar_tagtagcharsmax(tag)); 
        
get_user_name(idnamecharsmax(name)); 
        
        
ColorChat(0RED"^3PREMIUM: ^4%s ^1s-a deconectat."name); 

        return 
1;
    }
    
    return 
1;
}

public 
vip_info(idshow_motd(id"/addons/amxmodx/configs/vip_info.html");

public 
mesaj_info(){
    new 
tag[32];
    
get_pcvar_string(cvar_tagtagcharsmax(tag));
    
    
ColorChat(0RED"^3%s ^1Tastati in chat ^3/premium ^1pentru a vedea beneficiile si pretul vip-ului."tag);
}

public 
handle_say(id) {
    new 
said[192];
    
read_args(said,192);
    if(
contain(said"/vips") != -1)
    
    
set_task(0.1,"print_adminlist",id);
    
    return 
0;
}

public 
say_pmenu(id) {
    new 
said[192];
    
read_args(said,192);
    if(
get_pcvar_num(cvar_vip_mode) == 1){
        if(
contain(said"/pmenu") != -1)    
            
set_task(0.1"vip_menu"id);
    }
    return 
0;
}

public 
print_adminlist(user){
    if(
get_pcvar_num(cvar_vip_showC)){
        new 
tag[32];
        
get_pcvar_string(cvar_tagtagcharsmax(tag));
    
        new 
adminnames[33][32];
        new 
message[256];
        new 
idcountxlen;

        for(
id id <= get_maxplayers() ; id++)
            if(
is_user_connected(id))
                if(
get_user_flags(id) & VIP_LEVEL_ACCES)
                    
get_user_name(idadminnames[count++], charsmax(adminnames[ ]));
    
        
len format(message255"^4%s ^1PREMIUM-ii online sunt:^4 " ,tag);
        if(
count 0){
            for(
count x++){
                
len += format(message[len], 255-len"%s%s "adminnames[x], < (count-1) ? ", ":"");
                if(
len 96){
                    
print_message(usermessage);
                    
len format(message255" ");
                }
            }
            
            
print_message(usermessage);
        }
        
        else{ 
            
ColorChat(0RED"^3%s ^1Nu sunt ^3PREMIUM^1-i online."tag);
        }            
    }
    return 
0;  
}

print_message(idmsg[]) {
    
message_begin(MSG_ONEget_user_msgid("SayText"), {0,0,0}, id);
    
write_byte(id);
    
write_string(msg);
    
message_end();
}

public 
MessageScoreAttrib(iMsgIDiDestiReceiver){
    new 
iPlayer get_msg_arg_int(1);
    if(
is_user_connected(iPlayer) && (get_user_flags(iPlayer) & VIP_LEVEL_ACCES)){
        
set_msg_arg_int(2ARG_BYTEis_user_alive(iPlayer) ? SCOREATTRIB_VIP SCOREATTRIB_DEAD);
    }
}

stock fm_find_ent_by_owner(entity, const classname[], owner){
    while((
entity engfunc(EngFunc_FindEntityByStringentity"classname"classname)) && pev(entitypev_owner) != owner) {  }
    return 
entity;
}

stock drop_weapons(iddropwhat){
    static 
Weapons[32], NumiWeaponID;
    
Num 0;
    
get_user_weapons(idWeaponsNum);
    for(
0Num++){
        
WeaponID Weapons[i];
        if((
dropwhat == && ((<< WeaponID) & PRIMARY_WEAPONS_BIT_SUM)) || (dropwhat == && ((<< WeaponID) & SECONDARY_WEAPONS_BIT_SUM ))){
            static 
DropName[32], WeaponEntity;
            
get_weaponname(WeaponIDDropNamecharsmax(DropName));
            
WeaponEntity fm_find_ent_by_owner(-1DropNameid);
            
set_pev(WeaponEntitypev_iuser1cs_get_user_bpammo (idWeaponID));
            
engclient_cmd(id"drop"DropName);
            
cs_set_user_bpammo(idWeaponID0);
        }
    }

LearninG 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 19:17.


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