Awp only Vip

Programarea si configurarea jocului Counter-Strike!

Moderators: Moderatori ajutatori, Moderatori, Echipa eXtreamCS.com

Post Reply
kaZzy Cs
Utilizator neserios
Utilizator neserios
Posts: 96
Joined: 26 Mar 2017, 11:14
Detinator Steam: Da
CS Status: Citesc forumul eXtreamCS.com...!
Detinator server CS: CSGO.EVILS.RO
SteamID: PGL kaZzy
Reputatie: Utilizator neserios
Fond eXtream: 0
Location: Italia
Contact:

31 May 2018, 18:04

Salut.
Cine imi da si mie cateva indicati,cum sa pun awp only doar la flagul de vip,adica sa poata folosi awp doar vip-ul,ceilalti playeri sa nu aiba acces la awp pe server.
*******************
TS.EVILS.RO
*******************
RESPAWN.ENJOYGAME.RO
*******************
CSGO.EVILS.RO

*******************
https://evils.ro/forum//
*******************
RoyalServer
User avatar
A k c 3 n 7
Super moderator
Super moderator
Posts: 5137
Joined: 25 Aug 2014, 21:31
Detinator Steam: Da
CS Status: who dares wins
SteamID: Jandarmeria
Reputatie: Super moderator
Moderatorul anului 2023
Fost Membru Club eXtreamCS ( o luna )
Fost eXtream Mod
Fost Intermediar
Nume anterior: Sorinel
Fond eXtream: 0
Location: Unknown
Discord: remusakcent
Has thanked: 4 times
Been thanked: 46 times

01 Jun 2018, 18:50

| Afiseaza codul
#include < amxmodx >
#include < fakemeta >
#include < hamsandwich >

const WEAPON_BITSUM = ((1<<CSW_AWP))

#define VIP_FLAG ADMIN_LEVEL_H

#define PLUGIN    "Seizure Of Weapons"
#define VERSION   "1.1"
#define AUTHOR    "Sorinel"

public plugin_init() { 
     
       register_plugin( PLUGIN, VERSION, AUTHOR )
       register_event( "CurWeapon","CheckWeapon","be","1=1" )
}

public CheckWeapon(id) {

       if(!is_user_alive(id) || get_user_flags(id) & VIP_FLAG ) 
              return 

       new szWeapons[32], iNum, i
       get_user_weapons(id, szWeapons, iNum)

       for(i = 0; i < iNum; i++)
       {
	      if(WEAPON_BITSUM & (1<<szWeapons))
	      {
	                new weaponname[32]
			get_weaponname(szWeapons, weaponname, charsmax(weaponname))
			bacon_strip_weapon(id, weaponname)
	      }
	}
}
            
stock fm_find_ent_by_owner(index, const classname[], owner, jghgtype = 0) {
	new strtype[11] = "classname", ent = index
	switch (jghgtype) {
		case 1: strtype = "target"
		case 2: strtype = "targetname"
	}

	while ((ent = engfunc(EngFunc_FindEntityByString, ent, strtype, classname)) && pev(ent, pev_owner) != owner) {}

	return ent
}

stock bacon_strip_weapon(index, weapon[])
{
	if(!equal(weapon, "weapon_", 7)) 
		return PLUGIN_CONTINUE;

	static weaponid;
	weaponid = get_weaponid(weapon)
	
	if(!weaponid) 
		return PLUGIN_CONTINUE;

	static weaponent;
	weaponent = fm_find_ent_by_owner(-1, weapon, index);
	
	if(!weaponent)
		return PLUGIN_CONTINUE;

	if(get_user_weapon(index) == weaponid) 
		ExecuteHamB(Ham_Weapon_RetireWeapon, weaponent);

	if(!ExecuteHamB(Ham_RemovePlayerItem, index, weaponent)) 
		return PLUGIN_CONTINUE;
	
	ExecuteHamB(Ham_Item_Kill, weaponent);
	set_pev(index, pev_weapons, pev(index, pev_weapons) & ~(1<<weaponid));

	return PLUGIN_HANDLED;
}
Post Reply

Return to “CStrike”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 2 guests