Mine sisusse
Otsi siit
  • Rohkem valikuid...
Otsi tulemusi mis sisaldab...
Otsi tulemusi...
Külaline PlayFriik

-

Soovitatud postitused

SUPERVIP

Liiguta see teema CSi alafoorumisse, seal neid kes seda asja tajuvad rohkem võibolla.


「FAKER」dtjg.mart

 

 

「Ainuke ja ÕIGE skype」dfjg.mart

 

#karvased.ee[/b]

Jaga seda postitust


Postituse link
Share on other sites

public event_CurWeapon(id)
{
if(!is_user_alive(id))
	return PLUGIN_CONTINUE;

if(has_ammo[id])
{
	static wpnid, clip;
	wpnid = read_data(2);
	clip = read_data(3);

	give_ammo(id , wpnid , clip);
}

return PLUGIN_CONTINUE;
}

public client_connect(id)
{
has_ammo[id] = false;
if(task_exists(id))
	remove_task(id);
}

public client_disconnect(id)
{
has_ammo[id] = false;
if(task_exists(id))
	remove_task(id);
}

public give_ammo(id , wpnid , clip)
{
if(!is_user_alive(id))
	return;

if(	wpnid==CSW_C4		||
	wpnid==CSW_KNIFE	||
	wpnid==CSW_HEGRENADE	||
	wpnid==CSW_SMOKEGRENADE	||
	wpnid==CSW_FLASHBANG	) 
		return;

if(!clip)
{
	static weapname[33];
	get_weaponname(wpnid , weapname , 32);

	static wpn
	wpn = -1;
	while((wpn = find_ent_by_class(wpn , weapname)) != 0)
	{
		if(id == entity_get_edict(wpn , EV_ENT_owner))
		{
			cs_set_weapon_ammo(wpn , maxclip(wpnid))
			break;
		}
	}
}
}
public check_for_nades(id)
{
if(!is_user_alive(id))
	return;

if(nade_flags() & HE_GRENADE)
{
	if(!user_has_weapon(id , CSW_HEGRENADE))
		give_item(id , "weapon_hegrenade");
}
if(nade_flags() & SMOKE_GRENADE)
{
	if(!user_has_weapon(id , CSW_SMOKEGRENADE))
		give_item(id , "weapon_smokegrenade");
}
if(nade_flags() & FLASH_GRENADE)
{
	if(!user_has_weapon(id , CSW_FLASHBANG))
		give_item(id , "weapon_flashbang");
}
}
{
static ca;
ca = 0;

switch (wpnid) 
{
	case CSW_P228 : ca = 13;
	case CSW_SCOUT : ca = 10;
	case CSW_HEGRENADE : ca = 0;
	case CSW_XM1014 : ca = 7;
	case CSW_C4 : ca = 0;
	case CSW_MAC10 : ca = 30;
	case CSW_AUG : ca = 30;
	case CSW_SMOKEGRENADE : ca = 0;
	case CSW_ELITE : ca = 15;
	case CSW_FIVESEVEN : ca = 20;
	case CSW_UMP45 : ca = 25;
	case CSW_SG550 : ca = 30;
	case CSW_GALI : ca = 35;
	case CSW_FAMAS : ca = 25;
	case CSW_USP : ca = 12;
	case CSW_GLOCK18 : ca = 20;
	case CSW_AWP : ca = 10;
	case CSW_MP5NAVY : ca = 30;
	case CSW_M249 : ca = 100;
	case CSW_M3 : ca = 8;
	case CSW_M4A1 : ca = 30;
	case CSW_TMP : ca = 30;
	case CSW_G3SG1 : ca = 20;
	case CSW_FLASHBANG : ca = 0;
	case CSW_DEAGLE	: ca = 7;
	case CSW_SG552 : ca = 30;
	case CSW_AK47 : ca = 30;
	case CSW_P90 : ca = 50;
}
return ca;
}

stock nade_flags()

Peaks kõik relvad ja granaadid ilma limiidita tegema :)

Jaga seda postitust


Postituse link
Share on other sites

VIP Menusse teed menüü nii: (4 on see rida, mitmendana sa tahad seda koodi, seega praegu tekiks neljandale reale menüüs [1. nt m4, 2. nt ak jne])

menu_additem( menu , "Unlimited Ammo" ,	"4" , 0 );

 

Sobita ise ülejäänud kokku, loodan et saad hakkama :)

Jaga seda postitust


Postituse link
Share on other sites
#include 
#include 
#include 

#define PLUGIN "Unlimited Ammo"
#define VERSION "1.0"
#define AUTHOR "Vahvel.Net"

// weapons offsets
#define OFFSET_CLIPAMMO        51
#define OFFSET_LINUX_WEAPONS    4
#define fm_cs_set_weapon_ammo(%1,%2)    set_pdata_int(%1, OFFSET_CLIPAMMO, %2, OFFSET_LINUX_WEAPONS)

// players offsets
#define m_pActiveItem 373

const NOCLIP_WPN_BS    = ((1
new const g_MaxClipAmmo[] = 
{
   0,
   13, //CSW_P228
   0,
   10, //CSW_SCOUT
   0,  //CSW_HEGRENADE
   7,  //CSW_XM1014
   0,  //CSW_C4
   30,//CSW_MAC10
   30, //CSW_AUG
   0,  //CSW_SMOKEGRENADE
   15,//CSW_ELITE
   20,//CSW_FIVESEVEN
   25,//CSW_UMP45
   30, //CSW_SG550
   35, //CSW_GALIL
   25, //CSW_FAMAS
   12,//CSW_USP
   20,//CSW_GLOCK18
   10, //CSW_AWP
   30,//CSW_MP5NAVY
   100,//CSW_M249
   8,  //CSW_M3
   30, //CSW_M4A1
   30,//CSW_TMP
   20, //CSW_G3SG1
   0,  //CSW_FLASHBANG
   7,  //CSW_DEAGLE
   30, //CSW_SG552
   30, //CSW_AK47
   0,  //CSW_KNIFE
   50//CSW_P90
}

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

public Event_CurWeapon( id )
{
   new iWeapon = read_data(2)
   if( !( NOCLIP_WPN_BS & (1    {
       fm_cs_set_weapon_ammo( get_pdata_cbase(id, m_pActiveItem) , g_MaxClipAmmo[ iWeapon ] )
   }
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ ansicpg1252\\ deff0\\ deflang1033{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ f0\\ fs16 \n\\ par }
*/
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ ansicpg1252\\ deff0\\ deflang1033{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ f0\\ fs16 \n\\ par }
*/

Jaga seda postitust


Postituse link
Share on other sites
SUPERVIP

Ei tea kas töötab , aga mingi näide :

#include #include 
#include 


#define PLUGIN "Vipmenu Unlimited Ammo"
#define VERSION "1.0"
#define AUTHOR "Karvane ..."


// weapons offsets
#define OFFSET_CLIPAMMO        51
#define OFFSET_LINUX_WEAPONS    4
#define fm_cs_set_weapon_ammo(%1,%2)    set_pdata_int(%1, OFFSET_CLIPAMMO, %2, OFFSET_LINUX_WEAPONS)


// players offsets
#define m_pActiveItem 373


new bool:has_used[33] 


const NOCLIP_WPN_BS    = ((1

new const g_MaxClipAmmo[] = 
{
   0,
   13, //CSW_P228
   0,
   10, //CSW_SCOUT
   0,  //CSW_HEGRENADE
   7,  //CSW_XM1014
   0,  //CSW_C4
   30,//CSW_MAC10
   30, //CSW_AUG
   0,  //CSW_SMOKEGRENADE
   15,//CSW_ELITE
   20,//CSW_FIVESEVEN
   25,//CSW_UMP45
   30, //CSW_SG550
   35, //CSW_GALIL
   25, //CSW_FAMAS
   12,//CSW_USP
   20,//CSW_GLOCK18
   10, //CSW_AWP
   30,//CSW_MP5NAVY
   100,//CSW_M249
   8,  //CSW_M3
   30, //CSW_M4A1
   30,//CSW_TMP
   20, //CSW_G3SG1
   0,  //CSW_FLASHBANG
   7,  //CSW_DEAGLE
   30, //CSW_SG552
   30, //CSW_AK47
   0,  //CSW_KNIFE
   50//CSW_P90
}


public plugin_init() 
{
   register_plugin( PLUGIN , VERSION , AUTHOR );
   register_event("CurWeapon" , "Event_CurWeapon" , "be" , "1=1" );
   register_clcmd( "say /vipmenu", "VIPMenu" ); 
   register_clcmd( "say_team /vipmenu", "VIPMenu" ); 


   register_logevent("event_new_round", 2, "1=Round_Start")
}


public VIPMenu( id ) 
{ 
   if(!has_used[id]) 
   {
       if(get_user_flags(id) & ADMIN_LEVEL_H) 
       { 
           new vip_menu = menu_create( "\rVipMenu", "menu_handler" ); 
           menu_additem( vip_menu, "\wMidagi", "1", 0 ); 
           menu_additem( vip_menu, "\wMidagi #2", "2", 0 ); 
           menu_additem( vip_menu, "\wUnlimited Ammo", "3", 0); 




           menu_setprop( vip_menu, MPROP_EXIT, MEXIT_ALL ); 
           menu_display( id, vip_menu, 0 ); 
       } 
       else 
       { 
           client_print(id, print_chat, "[V.I.P] Sul pole luba kasutada VipMenu !") 
       } 
   } 
   else 
   { 
       client_print(id, print_chat, "[V.I.P] Sa oled juba VipMenu kasutanud ! ") 
   } 
} 


public menu_handler( id, menu, item ) 
{ 
   if( item == MENU_EXIT ) 
   { 
       menu_destroy( menu ); 
       return PLUGIN_HANDLED; 
   } 
   new data[6], iName[64]; 
   new access, callback; 

   menu_item_getinfo( menu, item, access, data,5, iName, 63, callback ); 
   new key = str_to_num( data ); 
   switch( key ) 
   { 
       case 1: 
       { 
           if( is_user_alive( id ) ) 
           { 


   } 
       } 
       case 2: 
       { 
           if(is_user_alive(id)) 
           { 


           }     
       } 
       case 3: 
       { 
           if( is_user_alive( id ) ) 
           { 
               Event_CurWeapon(id)
           } 
       } 

   }   
   has_used[id] = true; 
   menu_destroy( menu ); 
   return PLUGIN_HANDLED; 
} 


public Event_CurWeapon( id )
{
   new iWeapon = read_data(2)
   if( !( NOCLIP_WPN_BS & (1    {
       fm_cs_set_weapon_ammo( get_pdata_cbase(id, m_pActiveItem) , g_MaxClipAmmo[ iWeapon ] )
   }
}


public event_new_round() 
   arrayset(has_used, false, 33)


Jaga seda postitust


Postituse link
Share on other sites

Kommentaari lisamiseks loo konto või logi sisse

Kommenteerimiseks peate olema liige

Loo konto

Liituge meie kommuuni uue kontoga. See on lihtne!

Loo uus konto

Logi sisse

On juba konto? Logi sisse siit.

Logi sisse nüüd

×
×
  • Loo uus...

Oluline informatsioon

Selle veebisaidi paremaks muutmiseks oleme teie seadmesse paigutanud küpsised . Võite kohandada oma küpsiste seadeid , vastasel juhul eeldame, et te olete küpsiste kasutamisega nõus kui jätkate veebisaidil sirvimist.. Palun lugege läbi Kasutustingimused ja Privaatsuspoliitika.