Anti-Furien Weapons! UPDATE V1.1

Pluginuri facute de utilizatorii forumului eXtream.

Moderators: Moderatori ajutatori, Moderatori, Echipa eXtreamCS.com

User avatar
Filip.
Utilizator neserios (tepar)
Utilizator neserios (tepar)
Posts: 1001
Joined: 16 Oct 2013, 22:17
Detinator Steam: Nu
Reputatie: Restrictie moderator
Nume anterior: andre.w
Location: lasa
Has thanked: 60 times
Been thanked: 27 times
Contact:

03 Feb 2014, 23:43

Descriere: Stiti toti ce face..

Descarcare:
.SMA | Afiseaza codul
////Credite////
//NicutaMM | Cstrike - Rezolvarea buguri'lor + creerea unui cod nou :)//
//sDs|Aragon*
//sN1kkeRs. - pentru testari//
//DaNNe. - nu stiu :))//
///////////////

#include <amxmodx> 
#include <amxmisc>
#include <cstrike> 
#include <fakemeta_util>   
#include <hamsandwich> 
#include <ColorChat>

#pragma tabsize 0

#define PLUGIN    "Furiens Weapons"
#define VERSION    "1.0"  


new bool:HaveWeapon[ 33 ];
new bool:Speed[ 33 ];
new bool:Gravity[ 33 ];


new CvarHP, CvarAP, CvarSpeed, CvarGravity;

public plugin_init() 
{ 
    register_plugin(PLUGIN, VERSION, "Ionut.");
 
    CvarHP = register_cvar("ak47_health", "255" );
    CvarAP = register_cvar("m4a1_armor", "255" );
    CvarSpeed = register_cvar("mp5_speed", "500.0" );
    CvarGravity = register_cvar("xm1014", "0.5" );
    
 
    RegisterHam(Ham_Spawn, "player", "Player_Spawn");
    register_event( "CurWeapon", "CurrWeapon", "be", "1=1" );
    register_clcmd("say /weapons", "CMDWeapons" );
} 

public plugin_cfg() {
   new iCfgDir[32], iFile[192];
   
   get_configsdir(iCfgDir, charsmax(iCfgDir));
   formatex(iFile, charsmax(iFile), "%s/CvarWeapons.cfg", iCfgDir);
   
   if(!file_exists(iFile)) {
      server_print("[Weapons] CvarWeapons.cfg nu exista. Se creeaza.", iFile);
      write_file(iFile, " ", -1);
   }
   
   else {      
      server_print("[Weapons] CvarWeapons.cfg sa incarcat.", iFile);
      server_cmd("exec %s", iFile);
   }
}

public Player_Spawn(id) 
{ 
    if(is_user_alive(id)) 
    { 
        new CsTeams:team = cs_get_user_team(id) 
        switch(team) 
        { 
		
            case CS_TEAM_T: 
            { 
                fm_strip_user_weapons(id);
                fm_give_item(id, "weapon_knife");
                fm_give_item(id, "weapon_hegrenade"); 
                fm_give_item(id, "weapon_flashbang"); 
                fm_give_item(id, "weapon_smokegrenade"); 
                cs_set_user_bpammo(id, CSW_FLASHBANG, 2 );
            }
	    
            case CS_TEAM_CT: 
            { 
                fm_strip_user_weapons(id);
                fm_give_item(id, "weapon_knife"); 
                fm_give_item(id, "weapon_hegrenade");
                fm_give_item(id, "weapon_smokegrenade"); 
                fm_give_item(id, "weapon_flashbang");
                cs_set_user_bpammo(id, CSW_FLASHBANG, 2 );
                fm_give_item(id, "weapon_deagle");
                cs_set_user_bpammo(id, CSW_DEAGLE, 120); 
		
                CMDWeapons( id )
		
                Gravity[ id ] = false;
                Speed[ id ] = false;
                HaveWeapon[ id ] = false;
                
            }
        }
    }  
}

public CurrWeapon( id ) {
	
	if( Speed[ id ] ) {
		
		fm_set_user_maxspeed( id, float(get_pcvar_num( CvarSpeed )) );
	}
	else {
		fm_set_user_maxspeed( id, 260.0 );
	}
	if( Gravity[ id ] ) {
		
		fm_set_user_gravity( id, float(get_pcvar_num( CvarGravity )) );
	}
	else {

		fm_set_user_gravity( id, 1.0 );
	}
}

public  WeaponsClCMD( id ) {

	new Weapons = menu_create("Meniu de arme Anti-Furien", "menu_handler");  
	
      if(!(is_user_alive(id))) {
      new buffer[256];
      formatex(buffer,sizeof(buffer)-1,"\yAK47 \d[ Only Alive ]");
      menu_additem(Weapons, buffer, "1", 0);
   }
   else {
      new buffer[256];
      formatex(buffer,sizeof(buffer)-1,"\wAK47 \y[ \rHealth ++\y ]");
      menu_additem(Weapons, buffer, "1", 0);
   }
         if(!(is_user_alive(id))) {
      new buffer[256];
      formatex(buffer,sizeof(buffer)-1,"\yM4A1 \d[ Only Alive ]");
      menu_additem(Weapons, buffer, "2", 0);
   }
   else {
      new buffer[256];
      formatex(buffer,sizeof(buffer)-1,"\wM4A1 \y[ \rArmor ++\y ]");
      menu_additem(Weapons, buffer, "2", 0);
   }
         if(!(is_user_alive(id))) {
      new buffer[256];
      formatex(buffer,sizeof(buffer)-1,"\yMP5 Navy \d[ Only Alive ]");
      menu_additem(Weapons, buffer, "3", 0);
   }
   else {
      new buffer[256];
      formatex(buffer,sizeof(buffer)-1,"\wMP5 Navy \y[ \r Speed ++\y ]");
      menu_additem(Weapons, buffer, "3", 0);
   }
         if(!(is_user_alive(id))) {
      new buffer[256];
      formatex(buffer,sizeof(buffer)-1,"\yXM1014 \d[ Only Alive ]");
      menu_additem(Weapons, buffer, "4", 0);
   }
   else {
      new buffer[256];
      formatex(buffer,sizeof(buffer)-1,"\wXM1014 \y[ \rGravity ++\y ]");
      menu_additem(Weapons, buffer, "4", 0);
   }

   menu_setprop(Weapons, MPROP_EXIT, MEXIT_ALL);
   menu_display(id, Weapons, 0);
   return PLUGIN_CONTINUE;
}

public menu_handler(id, Weapons, item)  
{  
	
	if( !is_user_alive( id ) ) 
	{
		ColorChat( id, GREEN, "^x01[^x04Weapons^x01 ] Trebue sa fii in viata pentru a alege o arma!" );
		return PLUGIN_HANDLED;
	}
	
    if( item == MENU_EXIT )  
    {  
        menu_destroy(Weapons);  
        return PLUGIN_HANDLED;  
    }  
    new data[6], iName[64];  
    new access, callback;  
    menu_item_getinfo(Weapons, item, access, data,5, iName, 63, callback);  
    new key = str_to_num(data);  
    
    switch(key)  
    {  
        case 1:  
        {  
		
            fm_give_item(id, "weapon_ak47");
            cs_set_user_bpammo(id,CSW_AK47,250);
            HaveWeapon[ id ] = true;
	   fm_set_user_health(id, get_pcvar_num( CvarHP ) );
	    
            ColorChat(0, GREEN, "Pretenas'ul %s a luat arma AK47 + Health [ ++ ]!", get_name( id ));
        }  
        case 2:  
        {  
            fm_give_item(id, "weapon_m4a1");  
            cs_set_user_bpammo(id,CSW_M4A1,250); 
            HaveWeapon[ id ] = true;  
	    
	    fm_set_user_armor(id, get_pcvar_num( CvarAP ) );
	    
	    
            ColorChat(0, GREEN, "Pretenas'ul %s a luat arma M4A1 + Armor [ ++ ]!", get_name( id ));
        }  
        case 3:   
        {  
            fm_give_item(id, "weapon_mp5navy");
            cs_set_user_bpammo(id,CSW_MP5NAVY,250);  
            HaveWeapon[ id ] = true;
	    
	    Speed[ id ] = true;
	    CurrWeapon( id );
	    

            ColorChat(0, GREEN, "Pretenas'ul %s a luat arma MP5 Navy + Speed [ ++ ]!", get_name( id ));
        }  
        case 4:   
        {  
            fm_give_item(id, "weapon_xm1014"); 
            cs_set_user_bpammo(id,CSW_XM1014,250);
            HaveWeapon[ id ] = true;
	    
	    Gravity[ id ] = true;
	    CurrWeapon( id );
	    
            ColorChat(0, GREEN, "^x01Pretenas'ul ^x04%s^x01 a luat arma XM1014 +  Gravity [ ++ ]!", get_name(id));
        }  
       }  
    
    
    
    menu_destroy(Weapons);  
    return PLUGIN_HANDLED;  
}


public CMDWeapons( id ) {
	
	if( !is_user_alive(id) )
	{
		ColorChat(id, GREEN, "Pretenas nu poti cumpara cand esti mort!");
		return 
	}
	if( HaveWeapon[ id ] )
	{
		ColorChat(id, GREEN, "Pretenas ti-ai ales deja arma!");
		return 
	}
	if( cs_get_user_team(id) == CS_TEAM_CT )
	{
		WeaponsClCMD( id );
	}
}

stock get_name( id )
{
	new name[ 32 ];
	get_user_name( id, name, sizeof ( name ) -1 );
	
	return name;
}
Nume: Anti-Furien Weapons
Versiune: 1.0
Link oficial: http://www.extreamcs.com

Instalare:
1. Fisierul ce-nume-iati-pus.sma il puneti in addons/amxmodx/scripting
2. Fisierul ce-nume-iati-pus.amxx il puneti in addons/amxmodx/plugins
3. Intrati in fisierul addons/amxmodx/configs/plugins.ini si adaugati la urma:

Code: Select all

ce-nume-iati-pus.amxx
4. Alti pasi necesari....

Cvar-uri (se adauga in fisierul amxmodx\configs\amxx.cfg):
n-are

Comenzi administrative (se tasteaza in consola si trebuie sa fiti administrator):
n-are

Comenzi publice (se tasteaza in joc prin apasarea tastei Y):
  • /weapons - meniu arme Anti-Furien
Module necesare (se sterge ; din fata modulului de mai jos; acestea le gasiti in fisierul amxmodx\configs\modules.ini):
le vedeti in sma

Imagini:
chiar acum fac poze si le pun :D
Last edited by Filip. on 05 Feb 2014, 00:48, edited 10 times in total.
Daca vrei sa faci profit case opening
eXtreamSHOP
User avatar
Chris Duskblade
Utilizator neserios (tepar)
Utilizator neserios (tepar)
Posts: 2801
Joined: 18 Jun 2013, 15:46
Detinator Steam: Da
Reputatie: Fost super moderator
Nume anterior: Cristinel.
Utilizator neserios (tepar)
Location: Timișoara
Has thanked: 62 times
Been thanked: 15 times
Contact:

04 Feb 2014, 09:03

Daca faci niste poze , esti cel mai tare .
User avatar
sN1kkeRs.
Membru, skill +3
Membru, skill +3
Posts: 1058
Joined: 19 Sep 2013, 18:43
Detinator Steam: Da
Detinator server CS: Da
SteamID: bzk15
Location: Brăila
Has thanked: 124 times
Been thanked: 36 times
Contact:

04 Feb 2014, 09:45

Eu l-am băgat dar nu îmi deschide meniul la începutul rundei şi nici dacă scriu /weapons.
User avatar
Filip.
Utilizator neserios (tepar)
Utilizator neserios (tepar)
Posts: 1001
Joined: 16 Oct 2013, 22:17
Detinator Steam: Nu
Reputatie: Restrictie moderator
Nume anterior: andre.w
Location: lasa
Has thanked: 60 times
Been thanked: 27 times
Contact:

04 Feb 2014, 10:20

Code: Select all

Daca faci niste poze , esti cel mai tare .
azi bag si poze

Code: Select all

Eu l-am băgat dar nu îmi deschide meniul la începutul rundei şi nici dacă scriu /weapons.
rezolv si bugu ala..

edit: acum am vazut :)) n-am bagat comanda /weapons =)) imd dau edit si o pun :))[/color]
[/b]
Daca vrei sa faci profit case opening
User avatar
sN1kkeRs.
Membru, skill +3
Membru, skill +3
Posts: 1058
Joined: 19 Sep 2013, 18:43
Detinator Steam: Da
Detinator server CS: Da
SteamID: bzk15
Location: Brăila
Has thanked: 124 times
Been thanked: 36 times
Contact:

04 Feb 2014, 10:38

andre.w wrote:

Code: Select all

Daca faci niste poze , esti cel mai tare .
azi bag si poze

Code: Select all

Eu l-am băgat dar nu îmi deschide meniul la începutul rundei şi nici dacă scriu /weapons.
rezolv si bugu ala..

edit: acum am vazut :)) n-am bagat comanda /weapons =)) imd dau edit si o pun :))[/color]
[/b]
:)) Abia aştept, şi felicitări pentru plugin.
User avatar
Filip.
Utilizator neserios (tepar)
Utilizator neserios (tepar)
Posts: 1001
Joined: 16 Oct 2013, 22:17
Detinator Steam: Nu
Reputatie: Restrictie moderator
Nume anterior: andre.w
Location: lasa
Has thanked: 60 times
Been thanked: 27 times
Contact:

04 Feb 2014, 10:48

sN1kkeRs. wrote:
andre.w wrote:

Code: Select all

Daca faci niste poze , esti cel mai tare .
azi bag si poze

Code: Select all

Eu l-am băgat dar nu îmi deschide meniul la începutul rundei şi nici dacă scriu /weapons.
rezolv si bugu ala..

edit: acum am vazut :)) n-am bagat comanda /weapons =)) imd dau edit si o pun :))[/color]
[/b]
:)) Abia aştept, şi felicitări pentru plugin.
Mersi, vezi acum daca merge..
Daca vrei sa faci profit case opening
User avatar
sN1kkeRs.
Membru, skill +3
Membru, skill +3
Posts: 1058
Joined: 19 Sep 2013, 18:43
Detinator Steam: Da
Detinator server CS: Da
SteamID: bzk15
Location: Brăila
Has thanked: 124 times
Been thanked: 36 times
Contact:

04 Feb 2014, 11:22

Nu merge să îl compilez

Image
User avatar
Truth*
Scripter eXtreamCS
Scripter eXtreamCS
Posts: 766
Joined: 11 Oct 2013, 10:08
Detinator Steam: Da
SteamID: Ezeru
Reputatie: Moderator ajutator
Membru Club eXtreamCS (4 luni)
Nume anterior: HyperioN.
Scripter eXtreamCS
0.2 / 3
Fond eXtream: 0
Location: Sibiu
Has thanked: 44 times
Been thanked: 122 times
Contact:

04 Feb 2014, 11:24

Sper sa iti placa modificarile aduse :P

Poftim :
SURSA modificata de mine :P | Afiseaza codul
#include <amxmodx> 
#include <amxmisc>
#include <cstrike> 
#include <fakemeta_util>   
#include <hamsandwich> 
#include <ColorChat>

#pragma tabsize 0

#define PLUGIN    "Furiens Weapons"
#define VERSION    "1.0"  

#define is_valid_player(%1) (1 <= %1 <= 32)

new bool:HaveWeapon[ 33 ];
new bool:Speed[ 33 ];
new bool:Gravity[ 33 ];


new CvarHP, CvarAP, CvarSpeed, CvarGravity;

public plugin_init() 
{ 
    register_plugin(PLUGIN, VERSION, "Ionut.");
 
    CvarHP = register_cvar("ak47_health", "255" );
    CvarAP = register_cvar("m4a1_armor", "255" );
    CvarSpeed = register_cvar("mp5_speed", "500.0" );
    CvarGravity = register_cvar("xm1014", "0.5" );
    
 
    RegisterHam(Ham_Spawn, "player", "Player_Spawn", true);
    register_event( "CurWeapon", "CurrWeapon", "be", "1=1" );
    register_clcmd("say /weapons", "CMDWeapons" );
} 

public Player_Spawn(id) 
{ 
    if(is_user_alive(id) && is_valid_player(id)) 
    { 
        new CsTeams:team = cs_get_user_team(id) 
        switch(team) 
        { 
            case CS_TEAM_T: 
            { 
                fm_strip_user_weapons(id);
                fm_give_item(id, "weapon_knife");
                fm_give_item(id, "weapon_hegrenade"); 
                fm_give_item(id, "weapon_flashbang"); 
                fm_give_item(id, "weapon_smokegrenade"); 
                cs_set_user_bpammo(id, CSW_FLASHBANG, 2 );
            } 
            case CS_TEAM_CT: 
            { 
                fm_strip_user_weapons(id);
                fm_give_item(id, "weapon_knife"); 
                fm_give_item(id, "weapon_hegrenade");
                fm_give_item(id, "weapon_smokegrenade"); 
                fm_give_item(id, "weapon_flashbang");
                cs_set_user_bpammo(id, CSW_FLASHBANG, 2 );
                fm_give_item(id, "weapon_deagle");
                cs_set_user_bpammo(id, CSW_DEAGLE, 120); 
		
                CMDWeapons( id );
		
                Gravity[ id ] = false;
                Speed[ id ] = false;
                HaveWeapon[ id ] = false;
                
            }
        }
    }  
}

public CurrWeapon( id ) {
	
	if( Speed[ id ] ) {
		
		fm_set_user_maxspeed( id, float(get_pcvar_num( CvarSpeed )) );
	}
	else {
		fm_set_user_maxspeed( id, 260.0 );
	}
	if( Gravity[ id ] ) {
		
		fm_set_user_gravity( id, float(get_pcvar_num( CvarGravity )) );
	}
	else {

		fm_set_user_gravity( id, 1.0 );
	}
}

public  WeaponsClCMD( id ) {

	new Weapons = menu_create("Meniu de arme Anti-Furien", "menu_handler");  
                
                menu_additem(Weapons, "AK47 \y[ Health \r++\y ]", "1", 0);  
                menu_additem(Weapons, "M4A1 \y[ Armor \r++\y ]", "2", 0);  
                menu_additem(Weapons, "MP5 Navy \y[ Speed \r++\y ]", "3", 0);  
                menu_additem(Weapons, "XM1014 \y[ Gravitatie \r++\y ]", "4", 0);   
                
	menu_setprop(Weapons, MPROP_EXIT, MEXIT_ALL);  
                
	menu_display(id, Weapons, 0);
}
public menu_handler(id, Weapons, item)  
{  
    if( item == MENU_EXIT )  
    {  
        menu_destroy(Weapons);  
        return PLUGIN_HANDLED;  
    }  
    new data[6], iName[64];  
    new access, callback;  
    menu_item_getinfo(Weapons, item, access, data,5, iName, 63, callback);  
    new key = str_to_num(data);  
    
    switch(key)  
    {  
        case 1:  
        {  
		
            fm_give_item(id, "weapon_ak47");
            cs_set_user_bpammo(id,CSW_AK47,250);
            HaveWeapon[ id ] = true;
	    fm_set_user_health(id, get_pcvar_num( CvarHP ) );
	    
            ColorChat(0, GREEN, "Pretenas'ul %s a luat arma AK47!", get_name( id ) );
        }  
        case 2:  
        {  
            fm_give_item(id, "weapon_m4a1");  
            cs_set_user_bpammo(id,CSW_M4A1,250); 
            HaveWeapon[ id ] = true;  
	    
	    fm_set_user_armor(id, get_pcvar_num( CvarAP ) );
	    
	    
            ColorChat(0, GREEN, "Pretenas'ul %s a luat arma M4A1!", get_name( id ) );
        }  
        case 3:   
        {  
            fm_give_item(id, "weapon_mp5navy");
            cs_set_user_bpammo(id,CSW_MP5NAVY,250);  
            HaveWeapon[ id ] = true;
	    
	    Speed[ id ] = true;
	    CurrWeapon( id );
	    

            ColorChat(0, GREEN, "Pretenas'ul %s a luat arma MP5 Navy!", get_name( id ) );
        }  
        case 4:   
        {  
            fm_give_item(id, "weapon_xm1014"); 
            cs_set_user_bpammo(id,CSW_XM1014,250);
            HaveWeapon[ id ] = true;
	    
	    Gravity[ id ] = true;
	    CurrWeapon( id );
	    
            ColorChat(0, GREEN, "Pretenas'ul %s a luat arma XM1014!", get_name(id) );
        }  
       }  
    
    
    
    menu_destroy(Weapons);  
    return PLUGIN_HANDLED;  
}


public CMDWeapons( id ) {
	
	if( !is_user_alive(id) )
	{
		ColorChat(id, GREEN, "Pretenas nu poti cumpara cand esti mort!");
	}
	if( HaveWeapon[ id ] )
	{
		ColorChat(id, GREEN, "Pretenas ti-ai ales deja arma!");
	}
	if( cs_get_user_team(id) == CS_TEAM_CT )
	{
		WeaponsClCMD( id );
	}
}

stock get_name( id )
{
	new name[ 32 ];
	get_user_name( id, name, sizeof ( name ) -1 );
	
	return name;
}
P.S.: Netestat = Nu am avut timp să mă uit atent peste cod. Deci ceea ce am scris este posibil să fie greşit sau să aibă erori.

If i helped you and you wanna thank me, you can donate at this link : here
This will motivate me to help you in the future.
[If you want a private plugin send me a PM.(No complex plugins please, I am a student and I don't have the time to make those)]
User avatar
Filip.
Utilizator neserios (tepar)
Utilizator neserios (tepar)
Posts: 1001
Joined: 16 Oct 2013, 22:17
Detinator Steam: Nu
Reputatie: Restrictie moderator
Nume anterior: andre.w
Location: lasa
Has thanked: 60 times
Been thanked: 27 times
Contact:

04 Feb 2014, 11:30

Mersi >:D< il postez :)
Daca vrei sa faci profit case opening
User avatar
sN1kkeRs.
Membru, skill +3
Membru, skill +3
Posts: 1058
Joined: 19 Sep 2013, 18:43
Detinator Steam: Da
Detinator server CS: Da
SteamID: bzk15
Location: Brăila
Has thanked: 124 times
Been thanked: 36 times
Contact:

04 Feb 2014, 11:33

Pluginl merge dacă dau amx_plugins dar la începutul rundei nu îmi apare meniul şi nici dacă scriu /weapons
User avatar
Filip.
Utilizator neserios (tepar)
Utilizator neserios (tepar)
Posts: 1001
Joined: 16 Oct 2013, 22:17
Detinator Steam: Nu
Reputatie: Restrictie moderator
Nume anterior: andre.w
Location: lasa
Has thanked: 60 times
Been thanked: 27 times
Contact:

04 Feb 2014, 11:36

Incearca acum :) am pus in primu post.
Daca vrei sa faci profit case opening
User avatar
sN1kkeRs.
Membru, skill +3
Membru, skill +3
Posts: 1058
Joined: 19 Sep 2013, 18:43
Detinator Steam: Da
Detinator server CS: Da
SteamID: bzk15
Location: Brăila
Has thanked: 124 times
Been thanked: 36 times
Contact:

04 Feb 2014, 11:40

andre.w wrote:
Incearca acum :) am pus in primu post.
Pai da acel plugin postat de NicutaMM, nu merge.
Post Reply

Return to “Pluginuri eXtream”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 4 guests