Cerere plugin - Drshop

Categoria cu cereri de pluginuri si nu numai.

Moderators: Moderatori ajutatori, Moderatori, Echipa eXtreamCS.com

Forum rules
Accesează link-ul pentru a putea vedea regulile forumului

Daca doriti sa vi se modifice un plugin, va rugam postati aici .
User avatar
GhosT ***
Membru, skill +2
Membru, skill +2
Posts: 604
Joined: 04 Dec 2013, 21:52
Detinator Steam: Da
CS Status: Morphin . [ Retras ]
SteamID: Mutulica1428
Reputatie: Fost Moderator ajutator
Location: Dumesti.
Has thanked: 40 times
Been thanked: 99 times
Contact:

12 Dec 2013, 16:24

scosmynnnn wrote:

Code: Select all

	if(is_user_alive(id))
	{
		ColorChat(id, GREEN, "%s^x03 Trebuie sa fii in viata pentru a cumpara un item din shop !", szTag)
		return 1;
	}
	if(is_user_alive(id))
	{
		new menu = menu_create("\yDeath Run Shop", "shop_itm")
		
		menu_additem(menu, "\yNade Pack                [\w500$\y]", "1", 0)
		menu_additem(menu, "\yDeagle                 [\w16000$\y]", "2", 0)
		menu_additem(menu, "\y1000 Speed  	      [\w8000$\y]", "3", 0)
		menu_additem(menu, "\y600 Gravity             [\w8000$\y]", "4", 0)
		menu_additem(menu, "\yGodMode 30 Secunde     [\w16000$\y]", "5", 0)
	
		menu_setprop(menu, MPROP_EXIT, MEXIT_ALL)
		menu_display(id, menu, 0)
	}
	return PLUGIN_CONTINUE;
}
->>

Code: Select all

	if(!is_user_alive(id))
	{
		ColorChat(id, GREEN, "%s^x03 Trebuie sa fii in viata pentru a cumpara un item din shop !", szTag)
		return 1;
	}
	else
	{
		new menu = menu_create("\yDeath Run Shop", "shop_itm")
		
		menu_additem(menu, "\yNade Pack                [\w500$\y]", "1", 0)
		menu_additem(menu, "\yDeagle                 [\w16000$\y]", "2", 0)
		menu_additem(menu, "\y1000 Speed  	      [\w8000$\y]", "3", 0)
		menu_additem(menu, "\y600 Gravity             [\w8000$\y]", "4", 0)
		menu_additem(menu, "\yGodMode 30 Secunde     [\w16000$\y]", "5", 0)
	
		menu_setprop(menu, MPROP_EXIT, MEXIT_ALL)
		menu_display(id, menu, 0)
	}
	return PLUGIN_CONTINUE;
}
Cica ii da mesaju ala "Trebuie sa fii in viata pentru a cumpara un item din shop" daca e cum zici u :|
Rapidserver
User avatar
s0uNNNdx
Membru, skill +1
Membru, skill +1
Posts: 227
Joined: 28 Jul 2013, 22:30
Detinator Steam: Da
CS Status: Joc pe fun.free-play.ro
Detinator server CS: Fun.Free-Play.Ro
Location: Prahova
Has thanked: 32 times
Contact:

13 Dec 2013, 16:07

GhosT *** wrote:
| Afiseaza codul
#include <AmxModX>
#include <FakeMeta_Util>
#include <ColorChat>
#include <CStrike>
#include <fun>

#define PLUGIN "Dr Shop"
#define VERSION "1.0"
#define AUTHOR "GhosT"

new const szTag[] = "[SHOP]"

// Cvars

new nade_cost, deagle_cost, speed_cost, gravity_cost, godmode_cost;

public plugin_init()
{
	register_plugin(PLUGIN, VERSION, AUTHOR)
	
	register_clcmd("say /drshop", "shop")
	register_clcmd("say_team /drshop", "shop")
	register_concmd("drshop", "shop")
	register_concmd("shop", "shop")
	register_concmd("buy", "shop")
	
	// Cvars
	
	nade_cost = register_cvar("dr_nade_cost", "500")
	deagle_cost = register_cvar("dr_deagle_cost", "16000")
	speed_cost = register_cvar("dr_speed_cost", "5000")
	gravity_cost = register_cvar("dr_gravity_cost", "8000")
	godmode_cost = register_cvar("dr_godmode_cost", "16000")
}
public drshop(id)
{
	if(is_user_alive(id))
	{
		ColorChat(id, GREEN, "%s^x03 Trebuie sa fii in viata pentru a cumpara un item din shop !", szTag)
		return 1;
	}
	if(is_user_alive(id))
	{
		new menu = menu_create("\yDeath Run Shop", "shop_itm")
		
		menu_additem(menu, "\yNade Pack                [\w500$\y]", "1", 0)
		menu_additem(menu, "\yDeagle                 [\w16000$\y]", "2", 0)
		menu_additem(menu, "\y1000 Speed  	      [\w8000$\y]", "3", 0)
		menu_additem(menu, "\y600 Gravity             [\w8000$\y]", "4", 0)
		menu_additem(menu, "\yGodMode 30 Secunde     [\w16000$\y]", "5", 0)
	
		menu_setprop(menu, MPROP_EXIT, MEXIT_ALL)
		menu_display(id, menu, 0)
	}
	return PLUGIN_CONTINUE;
}
public shop_itm(id, menu, item)
{
	if(item == MEXIT_ALL)
	{
		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)
			if(iMoney < 0)
			{
				ColorChat(id, GREEN, "%s^x03 Nu ai suficienti bani pentru a cumpara acest item !", szTag)
				return 1;
			}
			else
			{
				fm_give_item(id, "weapon_hegrenade")
				fm_give_item(id, "weapon_flashbang")
				fm_give_item(id, "weapon_flashbang")
				fm_give_item(id, "weapon_smokegrenade")
				cs_set_user_money(id, iMoney - get_pcvar_num(nade_cost))
				ColorChat(id, GREEN, "%s^x03 Ai cumparat^x04 Nade Pack^x03 !", szTag)
			}
		}
		case 2:
		{
			new iMoney = cs_get_user_money(id)
			if(iMoney < 0)
			{
				ColorChat(id, GREEN, "%s^x03 Nu ai suficienti bani pentru a cumpara acest item !", szTag)
				return 1;
			}
			else
			{
				fm_give_item(id, "weapon_deagle")
				cs_set_user_bpammo(id, CSW_DEAGLE, 35)
				cs_set_user_money(id, iMoney - get_pcvar_num(deagle_cost))
				ColorChat(id, GREEN, "%s^x03 Ai cumparat^x04 Deagle^x03 !", szTag)
			}
		}
		case 3:
		{
			new iMoney = cs_get_user_money(id)
			if(iMoney < 0)
			{
				ColorChat(id, GREEN, "%s^x03 Nu ai suficienti bani pentru a cumpara acest item !", szTag)
				return 1;
			}
			else
			{
				fm_set_user_maxspeed(id, 1000.0)
				cs_set_user_money(id, iMoney - get_pcvar_num(speed_cost))
				ColorChat(id, GREEN, "%s^x03 Ai cumparat^x04 1000 Speed^x03 !", szTag)
			}
		}
		case 4:
		{
			new iMoney = cs_get_user_money(id)
			if(iMoney < 0)
			{
				ColorChat(id, GREEN, "%s^x03 Nu ai suficienti bani pentru a cumpara acest item !", szTag)
				return 1;
			}
			else
			{
				fm_set_user_gravity(id, 600.0)
				cs_set_user_money(id, iMoney - get_pcvar_num(gravity_cost))
				ColorChat(id, GREEN, "%s^x03 Ai cumparat^x04 600 Gravity^x03 !", szTag)
			}
		}
		case 5:
		{
			new iMoney = cs_get_user_money(id)
			if(iMoney < 0)
			{
				ColorChat(id, GREEN, "%s^x03 Nu ai suficienti bani pentru a cumpara acest item !", szTag)
				return 1;
			}
			else
			{
				set_user_godmode(id, 1)
				cs_set_user_money(id, iMoney - get_pcvar_num(godmode_cost))
				ColorChat(id, GREEN, "%s^x03 Ai cumparat^x04 GodMode^x03 pentru^x04 30 Secunde^x03 !", szTag)
				set_task(30.0, "stop_gm", id)
			}
		}
	}
	menu_destroy(menu)
	return 1;
}
public stop_gm(id)
{
	set_user_godmode(id, 0)
	ColorChat(id, GREEN, "%s^x03 Nu mai ai^x04 GodMode^x03 deoarece au trecut cele^x04 30 secunde^x03 !", szTag)
}
Incearca-l acum , am facut o greseala :D , bafta cu el , daca mai apar buguri spunele aici
Nu apare meniul
User avatar
GhosT ***
Membru, skill +2
Membru, skill +2
Posts: 604
Joined: 04 Dec 2013, 21:52
Detinator Steam: Da
CS Status: Morphin . [ Retras ]
SteamID: Mutulica1428
Reputatie: Fost Moderator ajutator
Location: Dumesti.
Has thanked: 40 times
Been thanked: 99 times
Contact:

13 Dec 2013, 16:54

s0uNNNdx wrote:
GhosT *** wrote:
| Afiseaza codul
#include <AmxModX>
#include <FakeMeta_Util>
#include <ColorChat>
#include <CStrike>
#include <fun>

#define PLUGIN "Dr Shop"
#define VERSION "1.0"
#define AUTHOR "GhosT"

new const szTag[] = "[SHOP]"

// Cvars

new nade_cost, deagle_cost, speed_cost, gravity_cost, godmode_cost;

public plugin_init()
{
	register_plugin(PLUGIN, VERSION, AUTHOR)
	
	register_clcmd("say /drshop", "shop")
	register_clcmd("say_team /drshop", "shop")
	register_concmd("drshop", "shop")
	register_concmd("shop", "shop")
	register_concmd("buy", "shop")
	
	// Cvars
	
	nade_cost = register_cvar("dr_nade_cost", "500")
	deagle_cost = register_cvar("dr_deagle_cost", "16000")
	speed_cost = register_cvar("dr_speed_cost", "5000")
	gravity_cost = register_cvar("dr_gravity_cost", "8000")
	godmode_cost = register_cvar("dr_godmode_cost", "16000")
}
public drshop(id)
{
	if(is_user_alive(id))
	{
		ColorChat(id, GREEN, "%s^x03 Trebuie sa fii in viata pentru a cumpara un item din shop !", szTag)
		return 1;
	}
	if(is_user_alive(id))
	{
		new menu = menu_create("\yDeath Run Shop", "shop_itm")
		
		menu_additem(menu, "\yNade Pack                [\w500$\y]", "1", 0)
		menu_additem(menu, "\yDeagle                 [\w16000$\y]", "2", 0)
		menu_additem(menu, "\y1000 Speed  	      [\w8000$\y]", "3", 0)
		menu_additem(menu, "\y600 Gravity             [\w8000$\y]", "4", 0)
		menu_additem(menu, "\yGodMode 30 Secunde     [\w16000$\y]", "5", 0)
	
		menu_setprop(menu, MPROP_EXIT, MEXIT_ALL)
		menu_display(id, menu, 0)
	}
	return PLUGIN_CONTINUE;
}
public shop_itm(id, menu, item)
{
	if(item == MEXIT_ALL)
	{
		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)
			if(iMoney < 0)
			{
				ColorChat(id, GREEN, "%s^x03 Nu ai suficienti bani pentru a cumpara acest item !", szTag)
				return 1;
			}
			else
			{
				fm_give_item(id, "weapon_hegrenade")
				fm_give_item(id, "weapon_flashbang")
				fm_give_item(id, "weapon_flashbang")
				fm_give_item(id, "weapon_smokegrenade")
				cs_set_user_money(id, iMoney - get_pcvar_num(nade_cost))
				ColorChat(id, GREEN, "%s^x03 Ai cumparat^x04 Nade Pack^x03 !", szTag)
			}
		}
		case 2:
		{
			new iMoney = cs_get_user_money(id)
			if(iMoney < 0)
			{
				ColorChat(id, GREEN, "%s^x03 Nu ai suficienti bani pentru a cumpara acest item !", szTag)
				return 1;
			}
			else
			{
				fm_give_item(id, "weapon_deagle")
				cs_set_user_bpammo(id, CSW_DEAGLE, 35)
				cs_set_user_money(id, iMoney - get_pcvar_num(deagle_cost))
				ColorChat(id, GREEN, "%s^x03 Ai cumparat^x04 Deagle^x03 !", szTag)
			}
		}
		case 3:
		{
			new iMoney = cs_get_user_money(id)
			if(iMoney < 0)
			{
				ColorChat(id, GREEN, "%s^x03 Nu ai suficienti bani pentru a cumpara acest item !", szTag)
				return 1;
			}
			else
			{
				fm_set_user_maxspeed(id, 1000.0)
				cs_set_user_money(id, iMoney - get_pcvar_num(speed_cost))
				ColorChat(id, GREEN, "%s^x03 Ai cumparat^x04 1000 Speed^x03 !", szTag)
			}
		}
		case 4:
		{
			new iMoney = cs_get_user_money(id)
			if(iMoney < 0)
			{
				ColorChat(id, GREEN, "%s^x03 Nu ai suficienti bani pentru a cumpara acest item !", szTag)
				return 1;
			}
			else
			{
				fm_set_user_gravity(id, 600.0)
				cs_set_user_money(id, iMoney - get_pcvar_num(gravity_cost))
				ColorChat(id, GREEN, "%s^x03 Ai cumparat^x04 600 Gravity^x03 !", szTag)
			}
		}
		case 5:
		{
			new iMoney = cs_get_user_money(id)
			if(iMoney < 0)
			{
				ColorChat(id, GREEN, "%s^x03 Nu ai suficienti bani pentru a cumpara acest item !", szTag)
				return 1;
			}
			else
			{
				set_user_godmode(id, 1)
				cs_set_user_money(id, iMoney - get_pcvar_num(godmode_cost))
				ColorChat(id, GREEN, "%s^x03 Ai cumparat^x04 GodMode^x03 pentru^x04 30 Secunde^x03 !", szTag)
				set_task(30.0, "stop_gm", id)
			}
		}
	}
	menu_destroy(menu)
	return 1;
}
public stop_gm(id)
{
	set_user_godmode(id, 0)
	ColorChat(id, GREEN, "%s^x03 Nu mai ai^x04 GodMode^x03 deoarece au trecut cele^x04 30 secunde^x03 !", szTag)
}
Incearca-l acum , am facut o greseala :D , bafta cu el , daca mai apar buguri spunele aici
Nu apare meniul
| Afiseaza codul
#include <AmxModX>
#include <FakeMeta_Util>
#include <ColorChat>
#include <CStrike>
#include <fun>

#define PLUGIN "Dr Shop"
#define VERSION "1.0"
#define AUTHOR "GhosT"

new const szTag[] = "[SHOP]"

// Cvars

new nade_cost, deagle_cost, speed_cost, gravity_cost, godmode_cost;

public plugin_init()
{
	register_plugin(PLUGIN, VERSION, AUTHOR)
	
	register_clcmd("say /drshop", "s_shop")
	register_clcmd("say_team /drshop", "s_shop")
	register_concmd("drshop", "s_shop")
	register_concmd("shop", "s_shop")
	register_concmd("buy", "s_shop")
	
	// Cvars
	
	nade_cost = register_cvar("dr_nade_cost", "500")
	deagle_cost = register_cvar("dr_deagle_cost", "16000")
	speed_cost = register_cvar("dr_speed_cost", "5000")
	gravity_cost = register_cvar("dr_gravity_cost", "8000")
	godmode_cost = register_cvar("dr_godmode_cost", "16000")
}
public s_shop(id)
{
	if(is_user_alive(id))
	{
		drshop(id)
	}
	else
	{
		ColorChat(id, GREEN, "%s^x03 Nu poti folosi shopul deoarece esti mort !", szTag)
	}
}
public drshop(id)
{
		new menu = menu_create("\yDeath Run Shop", "shop_itm")
		
		menu_additem(menu, "\yNade Pack                [\w500$\y]", "1", 0)
		menu_additem(menu, "\yDeagle                 [\w16000$\y]", "2", 0)
		menu_additem(menu, "\y1000 Speed  	      [\w8000$\y]", "3", 0)
		menu_additem(menu, "\y600 Gravity             [\w8000$\y]", "4", 0)
		menu_additem(menu, "\yGodMode 30 Secunde     [\w16000$\y]", "5", 0)
	
		menu_setprop(menu, MPROP_EXIT, MEXIT_ALL)
		menu_display(id, menu, 0)
}
public shop_itm(id, menu, item)
{
	if(item == MEXIT_ALL)
	{
		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)
			if(iMoney < 0)
			{
				ColorChat(id, GREEN, "%s^x03 Nu ai suficienti bani pentru a cumpara acest item !", szTag)
				return 1;
			}
			else
			{
				fm_give_item(id, "weapon_hegrenade")
				fm_give_item(id, "weapon_flashbang")
				fm_give_item(id, "weapon_flashbang")
				fm_give_item(id, "weapon_smokegrenade")
				cs_set_user_money(id, iMoney - get_pcvar_num(nade_cost))
				ColorChat(id, GREEN, "%s^x03 Ai cumparat^x04 Nade Pack^x03 !", szTag)
			}
		}
		case 2:
		{
			new iMoney = cs_get_user_money(id)
			if(iMoney < 0)
			{
				ColorChat(id, GREEN, "%s^x03 Nu ai suficienti bani pentru a cumpara acest item !", szTag)
				return 1;
			}
			else
			{
				fm_give_item(id, "weapon_deagle")
				cs_set_user_bpammo(id, CSW_DEAGLE, 35)
				cs_set_user_money(id, iMoney - get_pcvar_num(deagle_cost))
				ColorChat(id, GREEN, "%s^x03 Ai cumparat^x04 Deagle^x03 !", szTag)
			}
		}
		case 3:
		{
			new iMoney = cs_get_user_money(id)
			if(iMoney < 0)
			{
				ColorChat(id, GREEN, "%s^x03 Nu ai suficienti bani pentru a cumpara acest item !", szTag)
				return 1;
			}
			else
			{
				fm_set_user_maxspeed(id, 1000.0)
				cs_set_user_money(id, iMoney - get_pcvar_num(speed_cost))
				ColorChat(id, GREEN, "%s^x03 Ai cumparat^x04 1000 Speed^x03 !", szTag)
			}
		}
		case 4:
		{
			new iMoney = cs_get_user_money(id)
			if(iMoney < 0)
			{
				ColorChat(id, GREEN, "%s^x03 Nu ai suficienti bani pentru a cumpara acest item !", szTag)
				return 1;
			}
			else
			{
				fm_set_user_gravity(id, 600.0)
				cs_set_user_money(id, iMoney - get_pcvar_num(gravity_cost))
				ColorChat(id, GREEN, "%s^x03 Ai cumparat^x04 600 Gravity^x03 !", szTag)
			}
		}
		case 5:
		{
			new iMoney = cs_get_user_money(id)
			if(iMoney < 0)
			{
				ColorChat(id, GREEN, "%s^x03 Nu ai suficienti bani pentru a cumpara acest item !", szTag)
				return 1;
			}
			else
			{
				set_user_godmode(id, 1)
				cs_set_user_money(id, iMoney - get_pcvar_num(godmode_cost))
				ColorChat(id, GREEN, "%s^x03 Ai cumparat^x04 GodMode^x03 pentru^x04 30 Secunde^x03 !", szTag)
				set_task(30.0, "stop_gm", id)
			}
		}
	}
	menu_destroy(menu)
	return 1;
}
public stop_gm(id)
{
	set_user_godmode(id, 0)
	ColorChat(id, GREEN, "%s^x03 Nu mai ai^x04 GodMode^x03 deoarece au trecut cele^x04 30 secunde^x03 !", szTag)
}
Acum sigur merge ...
User avatar
alkaline
Fost moderator
Fost moderator
Posts: 733
Joined: 18 Jul 2012, 08:42
Detinator Steam: Da
Reputatie: Fost Moderator ajutator
Nume anterior: lucylucy
Fond eXtream: 0
Location: Caras-Severin
Has thanked: 5 times
Been thanked: 296 times
Contact:

13 Dec 2013, 18:46

Daca nu merg celelalte =>> | Afiseaza codul
#include <cstrike>
#include <fun>
#include <hamsandwich>

#pragma semicolon 1;
#pragma tabsize 0;

new sec[ 33 ],g_status_sync, g_status_sync2, bool: MaxSpeed[ 33 ];

public plugin_init( ) {

	register_plugin( "Meniu drshop", "v-", "alkaline aka lucy" );

	RegisterHam( Ham_Spawn, "player", "Spawn", true );

	register_event( "CurWeapon", "Hcw", "be", "1=1" );

	register_clcmd( "say shop", "", -1 );
	register_clcmd( "say drshop", "", -1 );
	g_status_sync = CreateHudSyncObj( );
	g_status_sync2 = CreateHudSyncObj( );
	register_clcmd( "say /shop", "", -1 );
	register_clcmd( "say drshop", "", -1 );
	register_clcmd( "say_team /shop", "", -1 );
	register_clcmd( "say_team /drhop", "", -1 );
}

public client_putinserver( id )
{ sec[ id ] = 0;}

public TASK( id ) {

	switch( get_user_team( id ) ) {
		case 1,2:{DrShop( id );}// ----
		//case 2: DrShop( id );
	}
}

public Spawn( id ) {

	MaxSpeed[ id ] = false;
}


public DrShop( id ) {

	new menu = menu_create ( "\w// Meniu DrShop \\", "VipDR" );

	menu_additem ( menu, "\wPachet Grenazi [\y500 $\w]", "1", 0);
	menu_additem ( menu, "\wDeagle [\y16000 $\w]", "2", 0);
	menu_additem ( menu, "\wViteza \d(1000 speed) \w[\y5000 $\w]", "3", 0);
	menu_additem ( menu, "\wGravitatie \d(600) \w[\y8000 $\w]", "4", 0);
	menu_additem ( menu, "\wGodMode (30 secunde) \w[\y500 $\w]", "5", 0);
	
	menu_setprop ( menu, MPROP_EXITNAME, "Iesire" );
	menu_display ( id, menu, 0 );
	
	return 1;
}

public VipDR( id, menu, item ) {

	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 mine = cs_get_user_money( id ) - 500;
			if( mine < 0 )
			{
				Color( id, "^1Nu ai suficienti bani !");
				return 1;
				
			}
			give_item( id, "weapon_hegrenade" );
			give_item( id, "weapon_flashbang" );
			give_item( id, "weapon_flashbang" );
			give_item( id, "weapon_smokegrenade" );
			Color( id, "^4Ai cumparat ^3Pachet Grenazi ^4!" );
			cs_set_user_money( id, mine );
		}
		case 2:
		{
			new mine = cs_get_user_money( id ) - 16000;
			if( mine < 0 )
			{
				Color( id, "^1Nu ai suficienti bani !");
				return 1;
				
			}
			give_item( id, "weapon_deagle" );
			cs_set_user_bpammo( id, CSW_DEAGLE, 30 );
			Color( id, "^4Ai cumparat ^3Deagle ^4!" );
			cs_set_user_money( id, mine );
			MaxSpeed[ id ] = true;	
		}
		case 3:
		{
			new mine = cs_get_user_money( id ) - 5000;
			if( mine < 0 )
			{
				Color( id, "^1Nu ai suficienti bani !");
				return 1;
				
			}
			Color( id, "^4Ai cumparat ^1 1000 ^3Viteza ^4!" );
			cs_set_user_money( id, mine );
			
		}
		case 4:
		{
			new mine = cs_get_user_money( id ) - 8000;
			if( mine < 0 )
			{
				Color( id, "^1Nu ai suficienti bani !");
				return 1;
				
			}
			set_user_gravity( id, 0.6 );
			Color( id, "^4Ai cumparat ^1 600 ^3Gravitatie ^4!" );
			cs_set_user_money( id, mine );
		}
		case 5:
		{
			new mine = cs_get_user_money( id ) - 500;
			if( mine < 0 )
			{
				Color( id, "^1Nu ai suficienti bani !");
				return 1;
				
			}
			Color( id, "^4Ai cumparat ^3GodMode ^1 30 secunde ^4!" );
			/**/sec[ id ] = 30;/**/
			set_task( 1.0, "GodMode", id );
			cs_set_user_money( id, mine );	
		}

	}
	return 1;
}

public Hcw( id ) {

	if( MaxSpeed[ id ] ) {
		set_user_maxspeed( id, 1000.0 );
	}
	//MaxSpeed[ id ] = false;
	return 1;

}

public GodMode( id ) {
	if ( is_user_alive( id ) )
	{
		if ( sec[ id ] > 0 )
		{
			set_hudmessage( 0, 0, 255, 0.02, 0.48, 0, 1.0, 1.0 );
			ShowSyncHudMsg( id , g_status_sync, "Ai Godmode %i secunde", sec[ id ] );
			set_user_godmode( id, 1 ); 
			sec[ id ]--;
			set_task( 1.0, "GodMode", id );
			//return;


		}
		else
		{
			set_hudmessage (255, 0, 0, 0.02, 0.48, 0, 1.0, 2.0);
			ShowSyncHudMsg ( id, g_status_sync2, "Numai ai GodMode" ) ;
			set_user_godmode ( id, 0 ) ;	
		}
	}
}

stock Color(const id, const input[], any:...) {
	new count = 1, players[32];
	static msg[191];
	vformat(msg, 190, input, 3);
	
	replace_all(msg, 190, "!x04", "^4");
	replace_all(msg, 190, "!x01", "^1");
	replace_all(msg, 190, "!x03", "^3");
	/* This plugin created by alkaline aka lucy */
	if(id) players[0] = id;
	else get_players(players, count, "ch"); {
		for(new i = 0; i < count; i++) {
			if(is_user_connected(players)) {
				message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players);
				write_byte(players);
				write_string(msg);
				message_end();
			}
		}
	}
}
ImageImage
User avatar
s0uNNNdx
Membru, skill +1
Membru, skill +1
Posts: 227
Joined: 28 Jul 2013, 22:30
Detinator Steam: Da
CS Status: Joc pe fun.free-play.ro
Detinator server CS: Fun.Free-Play.Ro
Location: Prahova
Has thanked: 32 times
Contact:

13 Dec 2013, 19:22

lucylucy wrote:
Daca nu merg celelalte =>> | Afiseaza codul
#include <cstrike>
#include <fun>
#include <hamsandwich>

#pragma semicolon 1;
#pragma tabsize 0;

new sec[ 33 ],g_status_sync, g_status_sync2, bool: MaxSpeed[ 33 ];

public plugin_init( ) {

	register_plugin( "Meniu drshop", "v-", "alkaline aka lucy" );

	RegisterHam( Ham_Spawn, "player", "Spawn", true );

	register_event( "CurWeapon", "Hcw", "be", "1=1" );

	register_clcmd( "say shop", "", -1 );
	register_clcmd( "say drshop", "", -1 );
	g_status_sync = CreateHudSyncObj( );
	g_status_sync2 = CreateHudSyncObj( );
	register_clcmd( "say /shop", "", -1 );
	register_clcmd( "say drshop", "", -1 );
	register_clcmd( "say_team /shop", "", -1 );
	register_clcmd( "say_team /drhop", "", -1 );
}

public client_putinserver( id )
{ sec[ id ] = 0;}

public TASK( id ) {

	switch( get_user_team( id ) ) {
		case 1,2:{DrShop( id );}// ----
		//case 2: DrShop( id );
	}
}

public Spawn( id ) {

	MaxSpeed[ id ] = false;
}


public DrShop( id ) {

	new menu = menu_create ( "\w// Meniu DrShop \\", "VipDR" );

	menu_additem ( menu, "\wPachet Grenazi [\y500 $\w]", "1", 0);
	menu_additem ( menu, "\wDeagle [\y16000 $\w]", "2", 0);
	menu_additem ( menu, "\wViteza \d(1000 speed) \w[\y5000 $\w]", "3", 0);
	menu_additem ( menu, "\wGravitatie \d(600) \w[\y8000 $\w]", "4", 0);
	menu_additem ( menu, "\wGodMode (30 secunde) \w[\y500 $\w]", "5", 0);
	
	menu_setprop ( menu, MPROP_EXITNAME, "Iesire" );
	menu_display ( id, menu, 0 );
	
	return 1;
}

public VipDR( id, menu, item ) {

	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 mine = cs_get_user_money( id ) - 500;
			if( mine < 0 )
			{
				Color( id, "^1Nu ai suficienti bani !");
				return 1;
				
			}
			give_item( id, "weapon_hegrenade" );
			give_item( id, "weapon_flashbang" );
			give_item( id, "weapon_flashbang" );
			give_item( id, "weapon_smokegrenade" );
			Color( id, "^4Ai cumparat ^3Pachet Grenazi ^4!" );
			cs_set_user_money( id, mine );
		}
		case 2:
		{
			new mine = cs_get_user_money( id ) - 16000;
			if( mine < 0 )
			{
				Color( id, "^1Nu ai suficienti bani !");
				return 1;
				
			}
			give_item( id, "weapon_deagle" );
			cs_set_user_bpammo( id, CSW_DEAGLE, 30 );
			Color( id, "^4Ai cumparat ^3Deagle ^4!" );
			cs_set_user_money( id, mine );
			MaxSpeed[ id ] = true;	
		}
		case 3:
		{
			new mine = cs_get_user_money( id ) - 5000;
			if( mine < 0 )
			{
				Color( id, "^1Nu ai suficienti bani !");
				return 1;
				
			}
			Color( id, "^4Ai cumparat ^1 1000 ^3Viteza ^4!" );
			cs_set_user_money( id, mine );
			
		}
		case 4:
		{
			new mine = cs_get_user_money( id ) - 8000;
			if( mine < 0 )
			{
				Color( id, "^1Nu ai suficienti bani !");
				return 1;
				
			}
			set_user_gravity( id, 0.6 );
			Color( id, "^4Ai cumparat ^1 600 ^3Gravitatie ^4!" );
			cs_set_user_money( id, mine );
		}
		case 5:
		{
			new mine = cs_get_user_money( id ) - 500;
			if( mine < 0 )
			{
				Color( id, "^1Nu ai suficienti bani !");
				return 1;
				
			}
			Color( id, "^4Ai cumparat ^3GodMode ^1 30 secunde ^4!" );
			/**/sec[ id ] = 30;/**/
			set_task( 1.0, "GodMode", id );
			cs_set_user_money( id, mine );	
		}

	}
	return 1;
}

public Hcw( id ) {

	if( MaxSpeed[ id ] ) {
		set_user_maxspeed( id, 1000.0 );
	}
	//MaxSpeed[ id ] = false;
	return 1;

}

public GodMode( id ) {
	if ( is_user_alive( id ) )
	{
		if ( sec[ id ] > 0 )
		{
			set_hudmessage( 0, 0, 255, 0.02, 0.48, 0, 1.0, 1.0 );
			ShowSyncHudMsg( id , g_status_sync, "Ai Godmode %i secunde", sec[ id ] );
			set_user_godmode( id, 1 ); 
			sec[ id ]--;
			set_task( 1.0, "GodMode", id );
			//return;


		}
		else
		{
			set_hudmessage (255, 0, 0, 0.02, 0.48, 0, 1.0, 2.0);
			ShowSyncHudMsg ( id, g_status_sync2, "Numai ai GodMode" ) ;
			set_user_godmode ( id, 0 ) ;	
		}
	}
}

stock Color(const id, const input[], any:...) {
	new count = 1, players[32];
	static msg[191];
	vformat(msg, 190, input, 3);
	
	replace_all(msg, 190, "!x04", "^4");
	replace_all(msg, 190, "!x01", "^1");
	replace_all(msg, 190, "!x03", "^3");
	/* This plugin created by alkaline aka lucy */
	if(id) players[0] = id;
	else get_players(players, count, "ch"); {
		for(new i = 0; i < count; i++) {
			if(is_user_connected(players)) {
				message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players);
				write_byte(players);
				write_string(msg);
				message_end();
			}
		}
	}
}

30 de erori la compilare ..
User avatar
alkaline
Fost moderator
Fost moderator
Posts: 733
Joined: 18 Jul 2012, 08:42
Detinator Steam: Da
Reputatie: Fost Moderator ajutator
Nume anterior: lucylucy
Fond eXtream: 0
Location: Caras-Severin
Has thanked: 5 times
Been thanked: 296 times
Contact:

13 Dec 2013, 19:28

l-am codat ncode UTF 8 ia amxx-ul daca nu te descurci cu sursa :-" . amxx
ImageImage
User avatar
s0uNNNdx
Membru, skill +1
Membru, skill +1
Posts: 227
Joined: 28 Jul 2013, 22:30
Detinator Steam: Da
CS Status: Joc pe fun.free-play.ro
Detinator server CS: Fun.Free-Play.Ro
Location: Prahova
Has thanked: 32 times
Contact:

13 Dec 2013, 21:35

lucylucy wrote:l-am codat ncode UTF 8 ia amxx-ul daca nu te descurci cu sursa :-" . amxx
Nu apare :(
munir
Membru eXtream
Membru eXtream
Posts: 3193
Joined: 30 Aug 2012, 21:16
Detinator Steam: Da
CS Status: Fost scripter
Detinator server CS: Nu
SteamID: -
Reputatie: Fost super moderator
Restrictie schimbare nume
Nume anterior: falseq, cruyff
Location: Bucuresti
Has thanked: 335 times
Been thanked: 570 times
Contact:

13 Dec 2013, 21:40

scosmynnnn wrote:

Code: Select all

	if(is_user_alive(id))
	{
		ColorChat(id, GREEN, "%s^x03 Trebuie sa fii in viata pentru a cumpara un item din shop !", szTag)
		return 1;
	}
	if(is_user_alive(id))
	{
		new menu = menu_create("\yDeath Run Shop", "shop_itm")
		
		menu_additem(menu, "\yNade Pack                [\w500$\y]", "1", 0)
		menu_additem(menu, "\yDeagle                 [\w16000$\y]", "2", 0)
		menu_additem(menu, "\y1000 Speed  	      [\w8000$\y]", "3", 0)
		menu_additem(menu, "\y600 Gravity             [\w8000$\y]", "4", 0)
		menu_additem(menu, "\yGodMode 30 Secunde     [\w16000$\y]", "5", 0)
	
		menu_setprop(menu, MPROP_EXIT, MEXIT_ALL)
		menu_display(id, menu, 0)
	}
	return PLUGIN_CONTINUE;
}
->>

Code: Select all

	if(!is_user_alive(id))
	{
		ColorChat(id, GREEN, "%s^x03 Trebuie sa fii in viata pentru a cumpara un item din shop !", szTag)
		return 1;
	}
	else
	{
		new menu = menu_create("\yDeath Run Shop", "shop_itm")
		
		menu_additem(menu, "\yNade Pack                [\w500$\y]", "1", 0)
		menu_additem(menu, "\yDeagle                 [\w16000$\y]", "2", 0)
		menu_additem(menu, "\y1000 Speed  	      [\w8000$\y]", "3", 0)
		menu_additem(menu, "\y600 Gravity             [\w8000$\y]", "4", 0)
		menu_additem(menu, "\yGodMode 30 Secunde     [\w16000$\y]", "5", 0)
	
		menu_setprop(menu, MPROP_EXIT, MEXIT_ALL)
		menu_display(id, menu, 0)
	}
	return PLUGIN_CONTINUE;
}
->

Code: Select all

	if(!is_user_alive(id))
	{
		ColorChat(id, GREEN, "%s^x03 Trebuie sa fii in viata pentru a cumpara un item din shop !", szTag)
		return 1;
	}
	
	new menu = menu_create("\yDeath Run Shop", "shop_itm")
      
	menu_additem(menu, "\yNade Pack                [\w500$\y]", "1", 0)
	menu_additem(menu, "\yDeagle                 [\w16000$\y]", "2", 0)
	menu_additem(menu, "\y1000 Speed           [\w8000$\y]", "3", 0)
	menu_additem(menu, "\y600 Gravity             [\w8000$\y]", "4", 0)
	menu_additem(menu, "\yGodMode 30 Secunde     [\w16000$\y]", "5", 0)
   
	menu_setprop(menu, MPROP_EXIT, MEXIT_ALL)
	menu_display(id, menu, 0)
	
	return PLUGIN_CONTINUE;
}
Retras
User avatar
GhosT ***
Membru, skill +2
Membru, skill +2
Posts: 604
Joined: 04 Dec 2013, 21:52
Detinator Steam: Da
CS Status: Morphin . [ Retras ]
SteamID: Mutulica1428
Reputatie: Fost Moderator ajutator
Location: Dumesti.
Has thanked: 40 times
Been thanked: 99 times
Contact:

13 Dec 2013, 21:41

s0uNNNdx wrote:
lucylucy wrote:l-am codat ncode UTF 8 ia amxx-ul daca nu te descurci cu sursa :-" . amxx
Nu apare :(
| Afiseaza codul
#include <AmxModX>
#include <FakeMeta_Util>
#include <ColorChat>
#include <CStrike>
#include <fun>

#define PLUGIN "Dr Shop"
#define VERSION "1.0"
#define AUTHOR "GhosT"

new const szTag[] = "[SHOP]"

// Cvars

new nade_cost, deagle_cost, speed_cost, gravity_cost, godmode_cost;

public plugin_init()
{
	register_plugin(PLUGIN, VERSION, AUTHOR)
	
	register_clcmd("say /drshop", "s_shop")
	register_clcmd("say_team /drshop", "s_shop")
	register_concmd("drshop", "s_shop")
	register_concmd("shop", "s_shop")
	register_concmd("buy", "s_shop")
	
	// Cvars
	
	nade_cost = register_cvar("dr_nade_cost", "500")
	deagle_cost = register_cvar("dr_deagle_cost", "16000")
	speed_cost = register_cvar("dr_speed_cost", "5000")
	gravity_cost = register_cvar("dr_gravity_cost", "8000")
	godmode_cost = register_cvar("dr_godmode_cost", "16000")
}
public s_shop(id)
{
	if(is_user_alive(id))
	{
		drshop(id)
	}
	else
	{
		ColorChat(id, GREEN, "%s^x03 Nu poti folosi shopul deoarece esti mort !", szTag)
	}
}
public drshop(id)
{
		new menu = menu_create("\yDeath Run Shop", "shop_itm")
		
		menu_additem(menu, "\yNade Pack                [\w500$\y]", "1", 0)
		menu_additem(menu, "\yDeagle                 [\w16000$\y]", "2", 0)
		menu_additem(menu, "\y1000 Speed  	      [\w8000$\y]", "3", 0)
		menu_additem(menu, "\y600 Gravity             [\w8000$\y]", "4", 0)
		menu_additem(menu, "\yGodMode 30 Secunde     [\w16000$\y]", "5", 0)
	
		menu_setprop(menu, MPROP_EXIT, MEXIT_ALL)
		menu_display(id, menu, 0)
}
public shop_itm(id, menu, item)
{
	if(item == MEXIT_ALL)
	{
		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)
			if(iMoney < 0)
			{
				ColorChat(id, GREEN, "%s^x03 Nu ai suficienti bani pentru a cumpara acest item !", szTag)
				return 1;
			}
			else
			{
				fm_give_item(id, "weapon_hegrenade")
				fm_give_item(id, "weapon_flashbang")
				fm_give_item(id, "weapon_flashbang")
				fm_give_item(id, "weapon_smokegrenade")
				cs_set_user_money(id, iMoney - get_pcvar_num(nade_cost))
				ColorChat(id, GREEN, "%s^x03 Ai cumparat^x04 Nade Pack^x03 !", szTag)
			}
		}
		case 2:
		{
			new iMoney = cs_get_user_money(id)
			if(iMoney < 0)
			{
				ColorChat(id, GREEN, "%s^x03 Nu ai suficienti bani pentru a cumpara acest item !", szTag)
				return 1;
			}
			else
			{
				fm_give_item(id, "weapon_deagle")
				cs_set_user_bpammo(id, CSW_DEAGLE, 35)
				cs_set_user_money(id, iMoney - get_pcvar_num(deagle_cost))
				ColorChat(id, GREEN, "%s^x03 Ai cumparat^x04 Deagle^x03 !", szTag)
			}
		}
		case 3:
		{
			new iMoney = cs_get_user_money(id)
			if(iMoney < 0)
			{
				ColorChat(id, GREEN, "%s^x03 Nu ai suficienti bani pentru a cumpara acest item !", szTag)
				return 1;
			}
			else
			{
				fm_set_user_maxspeed(id, 1000.0)
				cs_set_user_money(id, iMoney - get_pcvar_num(speed_cost))
				ColorChat(id, GREEN, "%s^x03 Ai cumparat^x04 1000 Speed^x03 !", szTag)
			}
		}
		case 4:
		{
			new iMoney = cs_get_user_money(id)
			if(iMoney < 0)
			{
				ColorChat(id, GREEN, "%s^x03 Nu ai suficienti bani pentru a cumpara acest item !", szTag)
				return 1;
			}
			else
			{
				fm_set_user_gravity(id, 600.0)
				cs_set_user_money(id, iMoney - get_pcvar_num(gravity_cost))
				ColorChat(id, GREEN, "%s^x03 Ai cumparat^x04 600 Gravity^x03 !", szTag)
			}
		}
		case 5:
		{
			new iMoney = cs_get_user_money(id)
			if(iMoney < 0)
			{
				ColorChat(id, GREEN, "%s^x03 Nu ai suficienti bani pentru a cumpara acest item !", szTag)
				return 1;
			}
			else
			{
				set_user_godmode(id, 1)
				cs_set_user_money(id, iMoney - get_pcvar_num(godmode_cost))
				ColorChat(id, GREEN, "%s^x03 Ai cumparat^x04 GodMode^x03 pentru^x04 30 Secunde^x03 !", szTag)
				set_task(30.0, "stop_gm", id)
			}
		}
	}
	menu_destroy(menu)
	return 1;
}
public stop_gm(id)
{
	set_user_godmode(id, 0)
	ColorChat(id, GREEN, "%s^x03 Nu mai ai^x04 GodMode^x03 deoarece au trecut cele^x04 30 secunde^x03 !", szTag)
}
Incearca-l iar pe al meu , l-am modificat \m/
User avatar
s0uNNNdx
Membru, skill +1
Membru, skill +1
Posts: 227
Joined: 28 Jul 2013, 22:30
Detinator Steam: Da
CS Status: Joc pe fun.free-play.ro
Detinator server CS: Fun.Free-Play.Ro
Location: Prahova
Has thanked: 32 times
Contact:

13 Dec 2013, 22:53

GhosT *** wrote:
s0uNNNdx wrote:
lucylucy wrote:l-am codat ncode UTF 8 ia amxx-ul daca nu te descurci cu sursa :-" . amxx
Nu apare :(
| Afiseaza codul
#include <AmxModX>
#include <FakeMeta_Util>
#include <ColorChat>
#include <CStrike>
#include <fun>

#define PLUGIN "Dr Shop"
#define VERSION "1.0"
#define AUTHOR "GhosT"

new const szTag[] = "[SHOP]"

// Cvars

new nade_cost, deagle_cost, speed_cost, gravity_cost, godmode_cost;

public plugin_init()
{
	register_plugin(PLUGIN, VERSION, AUTHOR)
	
	register_clcmd("say /drshop", "s_shop")
	register_clcmd("say_team /drshop", "s_shop")
	register_concmd("drshop", "s_shop")
	register_concmd("shop", "s_shop")
	register_concmd("buy", "s_shop")
	
	// Cvars
	
	nade_cost = register_cvar("dr_nade_cost", "500")
	deagle_cost = register_cvar("dr_deagle_cost", "16000")
	speed_cost = register_cvar("dr_speed_cost", "5000")
	gravity_cost = register_cvar("dr_gravity_cost", "8000")
	godmode_cost = register_cvar("dr_godmode_cost", "16000")
}
public s_shop(id)
{
	if(is_user_alive(id))
	{
		drshop(id)
	}
	else
	{
		ColorChat(id, GREEN, "%s^x03 Nu poti folosi shopul deoarece esti mort !", szTag)
	}
}
public drshop(id)
{
		new menu = menu_create("\yDeath Run Shop", "shop_itm")
		
		menu_additem(menu, "\yNade Pack                [\w500$\y]", "1", 0)
		menu_additem(menu, "\yDeagle                 [\w16000$\y]", "2", 0)
		menu_additem(menu, "\y1000 Speed  	      [\w8000$\y]", "3", 0)
		menu_additem(menu, "\y600 Gravity             [\w8000$\y]", "4", 0)
		menu_additem(menu, "\yGodMode 30 Secunde     [\w16000$\y]", "5", 0)
	
		menu_setprop(menu, MPROP_EXIT, MEXIT_ALL)
		menu_display(id, menu, 0)
}
public shop_itm(id, menu, item)
{
	if(item == MEXIT_ALL)
	{
		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)
			if(iMoney < 0)
			{
				ColorChat(id, GREEN, "%s^x03 Nu ai suficienti bani pentru a cumpara acest item !", szTag)
				return 1;
			}
			else
			{
				fm_give_item(id, "weapon_hegrenade")
				fm_give_item(id, "weapon_flashbang")
				fm_give_item(id, "weapon_flashbang")
				fm_give_item(id, "weapon_smokegrenade")
				cs_set_user_money(id, iMoney - get_pcvar_num(nade_cost))
				ColorChat(id, GREEN, "%s^x03 Ai cumparat^x04 Nade Pack^x03 !", szTag)
			}
		}
		case 2:
		{
			new iMoney = cs_get_user_money(id)
			if(iMoney < 0)
			{
				ColorChat(id, GREEN, "%s^x03 Nu ai suficienti bani pentru a cumpara acest item !", szTag)
				return 1;
			}
			else
			{
				fm_give_item(id, "weapon_deagle")
				cs_set_user_bpammo(id, CSW_DEAGLE, 35)
				cs_set_user_money(id, iMoney - get_pcvar_num(deagle_cost))
				ColorChat(id, GREEN, "%s^x03 Ai cumparat^x04 Deagle^x03 !", szTag)
			}
		}
		case 3:
		{
			new iMoney = cs_get_user_money(id)
			if(iMoney < 0)
			{
				ColorChat(id, GREEN, "%s^x03 Nu ai suficienti bani pentru a cumpara acest item !", szTag)
				return 1;
			}
			else
			{
				fm_set_user_maxspeed(id, 1000.0)
				cs_set_user_money(id, iMoney - get_pcvar_num(speed_cost))
				ColorChat(id, GREEN, "%s^x03 Ai cumparat^x04 1000 Speed^x03 !", szTag)
			}
		}
		case 4:
		{
			new iMoney = cs_get_user_money(id)
			if(iMoney < 0)
			{
				ColorChat(id, GREEN, "%s^x03 Nu ai suficienti bani pentru a cumpara acest item !", szTag)
				return 1;
			}
			else
			{
				fm_set_user_gravity(id, 600.0)
				cs_set_user_money(id, iMoney - get_pcvar_num(gravity_cost))
				ColorChat(id, GREEN, "%s^x03 Ai cumparat^x04 600 Gravity^x03 !", szTag)
			}
		}
		case 5:
		{
			new iMoney = cs_get_user_money(id)
			if(iMoney < 0)
			{
				ColorChat(id, GREEN, "%s^x03 Nu ai suficienti bani pentru a cumpara acest item !", szTag)
				return 1;
			}
			else
			{
				set_user_godmode(id, 1)
				cs_set_user_money(id, iMoney - get_pcvar_num(godmode_cost))
				ColorChat(id, GREEN, "%s^x03 Ai cumparat^x04 GodMode^x03 pentru^x04 30 Secunde^x03 !", szTag)
				set_task(30.0, "stop_gm", id)
			}
		}
	}
	menu_destroy(menu)
	return 1;
}
public stop_gm(id)
{
	set_user_godmode(id, 0)
	ColorChat(id, GREEN, "%s^x03 Nu mai ai^x04 GodMode^x03 deoarece au trecut cele^x04 30 secunde^x03 !", szTag)
}
Incearca-l iar pe al meu , l-am modificat \m/
Apare meniul doar ca numai prin comanda /drshop
User avatar
aNNNdReY
Membru, skill +1
Membru, skill +1
Posts: 410
Joined: 07 Sep 2012, 23:45
Detinator Steam: Da
SteamID: ravyvevo
Has thanked: 65 times
Been thanked: 18 times

13 Dec 2013, 23:04

Vezi asa | Afiseaza codul
#include <AmxModX>
#include <FakeMeta_Util>
#include <ColorChat>
#include <CStrike>
#include <fun>

#define PLUGIN "Dr Shop"
#define VERSION "1.0"
#define AUTHOR "GhosT"

new const szTag[] = "[SHOP]"

// Cvars

new nade_cost, deagle_cost, speed_cost, gravity_cost, godmode_cost;

public plugin_init()
{
	register_plugin(PLUGIN, VERSION, AUTHOR)
	
	register_clcmd("say /drshop", "s_shop")
	register_clcmd("say_team /drshop", "s_shop")
	register_clcmd("say drshop", "s_shop")
	register_clcmd("say_team drshop", "s_shop")
	register_clcmd("say shop", "s_shop")
	register_clcmd("say_team shop", "s_shop")
	register_clcmd("say buy", "s_shop")
	register_clcmd("say_team buy", "s_shop")
	
	// Cvars
	
	nade_cost = register_cvar("dr_nade_cost", "500")
	deagle_cost = register_cvar("dr_deagle_cost", "16000")
	speed_cost = register_cvar("dr_speed_cost", "5000")
	gravity_cost = register_cvar("dr_gravity_cost", "8000")
	godmode_cost = register_cvar("dr_godmode_cost", "16000")
}
public s_shop(id)
{
	if(is_user_alive(id))
	{
		drshop(id)
	}
	else
	{
		ColorChat(id, GREEN, "%s^x03 Nu poti folosi shopul deoarece esti mort !", szTag)
	}
}
public drshop(id)
{
		new menu = menu_create("\yDeath Run Shop", "shop_itm")
		
		menu_additem(menu, "\yNade Pack                [\w500$\y]", "1", 0)
		menu_additem(menu, "\yDeagle                 [\w16000$\y]", "2", 0)
		menu_additem(menu, "\y1000 Speed  	      [\w8000$\y]", "3", 0)
		menu_additem(menu, "\y600 Gravity             [\w8000$\y]", "4", 0)
		menu_additem(menu, "\yGodMode 30 Secunde     [\w16000$\y]", "5", 0)
	
		menu_setprop(menu, MPROP_EXIT, MEXIT_ALL)
		menu_display(id, menu, 0)
}
public shop_itm(id, menu, item)
{
	if(item == MEXIT_ALL)
	{
		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)
			if(iMoney < 0)
			{
				ColorChat(id, GREEN, "%s^x03 Nu ai suficienti bani pentru a cumpara acest item !", szTag)
				return 1;
			}
			else
			{
				fm_give_item(id, "weapon_hegrenade")
				fm_give_item(id, "weapon_flashbang")
				fm_give_item(id, "weapon_flashbang")
				fm_give_item(id, "weapon_smokegrenade")
				cs_set_user_money(id, iMoney - get_pcvar_num(nade_cost))
				ColorChat(id, GREEN, "%s^x03 Ai cumparat^x04 Nade Pack^x03 !", szTag)
			}
		}
		case 2:
		{
			new iMoney = cs_get_user_money(id)
			if(iMoney < 0)
			{
				ColorChat(id, GREEN, "%s^x03 Nu ai suficienti bani pentru a cumpara acest item !", szTag)
				return 1;
			}
			else
			{
				fm_give_item(id, "weapon_deagle")
				cs_set_user_bpammo(id, CSW_DEAGLE, 35)
				cs_set_user_money(id, iMoney - get_pcvar_num(deagle_cost))
				ColorChat(id, GREEN, "%s^x03 Ai cumparat^x04 Deagle^x03 !", szTag)
			}
		}
		case 3:
		{
			new iMoney = cs_get_user_money(id)
			if(iMoney < 0)
			{
				ColorChat(id, GREEN, "%s^x03 Nu ai suficienti bani pentru a cumpara acest item !", szTag)
				return 1;
			}
			else
			{
				fm_set_user_maxspeed(id, 1000.0)
				cs_set_user_money(id, iMoney - get_pcvar_num(speed_cost))
				ColorChat(id, GREEN, "%s^x03 Ai cumparat^x04 1000 Speed^x03 !", szTag)
			}
		}
		case 4:
		{
			new iMoney = cs_get_user_money(id)
			if(iMoney < 0)
			{
				ColorChat(id, GREEN, "%s^x03 Nu ai suficienti bani pentru a cumpara acest item !", szTag)
				return 1;
			}
			else
			{
				fm_set_user_gravity(id, 600.0)
				cs_set_user_money(id, iMoney - get_pcvar_num(gravity_cost))
				ColorChat(id, GREEN, "%s^x03 Ai cumparat^x04 600 Gravity^x03 !", szTag)
			}
		}
		case 5:
		{
			new iMoney = cs_get_user_money(id)
			if(iMoney < 0)
			{
				ColorChat(id, GREEN, "%s^x03 Nu ai suficienti bani pentru a cumpara acest item !", szTag)
				return 1;
			}
			else
			{
				set_user_godmode(id, 1)
				cs_set_user_money(id, iMoney - get_pcvar_num(godmode_cost))
				ColorChat(id, GREEN, "%s^x03 Ai cumparat^x04 GodMode^x03 pentru^x04 30 Secunde^x03 !", szTag)
				set_task(30.0, "stop_gm", id)
			}
		}
	}
	menu_destroy(menu)
	return 1;
}
public stop_gm(id)
{
	set_user_godmode(id, 0)
	ColorChat(id, GREEN, "%s^x03 Nu mai ai^x04 GodMode^x03 deoarece au trecut cele^x04 30 secunde^x03 !", szTag)
}
User avatar
GhosT ***
Membru, skill +2
Membru, skill +2
Posts: 604
Joined: 04 Dec 2013, 21:52
Detinator Steam: Da
CS Status: Morphin . [ Retras ]
SteamID: Mutulica1428
Reputatie: Fost Moderator ajutator
Location: Dumesti.
Has thanked: 40 times
Been thanked: 99 times
Contact:

14 Dec 2013, 09:10

s0uNNNdx wrote:
GhosT *** wrote:
s0uNNNdx wrote: Nu apare :(
| Afiseaza codul
#include <AmxModX>
#include <FakeMeta_Util>
#include <ColorChat>
#include <CStrike>
#include <fun>

#define PLUGIN "Dr Shop"
#define VERSION "1.0"
#define AUTHOR "GhosT"

new const szTag[] = "[SHOP]"

// Cvars

new nade_cost, deagle_cost, speed_cost, gravity_cost, godmode_cost;

public plugin_init()
{
	register_plugin(PLUGIN, VERSION, AUTHOR)
	
	register_clcmd("say /drshop", "s_shop")
	register_clcmd("say_team /drshop", "s_shop")
	register_concmd("drshop", "s_shop")
	register_concmd("shop", "s_shop")
	register_concmd("buy", "s_shop")
	
	// Cvars
	
	nade_cost = register_cvar("dr_nade_cost", "500")
	deagle_cost = register_cvar("dr_deagle_cost", "16000")
	speed_cost = register_cvar("dr_speed_cost", "5000")
	gravity_cost = register_cvar("dr_gravity_cost", "8000")
	godmode_cost = register_cvar("dr_godmode_cost", "16000")
}
public s_shop(id)
{
	if(is_user_alive(id))
	{
		drshop(id)
	}
	else
	{
		ColorChat(id, GREEN, "%s^x03 Nu poti folosi shopul deoarece esti mort !", szTag)
	}
}
public drshop(id)
{
		new menu = menu_create("\yDeath Run Shop", "shop_itm")
		
		menu_additem(menu, "\yNade Pack                [\w500$\y]", "1", 0)
		menu_additem(menu, "\yDeagle                 [\w16000$\y]", "2", 0)
		menu_additem(menu, "\y1000 Speed  	      [\w8000$\y]", "3", 0)
		menu_additem(menu, "\y600 Gravity             [\w8000$\y]", "4", 0)
		menu_additem(menu, "\yGodMode 30 Secunde     [\w16000$\y]", "5", 0)
	
		menu_setprop(menu, MPROP_EXIT, MEXIT_ALL)
		menu_display(id, menu, 0)
}
public shop_itm(id, menu, item)
{
	if(item == MEXIT_ALL)
	{
		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)
			if(iMoney < 0)
			{
				ColorChat(id, GREEN, "%s^x03 Nu ai suficienti bani pentru a cumpara acest item !", szTag)
				return 1;
			}
			else
			{
				fm_give_item(id, "weapon_hegrenade")
				fm_give_item(id, "weapon_flashbang")
				fm_give_item(id, "weapon_flashbang")
				fm_give_item(id, "weapon_smokegrenade")
				cs_set_user_money(id, iMoney - get_pcvar_num(nade_cost))
				ColorChat(id, GREEN, "%s^x03 Ai cumparat^x04 Nade Pack^x03 !", szTag)
			}
		}
		case 2:
		{
			new iMoney = cs_get_user_money(id)
			if(iMoney < 0)
			{
				ColorChat(id, GREEN, "%s^x03 Nu ai suficienti bani pentru a cumpara acest item !", szTag)
				return 1;
			}
			else
			{
				fm_give_item(id, "weapon_deagle")
				cs_set_user_bpammo(id, CSW_DEAGLE, 35)
				cs_set_user_money(id, iMoney - get_pcvar_num(deagle_cost))
				ColorChat(id, GREEN, "%s^x03 Ai cumparat^x04 Deagle^x03 !", szTag)
			}
		}
		case 3:
		{
			new iMoney = cs_get_user_money(id)
			if(iMoney < 0)
			{
				ColorChat(id, GREEN, "%s^x03 Nu ai suficienti bani pentru a cumpara acest item !", szTag)
				return 1;
			}
			else
			{
				fm_set_user_maxspeed(id, 1000.0)
				cs_set_user_money(id, iMoney - get_pcvar_num(speed_cost))
				ColorChat(id, GREEN, "%s^x03 Ai cumparat^x04 1000 Speed^x03 !", szTag)
			}
		}
		case 4:
		{
			new iMoney = cs_get_user_money(id)
			if(iMoney < 0)
			{
				ColorChat(id, GREEN, "%s^x03 Nu ai suficienti bani pentru a cumpara acest item !", szTag)
				return 1;
			}
			else
			{
				fm_set_user_gravity(id, 600.0)
				cs_set_user_money(id, iMoney - get_pcvar_num(gravity_cost))
				ColorChat(id, GREEN, "%s^x03 Ai cumparat^x04 600 Gravity^x03 !", szTag)
			}
		}
		case 5:
		{
			new iMoney = cs_get_user_money(id)
			if(iMoney < 0)
			{
				ColorChat(id, GREEN, "%s^x03 Nu ai suficienti bani pentru a cumpara acest item !", szTag)
				return 1;
			}
			else
			{
				set_user_godmode(id, 1)
				cs_set_user_money(id, iMoney - get_pcvar_num(godmode_cost))
				ColorChat(id, GREEN, "%s^x03 Ai cumparat^x04 GodMode^x03 pentru^x04 30 Secunde^x03 !", szTag)
				set_task(30.0, "stop_gm", id)
			}
		}
	}
	menu_destroy(menu)
	return 1;
}
public stop_gm(id)
{
	set_user_godmode(id, 0)
	ColorChat(id, GREEN, "%s^x03 Nu mai ai^x04 GodMode^x03 deoarece au trecut cele^x04 30 secunde^x03 !", szTag)
}
Incearca-l iar pe al meu , l-am modificat \m/
Apare meniul doar ca numai prin comanda /drshop
| Afiseaza codul
#include <AmxModX>
#include <FakeMeta_Util>
#include <ColorChat>
#include <CStrike>
#include <fun>

#define PLUGIN "Dr Shop"
#define VERSION "1.0"
#define AUTHOR "GhosT"

new const szTag[] = "[SHOP]"

// Cvars

new nade_cost, deagle_cost, speed_cost, gravity_cost, godmode_cost;

public plugin_init()
{
	register_plugin(PLUGIN, VERSION, AUTHOR)
	
	register_clcmd("say /drshop", "s_shop")
	register_clcmd("say_team /drshop", "s_shop")
	register_clcmd("say drshop", "s_shop")
	register_clcmd("say_team drshop", "s_shop")
	register_clcmd("say shop", "s_shop")
	register_clcmd("say_team shop", "s_shop")
        register_clcmd("say /shop", "s_shop")
	register_clcmd("say_team /shop", "s_shop")
	register_clcmd("say buy", "s_shop")
	register_clcmd("say_team buy", "s_shop")
	
	// Cvars
	
	nade_cost = register_cvar("dr_nade_cost", "500")
	deagle_cost = register_cvar("dr_deagle_cost", "16000")
	speed_cost = register_cvar("dr_speed_cost", "5000")
	gravity_cost = register_cvar("dr_gravity_cost", "8000")
	godmode_cost = register_cvar("dr_godmode_cost", "16000")
}
public s_shop(id)
{
	if(is_user_alive(id))
	{
		drshop(id)
	}
	else
	{
		ColorChat(id, GREEN, "%s^x03 Nu poti folosi shopul deoarece esti mort !", szTag)
	}
}
public drshop(id)
{
		new menu = menu_create("\yDeath Run Shop", "shop_itm")
		
		menu_additem(menu, "\yNade Pack                [\w500$\y]", "1", 0)
		menu_additem(menu, "\yDeagle                 [\w16000$\y]", "2", 0)
		menu_additem(menu, "\y1000 Speed  	      [\w8000$\y]", "3", 0)
		menu_additem(menu, "\y600 Gravity             [\w8000$\y]", "4", 0)
		menu_additem(menu, "\yGodMode 30 Secunde     [\w16000$\y]", "5", 0)
	
		menu_setprop(menu, MPROP_EXIT, MEXIT_ALL)
		menu_display(id, menu, 0)
}
public shop_itm(id, menu, item)
{
	if(item == MEXIT_ALL)
	{
		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)
			if(iMoney < 0)
			{
				ColorChat(id, GREEN, "%s^x03 Nu ai suficienti bani pentru a cumpara acest item !", szTag)
				return 1;
			}
			else
			{
				fm_give_item(id, "weapon_hegrenade")
				fm_give_item(id, "weapon_flashbang")
				fm_give_item(id, "weapon_flashbang")
				fm_give_item(id, "weapon_smokegrenade")
				cs_set_user_money(id, iMoney - get_pcvar_num(nade_cost))
				ColorChat(id, GREEN, "%s^x03 Ai cumparat^x04 Nade Pack^x03 !", szTag)
			}
		}
		case 2:
		{
			new iMoney = cs_get_user_money(id)
			if(iMoney < 0)
			{
				ColorChat(id, GREEN, "%s^x03 Nu ai suficienti bani pentru a cumpara acest item !", szTag)
				return 1;
			}
			else
			{
				fm_give_item(id, "weapon_deagle")
				cs_set_user_bpammo(id, CSW_DEAGLE, 35)
				cs_set_user_money(id, iMoney - get_pcvar_num(deagle_cost))
				ColorChat(id, GREEN, "%s^x03 Ai cumparat^x04 Deagle^x03 !", szTag)
			}
		}
		case 3:
		{
			new iMoney = cs_get_user_money(id)
			if(iMoney < 0)
			{
				ColorChat(id, GREEN, "%s^x03 Nu ai suficienti bani pentru a cumpara acest item !", szTag)
				return 1;
			}
			else
			{
				fm_set_user_maxspeed(id, 1000.0)
				cs_set_user_money(id, iMoney - get_pcvar_num(speed_cost))
				ColorChat(id, GREEN, "%s^x03 Ai cumparat^x04 1000 Speed^x03 !", szTag)
			}
		}
		case 4:
		{
			new iMoney = cs_get_user_money(id)
			if(iMoney < 0)
			{
				ColorChat(id, GREEN, "%s^x03 Nu ai suficienti bani pentru a cumpara acest item !", szTag)
				return 1;
			}
			else
			{
				fm_set_user_gravity(id, 600.0)
				cs_set_user_money(id, iMoney - get_pcvar_num(gravity_cost))
				ColorChat(id, GREEN, "%s^x03 Ai cumparat^x04 600 Gravity^x03 !", szTag)
			}
		}
		case 5:
		{
			new iMoney = cs_get_user_money(id)
			if(iMoney < 0)
			{
				ColorChat(id, GREEN, "%s^x03 Nu ai suficienti bani pentru a cumpara acest item !", szTag)
				return 1;
			}
			else
			{
				set_user_godmode(id, 1)
				cs_set_user_money(id, iMoney - get_pcvar_num(godmode_cost))
				ColorChat(id, GREEN, "%s^x03 Ai cumparat^x04 GodMode^x03 pentru^x04 30 Secunde^x03 !", szTag)
				set_task(30.0, "stop_gm", id)
			}
		}
	}
	menu_destroy(menu)
	return 1;
}
public stop_gm(id)
{
	set_user_godmode(id, 0)
	ColorChat(id, GREEN, "%s^x03 Nu mai ai^x04 GodMode^x03 deoarece au trecut cele^x04 30 secunde^x03 !", szTag)
}
Post Reply

Return to “Cereri”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 11 guests