Furien Shop Advance

Pluginuri pentru modul AmxModX.

Moderators: Moderatori ajutatori, Moderatori, Echipa eXtreamCS.com

User avatar
vladu888
Membru, skill +1
Membru, skill +1
Posts: 272
Joined: 29 Jun 2013, 08:54
Detinator Steam: Nu
CS Status: Joc Furien.
Location: Fagaras,Brasov
Has thanked: 46 times
Been thanked: 13 times
Contact:

19 Dec 2013, 23:51

Descriere: La cererea unui utilizator prin pm i-am facut acest shop de furien care identifica daca ai bani sau nu pentru acel lucru.

Plugin: Furien Shop
Versiune: 0.0.4
Autor: -Turbo-

Descarcare:
Sursa:
| Afiseaza codul
#include < amxmodx >
#include < amxmisc>
#include < engine >
#include < cstrike >
#include < hamsandwich >
#include < fakemeta >
#include < fakemeta_util >
#include < colorchat >
#include < fun >
#include < fcs >


#define PLUGIN "Furien Shop"
#define VERSION "0.0.4"
#define AUTHOR "-Turbo-"
#define EDITOR "Vlad(vladu888)"


#define ViewMaxModels 4

new ViewModels [ ViewMaxModels + 1 ] [ ] = {
	
	"models/shop/v_super_cutit2.mdl",
	"models/shop/v_goldenak.mdl",
	"models/shop/v_dragonclaws.mdl",
        "models/shop/v_tigerknife.mdl",
	""
};

new iWeapon[33];
public plugin_init() 
{
	register_plugin(PLUGIN, VERSION, AUTHOR);
	
	register_clcmd("say /shop", "FurienShop", 0);
	register_clcmd("say shop", "FurienShop", 0);
	register_clcmd("say_team /shop", "FurienShop", 0);
	register_clcmd("say_team shop", "FurienShop", 0);
	register_event ( "CurWeapon", "CurrentWeapon", "be", "1=1" );
	RegisterHam ( Ham_TakeDamage, "player", "Player_TakeDamage" );
	register_event( "DeathMsg" , "DeathMsgEvent" , "a" ); 
}

public plugin_precache ( ) 
{
	new vmodel;
	for ( vmodel = 0; vmodel < sizeof ( ViewModels ); vmodel++ )
		engfunc ( EngFunc_PrecacheModel, ViewModels [ vmodel ] );
}

public DeathMsgEvent() 
{ 
	new iVictim = read_data( 2 ); 
	iWeapon[iVictim] = 0
}  

public CurrentWeapon ( id ) 
{
	new szWeapon = get_user_weapon( id );
	if(is_user_alive(id))
	{
		switch(iWeapon[id])
		{
			case 1:
			{
				if(szWeapon == CSW_KNIFE && get_user_team(id) == 1)
					set_pev ( id, pev_viewmodel2, ViewModels [ 0 ] );
				
			}
			case 2:
			{
				if(szWeapon == CSW_AK47 && get_user_team(id) == 2)
					set_pev ( id, pev_viewmodel2, ViewModels [ 1 ] );
				
			}
			case 3:
			{
				if(szWeapon == CSW_KNIFE && get_user_team(id) == 1)
					set_pev ( id, pev_viewmodel2, ViewModels [ 2 ] );	
				
			}
                        case 4:
			{
				if(szWeapon == CSW_KNIFE && get_user_team(id) == 1)
					set_pev ( id, pev_viewmodel2, ViewModels [ 3 ] );	
				
			}
		}
	}
}

public FurienShop ( id ) 
{	
	switch(get_user_team(id))
	{
		case 1: set_task( 0.1, "ShowFurien", id );
			
		case 2: set_task( 0.1, "ShowAntiFurien", id );
	}
	
}

public ShowAntiFurien(id, level, cid) 
{   
	new menu = menu_create( "\rAnti\w-\rFurien \yBuying", "antifurienhandler");
        new iCredits = fcs_get_user_credits( id );
        new iMoney = cs_get_user_money(id);
	if( iMoney < 10000 ) 
	{
		menu_additem( menu, "\rGolden Ak47\y[10000$]\y - \dNo Money", "1", 0 )
	}
	else if( iMoney >= 10000 ) 
	{
		menu_additem( menu, "\rGolden Ak47\y - \w[ \y10000 \w$ ]", "1", 0 )
	}
	if( iMoney < 300 ) 
	{
		menu_additem( menu, "\rDefuse Kit\y[300$]\y - \dNo Money", "2", 0 )
	}
	else if( iMoney >= 300 ) 
	{
		menu_additem( menu, "\rDefuse Kit\y - \w[ \y300 \w$ ]", "2", 0 )
	}
	if( iMoney < 3000 ) 
	{
		menu_additem( menu, "\r50 Health\y[3000$]\y - \dNo Money", "3", 0 )
	}
	else if( iMoney >= 3000 ) 
	{
		menu_additem( menu, "\r50 Health\y - \w[ \y3000 \w$ ]", "3", 0 )
	}
	if( iMoney < 1000 ) 
	{
		menu_additem( menu, "\r100 Armura\y[1000$]\y - \dNo Money", "4", 0 )
	}
	else if( iMoney >= 1000 ) 
	{
		menu_additem( menu, "\r100 Armura\y - \w[ \y1000 \w$ ]", "4", 0 )
	}
	if( iMoney < 2500 ) 
	{
		menu_additem( menu, "\rHe Grenade\y[2500$]\y - \dNo Money", "5", 0 )
	}
	else if( iMoney >= 2500 ) 
	{
		menu_additem( menu, "\rHe Grenade\y - \w[ \y2500 \w$ ]", "5", 0 )
	}
	
	menu_setprop(menu, MPROP_EXIT, MEXIT_ALL);
	menu_display(id, menu, 0);
}

public ShowFurien(id, level, cid) 
{    
	new menu = menu_create( "\rFurien \yBuying", "furienhandler");
        new iCredits = fcs_get_user_credits( id );
        new iMoney = cs_get_user_money(id);
	if( iMoney < 12000 ) 
	{
		menu_additem( menu, "\rSuper Knife\y[12000$]\y - \dNo Money", "0", 0 )
	}
	else if( iMoney >= 12000 ) 
	{
		menu_additem( menu, "\rSuper Knife\y - \w[ \y12000 \w$ ]", "0", 0 )
	}
        if( iCredits < 10 ) 
	{
		menu_additem( menu, "\rTiger Knife\y[10 C.]\y - \dNo Credits", "1", 0 )
	}
	else if( iCredits >= 10 ) 
	{
		menu_additem( menu, "\rTiger Knife\y - \w[ \y10 \wCredits ]", "1", 0 )
	}
	if( iMoney < 2500 ) 
	{
		menu_additem( menu, "\rHe Grenade\y[2500$]\y - \dNo Money", "2", 0 )
	}
	else if( iMoney >= 2500 ) 
	{
		menu_additem( menu, "\rHe Grenade\y - \w[ \y2500 \w$ ]", "2", 0 )
	}
	if( iMoney < 3000 ) 
	{
		menu_additem( menu, "\r50 Health\y[3000$]\y - \dNo Money", "3", 0 )
	}
	else if( iMoney >= 3000 ) 
	{
		menu_additem( menu, "\r50 Health\y - \w[ \y3000 \w$ ]", "3", 0 )
	}
	if( iMoney < 1000 ) 
	{
		menu_additem( menu, "\r100 Armor\y[1000$]\y - \dNo Money", "4", 0 )
	}
	else if( iMoney >= 1000 ) 
	{
		menu_additem( menu, "\r100 Armor\y - \w[ \y1000 \w$ ]", "4", 0 )
	}
        if( iCredits < 20 )
	{
		menu_additem( menu, "\rElf Potion\y[20 C.]\y - \dNo Credits", "5", 0 )
	}
	else if( iCredits >= 20 ) 
	{
		menu_additem( menu, "\rElf Potion\y - \w[ \y20 \wCredits ]", "5", 0 )
	}
	
	menu_setprop(menu, MPROP_EXIT, MEXIT_ALL);
	menu_display(id, menu, 0);
}

public furienhandler (id, menu, item, level, cid) 
{
	if( item == MENU_EXIT )
	{
		return 1;
	}
	
	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);
	
	switch(key)
	{  
		case 0:
		{	
			new iMoney = cs_get_user_money ( id ) - 12000;
			if( iMoney < 0 )
			{
				ColorChat( id, GREEN, "^x01[ ^x04 FurienShop ^x01 ]^x03 Nu ai destui bani!");
				return 1;
				
			}
			else
			{ 
				iWeapon[id] = 1;
				CurrentWeapon( id );
				cs_set_user_money(id, cs_get_user_money(id) - 12000);
				ColorChat( id, GREEN, "^x01[ ^x04 FurienShop ^x01 ]^x03 Ai cumparat ^x01 SuperKnife!");
				return 1;
			}
		}
        case 1:
		{
			new iCredits = fcs_get_user_credits ( id ) - 10;
			if( iCredits < 0 )
			{
				ColorChat( id, GREEN, "^x01[ ^x04 FurienShop ^x01 ]^x03 Nu ai destui bani!");
				return 1;
				
			}
			else
			{ 
				iWeapon[id] = 4;
				CurrentWeapon( id );
				fcs_set_user_credits( id, iCredits );
				ColorChat( id, GREEN, "^x01[ ^x04 FurienShop ^x01 ]^x03 Ai cumparat ^x01 Tiger Knife!");
				return 1;
			}
                        
		}
		case 2:
		{	
			new iMoney = cs_get_user_money ( id ) - 2500;
			if( iMoney < 0 )
			{
				ColorChat( id, GREEN, "^x01[ ^x04 FurienShop ^x01 ]^x03 Nu ai destui bani!");
				return 1;
				
			}
			else
			{ 
				give_item ( id, "weapon_hegrenade" );
				cs_set_user_money(id, cs_get_user_money(id) - 2500);
				ColorChat( id, GREEN, "^x01[ ^x04 FurienShop ^x01 ]^x03 Ai cumparat ^x01HeGrenade!");
				return 1;
			}
		}
		
		case 3:
		{
			new iMoney = cs_get_user_money ( id ) - 3000;
			if( iMoney < 0 )
			{
				ColorChat( id, GREEN, "^x01[ ^x04 FurienShop ^x01 ]^x03 Nu ai destui bani !");
				return 1;
				
			}
			else
			{
				new Health = get_user_health ( id );
				if ( Health <= 300 ) 
				{
					set_user_health ( id, get_user_health ( id ) + 50 );
					cs_set_user_money(id, cs_get_user_money(id) - 3000);
					ColorChat( id, GREEN, "^x01[ ^x04 FurienShop ^x01 ]^x03 Ai cumparat ^x0 50 HP!");
					return 1;
				}
                                if( Health > 300 ) {
               
                                ColorChat( id, GREEN, "[FURIEN]^x01 You can't buy more^x03 300 HP^x01." );
                                return 1;
			        }
			}
		}
		case 4:
		{
			new iMoney = cs_get_user_money ( id ) - 1000;
			if( iMoney < 0 )
			{
				ColorChat( id, GREEN, "^x01[ ^x04 FurienShop ^x01 ]^x03 Nu ai destui bani");
				return 1;
				
			}
			else
			{
				new Armor = get_user_armor ( id );
				if ( Armor <= 200 ) 
				{
					set_user_armor( id, get_user_armor ( id ) + 100 );
					cs_set_user_money(id, cs_get_user_money(id) - 1000);
					ColorChat( id, GREEN, "^x01[ ^x04 FurienShop ^x01 ]^x03 Ai cumparat 100 AP!");
					return 1;
				}
			}
		}
		
		case 5:
		{
			new iCredits = fcs_get_user_credits ( id ) - 20;
			if( iCredits < 0 )
			{
				ColorChat( id, GREEN, "^x01[ ^x04 FurienShop ^x01 ]^x03 Nu ai destui bani!");
				return 1;
				
			}
			else
			{
				new Health = get_user_health ( id );
				if ( Health <= 300 ) 
				{
					set_user_health( id, get_user_health ( id ) + 250 );
					set_user_armor( id, get_user_armor ( id ) + 250 );
					iWeapon[id] = 3;
                                        CurrentWeapon( id );
					fcs_set_user_credits( id, iCredits );
					ColorChat( id, GREEN, "^x01[ ^x04 FurienShop ^x01 ]^x03 Ai cumparat ^x01 Elf Potion!");
					return 1;
				}
                                if( Health > 300 ) {
               
                                ColorChat( id, GREEN, "[FURIEN]^x01 You can't buy more^x03 300 HP^x01." );
                                return 1;
			        }
			}
		}
	}
	menu_destroy(menu);
	return 1;
}

public antifurienhandler(id, menu, item, level, cid) 
{
	if( item == MENU_EXIT )
	{
		return 1;
	}
	
	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);
	
	switch(key)
	{ 
		case 1:
		{	
			new iMoney = cs_get_user_money ( id ) - 10000;
			if( iMoney < 0 )
			{
				ColorChat( id, GREEN, "^x01[ ^x04 FurienShop ^x01 ]^x03 Nu ai destui bani!");
				return 1;
				
			}
			else
			{ 
				iWeapon[id] = 2;
				give_item ( id, "weapon_ak47" );
				cs_set_user_bpammo( id, CSW_AK47, 250 )
				CurrentWeapon( id );
				cs_set_user_money(id, cs_get_user_money(id) - 10000);
				ColorChat( id, GREEN, "^x01[ ^x04 FurienShop ^x01 ]^x03 Ai cumparat ^x01GoldenAk47!");
				return 1;
			}
		}
		
		case 2:
		{
			new iMoney = cs_get_user_money ( id ) - 300;
			if( iMoney < 0 )
			{
				ColorChat( id, GREEN, "^x01[ ^x04FurienShop^x01 ]^x03 Nu ai destui bani!");
				return 1;
				
			}
			else
			{ 
				fm_give_item ( id, "item_thighpack" );
				cs_set_user_money(id, cs_get_user_money(id) - 300);
				ColorChat( id, GREEN, "^x01[ ^x04 FurienShop ^x01 ]^x03 Ai cumparat ^x01DefuseKit!");
				return 1;
			}
		}
		
		case 3:
		{
			new iMoney = cs_get_user_money ( id ) - 3000;
			if( iMoney < 0 )
			{
				ColorChat( id, GREEN, "^x01[ ^x04 FurienShop ^x01 ]^x03 Nu ai destui bani !");
				return 1;
				
			}
			else
			{
				new Health = get_user_health ( id );
				if ( Health <= 300 ) 
				{
					fm_set_user_health ( id, get_user_health ( id ) + 50 );
					cs_set_user_money(id, cs_get_user_money(id) - 3000);
					ColorChat( id, GREEN, "^x01[ ^x04 FurienShop ^x01 ]^x03 Ai cumparat ^x01 50 HP!");
					return 1;
				}
                                if( Health > 300 ) {
               
                                ColorChat( id, GREEN, "[FURIEN]^x01 You can't buy more^x03 300 HP^x01." );
                                return 1;
				}
			}
		}
		case 4:
		{
			new iMoney = cs_get_user_money ( id ) - 1000;
			if( iMoney < 0 )
			{
				ColorChat( id, GREEN, "^x01[ ^x04 FurienShop ^x01 ]^x03 Nu ai destui bani");
				return 1;
				
			}
			else
			{
				new Armor = get_user_armor ( id );
				if ( Armor <= 300 ) 
				{
					fm_set_user_armor( id, get_user_armor ( id ) + 50 );
					cs_set_user_money(id, cs_get_user_money(id) - 1000);
					ColorChat( id, GREEN, "^x01[ ^x04 FurienShop ^x01 ]^x03 Ai cumparat 50 AP!");
					return 1;
				}
			}
		}
		
		case 5:
		{	
			new iMoney = cs_get_user_money ( id ) - 2500;
			if( iMoney < 0 )
			{
				ColorChat( id, GREEN, "^x01[ ^x04 FurienShop ^x01 ]^x03 Nu ai destui bani!");
				return 1;
				
			}
			else
			{ 
				give_item ( id, "weapon_hegrenade" );
				cs_set_user_money(id, cs_get_user_money(id) - 2500);
				ColorChat( id, GREEN, "^x01[ ^x04 FurienShop ^x01 ]^x03 Ai cumparat ^x01 HeGrenade!");
				return 1;
			}
                        
 }       
                         
	}
	
	menu_destroy(menu);
	return 1;
}

public Player_TakeDamage ( iVictim, iInflictor, iAttacker, Float:fDamage, iDamageBits )
{
	if(is_user_alive(iAttacker))
	{
		switch(iWeapon[iAttacker])
		{
			case 1:
			{
				if(iInflictor == iAttacker && get_user_weapon(iAttacker) == CSW_KNIFE && get_user_team(iAttacker) == 1)
					SetHamParamFloat( 4, fDamage * 2);
			}
			
			case 2:
			{
				if(iInflictor == iAttacker && get_user_weapon(iAttacker) == CSW_AK47 && get_user_team(iAttacker) == 2)
					SetHamParamFloat( 4, fDamage * 2);
				
			}
			case 3:
			{
				if(iInflictor == iAttacker && get_user_weapon(iAttacker) == CSW_KNIFE && get_user_team(iAttacker) == 1)
					SetHamParamFloat( 4, fDamage * 3);
				
			}
                         case 4:
			{
				if(iInflictor == iAttacker && get_user_weapon(iAttacker) == CSW_KNIFE && get_user_team(iAttacker) == 1)
					SetHamParamFloat( 4, fDamage * 4);
				
			}
		}
	}
	return HAM_HANDLED;
}
/* 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 }
*/
Imagini:
Inainte
| Afiseaza codul
Image
Dupa
| Afiseaza codul
Image
Comenzi:
Say ( Y ): /shop - Deschide magazinul

Resursele:
le voi posta daca nu le luati voi din cod
| Afiseaza codul
"models/shop/v_super_cutit2.mdl",
	"models/shop/v_goldenak.mdl",
	"models/shop/v_dragonclaws.mdl",
        "models/shop/v_tigerknife.mdl",
Last edited by vladu888 on 20 Dec 2013, 12:42, edited 4 times in total.
Image
Rapidserver
Cosmin
Fost moderator
Fost moderator
Posts: 9366
Joined: 06 Jul 2013, 21:08
Detinator Steam: Da
Detinator server CS: Nu
Reputatie: Fost eXtream Mod
Fost Scripter eXtreamCS
Nume anterior: scosmynnnn
Has thanked: 492 times
Been thanked: 546 times

19 Dec 2013, 23:56

Ori e facut de tine ori e facut de turbo ?
User avatar
vladu888
Membru, skill +1
Membru, skill +1
Posts: 272
Joined: 29 Jun 2013, 08:54
Detinator Steam: Nu
CS Status: Joc Furien.
Location: Fagaras,Brasov
Has thanked: 46 times
Been thanked: 13 times
Contact:

19 Dec 2013, 23:57

Shopul e de Turbo eu am adugat tiger knife si ce mai e nou eu l-am editat practic am adaugat sa scrie daca ai bani,credite sau nu , nu zica iarasi aia cv. de mine.
Image
User avatar
Jorj
eXtream Mod
eXtream Mod
Posts: 3500
Joined: 13 Aug 2013, 17:10
Detinator Steam: Da
Detinator server CS: Furien.LsZ.Ro
SteamID: clic_lsz
Reputatie: eXtream Mod
Fost Membru Club eXtreamCS (patru luni)
Nume anterior: Clic
Location: Piatra Neamt
Been thanked: 20 times
Contact:

20 Dec 2013, 10:03

ce facilitati are antifurien?
Intermediez tranzactii cand am chef si timp ! :)

Image
User avatar
FaTzZu
Fost moderator
Fost moderator
Posts: 1206
Joined: 22 Dec 2012, 18:37
Detinator Steam: Da
Reputatie: Fost moderator ajutator
Has thanked: 114 times
Been thanked: 168 times
Contact:

20 Dec 2013, 10:26

Foarte greu era sa pui 2-3 conditii ....
GJ
A fool's brain digests philosophy into folly, science into superstition, and art into pedantry.

#RETIRED.
User avatar
vladu888
Membru, skill +1
Membru, skill +1
Posts: 272
Joined: 29 Jun 2013, 08:54
Detinator Steam: Nu
CS Status: Joc Furien.
Location: Fagaras,Brasov
Has thanked: 46 times
Been thanked: 13 times
Contact:

20 Dec 2013, 10:59

Nu era greu dar daca l-am facu dc sa nu-l postez acuma.
Image
User avatar
Jorj
eXtream Mod
eXtream Mod
Posts: 3500
Joined: 13 Aug 2013, 17:10
Detinator Steam: Da
Detinator server CS: Furien.LsZ.Ro
SteamID: clic_lsz
Reputatie: eXtream Mod
Fost Membru Club eXtreamCS (patru luni)
Nume anterior: Clic
Location: Piatra Neamt
Been thanked: 20 times
Contact:

20 Dec 2013, 12:21

Shopu la antifurien?? ce contine
Intermediez tranzactii cand am chef si timp ! :)

Image
User avatar
vladu888
Membru, skill +1
Membru, skill +1
Posts: 272
Joined: 29 Jun 2013, 08:54
Detinator Steam: Nu
CS Status: Joc Furien.
Location: Fagaras,Brasov
Has thanked: 46 times
Been thanked: 13 times
Contact:

20 Dec 2013, 13:09

Golden ak 47 10000$
Defuse Kit 300$
50 hp 3000$
100 AP 1000$
He Grenade 2500$
Image
User avatar
^ionutz^
Fost moderator
Fost moderator
Posts: 2000
Joined: 05 Oct 2013, 14:12
Detinator Steam: Da
CS Status: activitate scazuta !
SteamID: /id/ionutz_cs/
Reputatie: Fost moderator ajutator
Location: Galati
Has thanked: 46 times
Been thanked: 23 times
Contact:

20 Dec 2013, 17:09

ne dai resursele cele originale ?
cS|^Beck'S Skull^
Membru, skill 0
Membru, skill 0
Posts: 39
Joined: 07 Oct 2013, 07:12
Detinator Steam: Da
Detinator server CS: Fury.DmGame.Ro
SteamID: xgreeneye
Has thanked: 2 times
Been thanked: 1 time
Contact:

20 Dec 2013, 17:25

eu am toate resursele :P
User avatar
DaNNe.
Fost moderator
Fost moderator
Posts: 2808
Joined: 08 Nov 2013, 20:43
Detinator Steam: Da
CS Status: Activitate scăzută
SteamID: /id/FurienMaster
Reputatie: Nick anterior: DnD. Gold, Emrys
0.5/3
Fost moderator ajutator
Fost Membru Club eXtreamCS (doua luni)
Has thanked: 230 times
Been thanked: 128 times
Contact:

20 Dec 2013, 19:37

cS|^Beck'S Skull^ wrote:eu am toate resursele :P
www.google.ro , intru si-mi iau de acolo :))
Contact: Activitate scazuta.
User avatar
^ionutz^
Fost moderator
Fost moderator
Posts: 2000
Joined: 05 Oct 2013, 14:12
Detinator Steam: Da
CS Status: activitate scazuta !
SteamID: /id/ionutz_cs/
Reputatie: Fost moderator ajutator
Location: Galati
Has thanked: 46 times
Been thanked: 23 times
Contact:

21 Dec 2013, 17:34

v_tigerknife.md doar asta imi mai trebuie :(
Post Reply

Return to “AmxModX”

  • Information
  • Who is online

    Users browsing this forum: Facebook [Bot] and 6 guests