[REZOLVAT]Plugin shop CS [JUNKY]

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 .
Post Reply
User avatar
Junky444
Membru, skill +1
Membru, skill +1
Posts: 412
Joined: 01 Feb 2014, 17:51
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Has thanked: 30 times
Been thanked: 4 times
Contact:

27 Feb 2014, 13:59

Nickname:Junky
Numele pluginului cerut:Shop plugin
Descriere plugin cerut:Doresc ca acest shop sa contina
----------------------------------------------------------
HeGrenade - 2000$
SmokeGrenade - 1600$
FlashGrenade - 1700$
Parachute - 700$
Gravity500 - 4500$
Speed340 - 5200$
Last edited by Junky444 on 02 Mar 2014, 17:51, edited 1 time in total.
Image
Image
Image
RoyalServer
User avatar
Junky444
Membru, skill +1
Membru, skill +1
Posts: 412
Joined: 01 Feb 2014, 17:51
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Has thanked: 30 times
Been thanked: 4 times
Contact:

01 Mar 2014, 14:50

UPPPPPPPPPPP
Image
Image
Image
User avatar
-Turbo-
Membru, skill +4
Membru, skill +4
Posts: 1664
Joined: 11 Nov 2012, 01:28
Detinator Steam: Da
CS Status: Bored !
Detinator server CS: Da
SteamID: kingforbidden
Reputatie: Utilizator neserios ( tepar )
Restrictie moderator
Ban scos ( achitat )
Nume anterior: Turbo19973
Location: Botosani
Has thanked: 49 times
Been thanked: 212 times

01 Mar 2014, 16:15

| Afiseaza codul
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fun>
#include <hamsandwich>
#include <engine>

#define PLUGIN "Shop Money"
#define VERSION "1.0"
#define AUTHOR "-Turbo-"

new const MODEL_PARACHUTE[] = "models/parachute.mdl"
new szPlayerSpeed[33];
new Float:g_FallSpeed;
new bool:g_has_parachute[33], g_para_ent[33];

enum Color
{
	NORMAL = 1, 		// Culoarea care o are jucatorul setata in cvar-ul scr_concolor.
	GREEN, 			// Culoare Verde.
	TEAM_COLOR, 		// Culoare Rosu, Albastru, Gri.
	GREY, 			// Culoarea Gri.
	RED, 			// Culoarea Rosu.
	BLUE, 			// Culoarea Albastru.
}
new TeamName[  ][  ] = 
{
	"",
	"TERRORIST",
	"CT",
	"SPECTATOR"
}
public plugin_init() {
	
	register_plugin(PLUGIN, VERSION, AUTHOR)
	
	RegisterHam(Ham_Item_PreFrame, "player", "PlayerMaxSpeed");
	RegisterHam(Ham_Spawn, "player", "Spawn", true );
	register_event("HLTV", "event_round_start", "a", "1=0", "2=0")
}
public plugin_precache()
{
	precache_model(MODEL_PARACHUTE)
}
public client_putinserver(id)
{
	g_has_parachute[id] = false
}
public event_round_start()
{
	new szPlayers[32]
	new szNum, szPlayer
	
	get_players(szPlayers, szNum)
	
	for(new i; i < szNum; i++)
	{
		szPlayer = szPlayers
		
		g_has_parachute[szPlayer] = false
		szPlayerSpeed[szPlayer] = false
	}
}
public player_spawn(player)
{
	if (!is_user_connected(player))
		return HAM_IGNORED

	parachute_reset(player)
	set_user_gravity(player, 1.0)
	return HAM_IGNORED
}
public PlayerMaxSpeed( id )
{
	if( is_user_alive(id))
	{
		if(szPlayerSpeed[id]) {
			
			set_user_maxspeed(id , 500.0)
		}
	}
}
public ShopAntiFurien ( id ) {   
	
	new menu = menu_create("Shop Menu [ v1.2]", "shop_handler")
	
	menu_additem(menu, "\yHE Grenade - \r2000$", "1", 0 );
	menu_additem(menu, "\ySmokeGrenade - \r1600$", "2", 0);
	menu_additem(menu, "\yFlashGrenade - \r1700$", "3", 0);
	menu_additem(menu, "\yParachute - \r700$", "4", 0);
	menu_additem(menu, "\yGravity [500] - \r4500$", "5", 0);
	menu_additem(menu, "\ySpeed [340] - \r5200$", "6", 0);
	
	menu_setprop(menu, MPROP_EXIT, MEXIT_ALL);
	menu_display(id, menu, 0);
	
}
public Furien(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 iMoney = cs_get_user_money ( id ) - 2000;
			if( iMoney < 0 )
			{
				ColorChat( id, GREEN, "Nu ai suficienti bani.");
				return 1;
					
			}
			else
			{ 
					
				ColorChat(id, GREEN, "Ai cumparat He Grenade");
				give_item(id, "weapon_hegrenade")	
				cs_set_user_money( id, iMoney );
				return 1;
			}
		}
		case 2:
		{
			new iMoney = cs_get_user_money ( id ) - 1600;
			if( iMoney < 0 )
			{
				ColorChat( id, GREEN, "Nu ai suficienti bani.");
				return 1;
					
			}
			else
			{ 
					
				ColorChat(id, GREEN, "Ai cumparat Smoke Grenade");
				give_item(id, "weapon_smokegrenade")	
				cs_set_user_money( id, iMoney );
				return 1;
			}
		} 
		
		case 3:
		{
			new iMoney = cs_get_user_money ( id ) - 1700;
			if( iMoney < 0 )
			{
				ColorChat( id, GREEN, "Nu ai suficienti bani.");
				return 1;
					
			}
			else
			{ 
					
				ColorChat(id, GREEN, "Ai cumparat Flash Grenade");
				give_item(id, "weapon_flashbang")	
				cs_set_user_money( id, iMoney );
				return 1;
			}
		} 
		
		case 4:
		{
			new iMoney = cs_get_user_money ( id ) - 700;
			if( iMoney < 0 )
			{
				ColorChat( id, GREEN, "Nu ai suficienti bani.");
				return 1;
					
			}
			else
			{ 
					
				ColorChat(id, GREEN, "Ai cumparat Parachute");
				g_has_parachute[id] = true
				cs_set_user_money( id, iMoney );
				return 1;
			}
		} 
		
		case 5:
		{
			new iMoney = cs_get_user_money ( id ) - 4500;
			if( iMoney < 0 )
			{
				ColorChat( id, GREEN, "Nu ai suficienti bani.");
				return 1;
					
			}
			else
			{ 
					
				ColorChat(id, GREEN, "Ai cumparat 350 Gravity");
				set_user_gravity(id, 0.45)
				cs_set_user_money( id, iMoney );
				return 1;
			}
		}
		case 6:
		{
			new iMoney = cs_get_user_money ( id ) - 5200;
			if( iMoney < 0 )
			{
				ColorChat( id, GREEN, "Nu ai suficienti bani.");
				return 1;
					
			}
			else
			{ 
					
				ColorChat(id, GREEN, "Ai cumparat 500 Speed");
				szPlayerSpeed[id] = true
				cs_set_user_money( id, iMoney );
				return 1;
			}
		} 
		
		
	}
	menu_destroy(menu);
	return 1;
}
public client_PreThink(id)
{
	//Parachute model animation information
	//0 - deploy - 84 frames
	//1 - idle - 39 frames
	//2 - detach - 29 frames
	
	if (!g_has_parachute[id])
		return;
	
	static flags, Float:frame, button, oldbutton
	button = get_user_button(id)
	oldbutton = get_user_oldbutton(id)
	flags = get_entity_flags(id)
	
	if (g_para_ent[id] > 0 && (flags & FL_ONGROUND))
	{
			if (entity_get_int(g_para_ent[id],EV_INT_sequence) != 2)
			{
				entity_set_int(g_para_ent[id], EV_INT_sequence, 2)
				entity_set_int(g_para_ent[id], EV_INT_gaitsequence, 1)
				entity_set_float(g_para_ent[id], EV_FL_frame, 0.0)
				entity_set_float(g_para_ent[id], EV_FL_fuser1, 0.0)
				entity_set_float(g_para_ent[id], EV_FL_animtime, 0.0)
				return;
			}
			
			frame = entity_get_float(g_para_ent[id],EV_FL_fuser1) + 2.0
			entity_set_float(g_para_ent[id],EV_FL_fuser1,frame)
			entity_set_float(g_para_ent[id],EV_FL_frame,frame)

			if (frame > 254.0)
				parachute_reset(id)
	}
	
	if (button & IN_USE)
	{
		new Float:velocity[3];
		entity_get_vector(id, EV_VEC_velocity, velocity);
		
		if (velocity[2] < 0.0)
		{
			if(g_para_ent[id] <= 0)
			{
				g_para_ent[id] = create_entity("info_target")
				
				if(g_para_ent[id] > 0)
				{
					entity_set_string(g_para_ent[id],EV_SZ_classname,"parachute")
					entity_set_edict(g_para_ent[id], EV_ENT_aiment, id)
					entity_set_edict(g_para_ent[id], EV_ENT_owner, id)
					entity_set_int(g_para_ent[id], EV_INT_movetype, MOVETYPE_FOLLOW)
					entity_set_model(g_para_ent[id], MODEL_PARACHUTE)
					entity_set_int(g_para_ent[id], EV_INT_sequence, 0)
					entity_set_int(g_para_ent[id], EV_INT_gaitsequence, 1)
					entity_set_float(g_para_ent[id], EV_FL_frame, 0.0)
					entity_set_float(g_para_ent[id], EV_FL_fuser1, 0.0)
				}
			}
			else if (g_para_ent[id] > 0)
			{
				entity_set_int(id, EV_INT_sequence, 3)
				entity_set_int(id, EV_INT_gaitsequence, 1)
				entity_set_float(id, EV_FL_frame, 1.0)
				entity_set_float(id, EV_FL_framerate, 1.0)

				velocity[2] = (velocity[2] + 40.0 < g_FallSpeed) ? velocity[2] + 40.0 : g_FallSpeed
				entity_set_vector(id, EV_VEC_velocity, velocity)

				if (entity_get_int(g_para_ent[id],EV_INT_sequence) == 0)
				{

					frame = entity_get_float(g_para_ent[id],EV_FL_fuser1) + 1.0
					entity_set_float(g_para_ent[id],EV_FL_fuser1,frame)
					entity_set_float(g_para_ent[id],EV_FL_frame,frame)

					if (frame > 100.0)
					{
						entity_set_float(g_para_ent[id], EV_FL_animtime, 0.0)
						entity_set_float(g_para_ent[id], EV_FL_framerate, 0.4)
						entity_set_int(g_para_ent[id], EV_INT_sequence, 1)
						entity_set_int(g_para_ent[id], EV_INT_gaitsequence, 1)
						entity_set_float(g_para_ent[id], EV_FL_frame, 0.0)
						entity_set_float(g_para_ent[id], EV_FL_fuser1, 0.0)
					}
				}
			}
		}
		else if (g_para_ent[id] > 0)
			parachute_reset(id)
	}
	else if ((oldbutton & IN_USE) && g_para_ent[id] > 0)
		parachute_reset(id)
}

parachute_reset(id, remove = 0)
{
	if(g_para_ent[id] > 0 && is_valid_ent(g_para_ent[id]))
	{
		remove_entity(g_para_ent[id]);
		g_para_ent[id] = 0
	}
	
	if (!remove)
		g_has_parachute[id] = true
	else
		g_has_parachute[id] = false
}

ColorChat(id, Color:type, const msg[], {Float,Sql,Result,_}:...)
{
	new message[256];

	switch(type)
	{
		case NORMAL: // clients scr_concolor cvar color
		{
			message[0] = 0x01;
		}
		case GREEN: // Green
		{
			message[0] = 0x04;
		}
		default: // White, Red, Blue
		{
			message[0] = 0x03;
		}
	}

	vformat(message[1], 251, msg, 4);

	// Make sure message is not longer than 192 character. Will crash the server.
	message[192] = '^0';

	new team, ColorChange, index, MSG_Type;
	
	if(id)
	{
		MSG_Type = MSG_ONE;
		index = id;
	} else {
		index = FindPlayer();
		MSG_Type = MSG_ALL;
	}
	
	team = get_user_team(index);
	ColorChange = ColorSelection(index, MSG_Type, type);

	ShowColorMessage(index, MSG_Type, message);
		
	if(ColorChange)
	{
		Team_Info(index, MSG_Type, TeamName[team]);
	}
}

ShowColorMessage(id, type, message[])
{
	static bool:saytext_used;
	static get_user_msgid_saytext;
	if(!saytext_used)
	{
		get_user_msgid_saytext = get_user_msgid("SayText");
		saytext_used = true;
	}
	message_begin(type, get_user_msgid_saytext, _, id);
	write_byte(id)		
	write_string(message);
	message_end();	
}

Team_Info(id, type, team[])
{
	static bool:teaminfo_used;
	static get_user_msgid_teaminfo;
	if(!teaminfo_used)
	{
		get_user_msgid_teaminfo = get_user_msgid("TeamInfo");
		teaminfo_used = true;
	}
	message_begin(type, get_user_msgid_teaminfo, _, id);
	write_byte(id);
	write_string(team);
	message_end();

	return 1;
}

ColorSelection(index, type, Color:Type)
{
	switch(Type)
	{
		case RED:
		{
			return Team_Info(index, type, TeamName[1]);
		}
		case BLUE:
		{
			return Team_Info(index, type, TeamName[2]);
		}
		case GREY:
		{
			return Team_Info(index, type, TeamName[0]);
		}
	}

	return 0;
}

FindPlayer()
{
	new i = -1;

	while(i <= get_maxplayers())
	{
		if(is_user_connected(++i))
			return i;
	}

	return -1;
}


Daca gasesti vreo eroare sau bug revino cu reply !
User avatar
Junky444
Membru, skill +1
Membru, skill +1
Posts: 412
Joined: 01 Feb 2014, 17:51
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Has thanked: 30 times
Been thanked: 4 times
Contact:

01 Mar 2014, 23:05

Care este comanda care trebuie accesata pentru a se deschide meniul pluginului?
Apropo am gasit eu un plugin , mil poti modifica putin te rog , vreau sa mai adaugi NightVizion , parachute si invizibilitatea sa fie mai scazuta , adica cand cumpar invizibilitate jucatorul nu se mai observa deloc , vreau sa para putin mai vizibil
Daca reusesti te rog lasa si SMA

Code: Select all

#include <amxmodx>
#include <cstrike>
#include <fun>
#include <engine>

new g_Menu;

public plugin_init() {
	register_plugin("DrShop", "0.1", "Ex3cuTioN");
	
	g_Menu = register_menuid("DeathRun Shop");
	register_menucmd(g_Menu, 1023, "drshop");
	
	register_clcmd("say /shop","cmdShop",-1,"<cumperi diverse lucruri>");
	register_clcmd("say /shop","cmdShop",-1,"<cumperi diverse lucruri>");
}

public cmdShop(id) {	
	new menuBody[512];
	
	add(menuBody, 511, "\rMagazinul [ZE.WATF.RO]\w^n^n");
	add(menuBody, 511, "\r1. \wHe \y(Pret:500$)\w^n");
	add(menuBody, 511, "\r2. \wFlash \y(Pret:500$)\w^n");
	add(menuBody, 511, "\r3. \wSmoke \y(Pret:500$)\w^n");
	add(menuBody, 511, "\r4. \wSpeed \y(Pret:5000$)\w^n");
	add(menuBody, 511, "\r5. \wGravitatie \y(Pret:12000$)\w^n");
	add(menuBody, 511, "\r6. \wInvizibilitate \y(Pret:15000$)\w^n");
	add(menuBody, 511, "\r0. \wExit^n");
	
	new keys = ( 1<<0 | 1<<1 | 1<<2 | 1<<3 | 1<<4 | 1<<5 | 1<<6 | 1<<7 | 1<<8 | 1<<9);
	show_menu(id, keys, menuBody, -1, "DeathRun Shop");
}

public drshop(id, key) {
	switch(key) 
	{
		case 0:
		{
			new bani,banif;
			bani = cs_get_user_money(id);
			if(bani < 500) {
				chat_color(id,"!g[ZE.WATF.RO] !yAi nevoie de !g500$");
				return PLUGIN_HANDLED;
			}
			
			banif = bani - 500;
			cs_set_user_money(id,banif);
			chat_color(id,"!g[ZE.WATF.RO] !yAi cumparat o grenada !gHe! !yAi ramas cu !g%d$",banif);
			give_item(id,"weapon_hegrenade");
		}
		case 1:
		{
			new bani,banif;
			bani = cs_get_user_money(id);
			if(bani < 500) {
				chat_color(id,"!g[ZE.WATF.RO] !yAi nevoie de !g500$");
				return PLUGIN_HANDLED;
			}
			
			banif = bani - 500;
			cs_set_user_money(id,banif);
			chat_color(id,"!g[ZE.WATF.RO] !yAi cumparat o grenada !gFlashBang! !yAi ramas cu !g%d$",banif);
			give_item(id,"weapon_flashbang");
		}
		case 2:
	        {
			new bani,banif;
			bani = cs_get_user_money(id);
			if(bani < 500) {
				chat_color(id,"!g[ZE.WATF.RO] !yAi nevoie de !g500$");
				return PLUGIN_HANDLED;
			}
			
			banif = bani - 500;
			cs_set_user_money(id,banif);
			chat_color(id,"!g[ZE.WATF.RO] !yAi cumparat o grenada !gSmoke! !yAi ramas cu !g%d$",banif);
			give_item(id,"weapon_smokegrenade");
		}
		case 3:
		{
			new bani,banif;
			bani = cs_get_user_money(id);
			if(bani < 5000) {
				chat_color(id,"!g[ZE.WATF.RO] !yAi nevoie de !g5000$");
				return PLUGIN_HANDLED;
			}
			
			banif = bani - 5000;
			cs_set_user_money(id,banif);
			chat_color(id,"!g[ZE.WATF.RO] !yAi cumparat !gViteza! !yAi ramas cu !g%d$",banif);
			
			new Float:speed = get_user_maxspeed(id) + 50.0;
			set_user_maxspeed(id,speed);
		}
		case 4:
		{
			new bani,banif;
			bani = cs_get_user_money(id);
			if(bani < 12000) {
				chat_color(id,"!g[ZE.WATF.RO] !yAi nevoie de !g12000$");
				return PLUGIN_HANDLED;
			}
			
			banif = bani - 12000;
			cs_set_user_money(id,banif);
			chat_color(id,"!g[ZE.WATF.RO] !yAi cumparat !gGravitatie! !yAi ramas cu !g%d$",banif);
			set_user_gravity(id,0.4);
		}
		case 5:
		{
			new bani,banif;
			bani = cs_get_user_money(id);
			if(bani < 15000) {
				chat_color(id,"!g[ZE.WATF.RO] !yAi nevoie de !g15000$");
				return PLUGIN_HANDLED;
			}
			
			banif = bani - 15000;
			cs_set_user_money(id,banif);
			chat_color(id,"!g[ZE.WATF.RO] !yAi cumparat !gInvizibilitate! !yAi ramas cu !g%d$",banif);
			set_entity_visibility(id, 0);
		}
		
		default: return PLUGIN_HANDLED;
	}
	return PLUGIN_HANDLED;
}

public removeInvis(id) {
	set_user_noclip(id,0);
}

stock chat_color(const id, const input[], any:...)
{
new count = 1, players[32]
static msg[191]
vformat(msg, 190, input, 3)

replace_all(msg, 190, "!g", "^4")
replace_all(msg, 190, "!y", "^1")
replace_all(msg, 190, "!team", "^3")

if (id) players[0] = id; else get_players(players, count, "ch")
{
  for (new i = 0; i < count; i++)
  {
   if (is_user_connected(players[i]))
   {
    message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players[i])
    write_byte(players[i]);
    write_string(msg);
    message_end();
   }
  }
}
}
Image
Image
Image
User avatar
satasa
Membru, skill +1
Membru, skill +1
Posts: 371
Joined: 12 Nov 2012, 10:43
Detinator Steam: Nu
CS Status: Ocupat
Reputatie: Membru Club eXtreamCS (2 iun - 2 iul, Acces in Club)
Has thanked: 55 times
Been thanked: 10 times
Contact:

02 Mar 2014, 15:17

| Afiseaza codul
#include <amxmodx>
#include <cstrike>
#include <fun>
#include <engine>

new g_Menu;

public plugin_init() {
   register_plugin("DrShop", "0.1", "Ex3cuTioN");
   
   g_Menu = register_menuid("DeathRun Shop");
   register_menucmd(g_Menu, 1023, "drshop");
   
   register_clcmd("say /shop","cmdShop",-1,"<cumperi diverse lucruri>");
   register_clcmd("say /shop","cmdShop",-1,"<cumperi diverse lucruri>");
}

public cmdShop(id) {   
   new menuBody[512];
   
   add(menuBody, 511, "\rMagazinul [ZE.WATF.RO]\w^n^n");
   add(menuBody, 511, "\r1. \wHe \y(Pret:500$)\w^n");
   add(menuBody, 511, "\r2. \wFlash \y(Pret:500$)\w^n");
   add(menuBody, 511, "\r3. \wSmoke \y(Pret:500$)\w^n");
   add(menuBody, 511, "\r4. \wSpeed \y(Pret:5000$)\w^n");
   add(menuBody, 511, "\r5. \wGravitatie \y(Pret:12000$)\w^n");
   add(menuBody, 511, "\r6. \wInvizibilitate \y(Pret:15000$)\w^n");
   add(menuBody, 511, "\r7. \wNightVizion \y(Pret:1000$)\w^n");
   add(menuBody, 511, "\r0. \wExit^n");
   
   new keys = ( 1<<0 | 1<<1 | 1<<2 | 1<<3 | 1<<4 | 1<<5 | 1<<6 | 1<<7 | 1<<8 | 1<<9);
   show_menu(id, keys, menuBody, -1, "DeathRun Shop");
}

public drshop(id, key) {
   switch(key) 
   {
      case 0:
      {
         new bani,banif;
         bani = cs_get_user_money(id);
         if(bani < 500) {
            chat_color(id,"!g[ZE.WATF.RO] !yAi nevoie de !g500$");
            return PLUGIN_HANDLED;
         }
         
         banif = bani - 500;
         cs_set_user_money(id,banif);
         chat_color(id,"!g[ZE.WATF.RO] !yAi cumparat o grenada !gHe! !yAi ramas cu !g%d$",banif);
         give_item(id,"weapon_hegrenade");
      }
      case 1:
      {
         new bani,banif;
         bani = cs_get_user_money(id);
         if(bani < 500) {
            chat_color(id,"!g[ZE.WATF.RO] !yAi nevoie de !g500$");
            return PLUGIN_HANDLED;
         }
         
         banif = bani - 500;
         cs_set_user_money(id,banif);
         chat_color(id,"!g[ZE.WATF.RO] !yAi cumparat o grenada !gFlashBang! !yAi ramas cu !g%d$",banif);
         give_item(id,"weapon_flashbang");
      }
      case 2:
           {
         new bani,banif;
         bani = cs_get_user_money(id);
         if(bani < 500) {
            chat_color(id,"!g[ZE.WATF.RO] !yAi nevoie de !g500$");
            return PLUGIN_HANDLED;
         }
         
         banif = bani - 500;
         cs_set_user_money(id,banif);
         chat_color(id,"!g[ZE.WATF.RO] !yAi cumparat o grenada !gSmoke! !yAi ramas cu !g%d$",banif);
         give_item(id,"weapon_smokegrenade");
      }
      case 3:
      {
         new bani,banif;
         bani = cs_get_user_money(id);
         if(bani < 5000) {
            chat_color(id,"!g[ZE.WATF.RO] !yAi nevoie de !g5000$");
            return PLUGIN_HANDLED;
         }
         
         banif = bani - 5000;
         cs_set_user_money(id,banif);
         chat_color(id,"!g[ZE.WATF.RO] !yAi cumparat !gViteza! !yAi ramas cu !g%d$",banif);
         
         new Float:speed = get_user_maxspeed(id) + 50.0;
         set_user_maxspeed(id,speed);
      }
      case 4:
      {
         new bani,banif;
         bani = cs_get_user_money(id);
         if(bani < 12000) {
            chat_color(id,"!g[ZE.WATF.RO] !yAi nevoie de !g12000$");
            return PLUGIN_HANDLED;
         }
         
         banif = bani - 12000;
         cs_set_user_money(id,banif);
         chat_color(id,"!g[ZE.WATF.RO] !yAi cumparat !gGravitatie! !yAi ramas cu !g%d$",banif);
         set_user_gravity(id,0.4);
      }
      case 5:
      {
         new bani,banif;
         bani = cs_get_user_money(id);
         if(bani < 15000) {
            chat_color(id,"!g[ZE.WATF.RO] !yAi nevoie de !g15000$");
            return PLUGIN_HANDLED;
         }
         
         banif = bani - 15000;
         cs_set_user_money(id,banif);
         chat_color(id,"!g[ZE.WATF.RO] !yAi cumparat !gInvizibilitate! !yAi ramas cu !g%d$",banif);
         set_entity_visibility(id, 0);
      }
	   case 6:
      {
         new bani,banif;
         bani = cs_get_user_money(id);
         if(bani < 1000) {
            chat_color(id,"!g[ZE.WATF.RO] !yAi nevoie de !g1000$");
            return PLUGIN_HANDLED;
         }
         
         banif = bani - 1000;
         cs_set_user_money(id,banif);
         chat_color(id,"!g[ZE.WATF.RO] !yAi cumparat !gNightVizion! !yAi ramas cu !g%d$",banif);
         client_cmd(id, "nightvision")
      }
      
      default: return PLUGIN_HANDLED;
   }
   return PLUGIN_HANDLED;
}

public removeInvis(id) {
   set_user_noclip(id,0);
}

stock chat_color(const id, const input[], any:...)
{
new count = 1, players[32]
static msg[191]
vformat(msg, 190, input, 3)

replace_all(msg, 190, "!g", "^4")
replace_all(msg, 190, "!y", "^1")
replace_all(msg, 190, "!team", "^3")

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();
   }
  }
}
}
fara parachute si invizibilitate scazuta,pastea ti le fac cand am timp
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:

02 Mar 2014, 15:31

| Afiseaza codul
#include <amxmodx>
#include <cstrike>
#include <fun>
#include <engine>

new g_Menu;

new bool:IsInvis[33];

public plugin_init() {
	register_plugin("DrShop", "0.1", "Ex3cuTioN");
	
	g_Menu = register_menuid("DeathRun Shop");
	register_menucmd(g_Menu, 1023, "drshop");
	
	register_clcmd("say /shop","cmdShop",-1,"<cumperi diverse lucruri>");
	register_clcmd("say /shop","cmdShop",-1,"<cumperi diverse lucruri>");
	
	register_event("CurWeapon", "CurrentWeapon", "be", "1=1");
	register_event("DeathMsg", "DeathMsg", "a");
}

public cmdShop(id) {   
	new menuBody[512];
	
	add(menuBody, 511, "\rMagazinul [ZE.WATF.RO]\w^n^n");
	add(menuBody, 511, "\r1. \wHe \y(Pret:500$)\w^n");
	add(menuBody, 511, "\r2. \wFlash \y(Pret:500$)\w^n");
	add(menuBody, 511, "\r3. \wSmoke \y(Pret:500$)\w^n");
	add(menuBody, 511, "\r4. \wSpeed \y(Pret:5000$)\w^n");
	add(menuBody, 511, "\r5. \wGravitatie \y(Pret:12000$)\w^n");
	add(menuBody, 511, "\r6. \wInvizibilitate \y(Pret:15000$)\w^n");
	add(menuBody, 511, "\r7. \wNight Vision \y(Pret:500$)\w^n");
	add(menuBody, 511, "\r0. \wExit^n");
	
	new keys = ( 1<<0 | 1<<1 | 1<<2 | 1<<3 | 1<<4 | 1<<5 | 1<<6 | 1<<7 | 1<<8 | 1<<9);
	show_menu(id, keys, menuBody, -1, "DeathRun Shop");
}

public drshop(id, key) {
	switch(key) 
	{
		case 0:
		{
			new bani,banif;
			bani = cs_get_user_money(id);
			if(bani < 500) {
				chat_color(id,"!g[ZE.WATF.RO] !yAi nevoie de !g500$");
				return PLUGIN_HANDLED;
			}
			
			banif = bani - 500;
			cs_set_user_money(id,banif);
			chat_color(id,"!g[ZE.WATF.RO] !yAi cumparat o grenada !gHe! !yAi ramas cu !g%d$",banif);
			give_item(id,"weapon_hegrenade");
		}
		case 1:
		{
			new bani,banif;
			bani = cs_get_user_money(id);
			if(bani < 500) {
				chat_color(id,"!g[ZE.WATF.RO] !yAi nevoie de !g500$");
				return PLUGIN_HANDLED;
			}
			
			banif = bani - 500;
			cs_set_user_money(id,banif);
			chat_color(id,"!g[ZE.WATF.RO] !yAi cumparat o grenada !gFlashBang! !yAi ramas cu !g%d$",banif);
			give_item(id,"weapon_flashbang");
		}
		case 2:
		{
			new bani,banif;
			bani = cs_get_user_money(id);
			if(bani < 500) {
				chat_color(id,"!g[ZE.WATF.RO] !yAi nevoie de !g500$");
				return PLUGIN_HANDLED;
			}
			
			banif = bani - 500;
			cs_set_user_money(id,banif);
			chat_color(id,"!g[ZE.WATF.RO] !yAi cumparat o grenada !gSmoke! !yAi ramas cu !g%d$",banif);
			give_item(id,"weapon_smokegrenade");
		}
		case 3:
		{
			new bani,banif;
			bani = cs_get_user_money(id);
			if(bani < 5000) {
				chat_color(id,"!g[ZE.WATF.RO] !yAi nevoie de !g5000$");
				return PLUGIN_HANDLED;
			}
			
			banif = bani - 5000;
			cs_set_user_money(id,banif);
			chat_color(id,"!g[ZE.WATF.RO] !yAi cumparat !gViteza! !yAi ramas cu !g%d$",banif);
			
			new Float:speed = get_user_maxspeed(id) + 50.0;
			set_user_maxspeed(id,speed);
		}
		case 4:
		{
			new bani,banif;
			bani = cs_get_user_money(id);
			if(bani < 12000) {
				chat_color(id,"!g[ZE.WATF.RO] !yAi nevoie de !g12000$");
				return PLUGIN_HANDLED;
			}
			
			banif = bani - 12000;
			cs_set_user_money(id,banif);
			chat_color(id,"!g[ZE.WATF.RO] !yAi cumparat !gGravitatie! !yAi ramas cu !g%d$",banif);
			set_user_gravity(id,0.4);
		}
		case 5:
		{
			new bani,banif;
			bani = cs_get_user_money(id);
			if(bani < 15000) {
				chat_color(id,"!g[ZE.WATF.RO] !yAi nevoie de !g15000$");
				return PLUGIN_HANDLED;
			}
			
			banif = bani - 15000;
			cs_set_user_money(id,banif);
			chat_color(id,"!g[ZE.WATF.RO] !yAi cumparat !gInvizibilitate! !yAi ramas cu !g%d$",banif);
			IsInvis[id] = true;
			CurrentWeapon(id);
		}
		
		case 6:
		{
			if(cs_get_user_money(id) < 500)
			{
				chat_color(id,"!g[ZE.WATF.RO] !yAi nevoie de !g500$");
				return PLUGIN_HANDLED;
			}
			
			cs_set_user_money(id, cs_get_user_money(id) - 500);
			chat_color(id,"!g[ZE.WATF.RO] !yAi cumparat !gNight Vision!");
			give_item(id, "item_nvgs");
		}
		
		default: return PLUGIN_HANDLED;
	}
	return PLUGIN_HANDLED;
}

stock chat_color(const id, const input[], any:...)
{
	new count = 1, players[32]
	static msg[191]
	vformat(msg, 190, input, 3)
	
	replace_all(msg, 190, "!g", "^4")
	replace_all(msg, 190, "!y", "^1")
	replace_all(msg, 190, "!team", "^3")
	
	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();
			}
		}
	}
}
public CurrentWeapon(id)
{
	if(is_user_alive(id) && IsInvis[id])
		set_user_rendering(id, kRenderFxNone, 0, 0, 0, kRenderNormal, 4);
		
		
	else
		set_user_rendering(id, kRenderFxNone, 0, 0, 0, kRenderNormal);
		
}
public DeathMsg()
	IsInvis[read_data(2)] = false;


Fara parashuta .. Sorry ;))
User avatar
Junky444
Membru, skill +1
Membru, skill +1
Posts: 412
Joined: 01 Feb 2014, 17:51
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Has thanked: 30 times
Been thanked: 4 times
Contact:

02 Mar 2014, 16:08

Nu merge , cand cumpar nightvizion , imi apare mesajul cu ce am cumparat dar nu merge activat .... aceeasi problema si la invizibilitate , o cumpar dar nu ma fac invizibil deloc
Daca nu poti face treaba cu invizibilitatea il poti lasa asa cum este , dar il poti face sa dureze doar 5 secunde apoi sa revina vizibil la loc?
Ai aici un model .... dar acesta este cu noclip
new bani,banif;
bani = cs_get_user_money(id);
if(bani < 16000) {
chat_color(id,"!g[Deathrun] !yAi nevoie de !g16000$");
return PLUGIN_HANDLED;
}

banif = bani - 16000;
cs_set_user_money(id,banif);
chat_color(id,"!g[Deathrun] !yAi cumparat !gNoClip !ypentru !g30 secunde! !yAi ramas cu !g%d$",banif);
set_user_noclip(id,1);
set_task(30.0,"removeInvis",id);
Image
Image
Image
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:

02 Mar 2014, 16:30

Junky444 wrote:Nu merge , cand cumpar nightvizion , imi apare mesajul cu ce am cumparat dar nu merge activat .... aceeasi problema si la invizibilitate , o cumpar dar nu ma fac invizibil deloc
Daca nu poti face treaba cu invizibilitatea il poti lasa asa cum este , dar il poti face sa dureze doar 5 secunde apoi sa revina vizibil la loc?
Ai aici un model .... dar acesta este cu noclip
new bani,banif;
bani = cs_get_user_money(id);
if(bani < 16000) {
chat_color(id,"!g[Deathrun] !yAi nevoie de !g16000$");
return PLUGIN_HANDLED;
}

banif = bani - 16000;
cs_set_user_money(id,banif);
chat_color(id,"!g[Deathrun] !yAi cumparat !gNoClip !ypentru !g30 secunde! !yAi ramas cu !g%d$",banif);
set_user_noclip(id,1);
set_task(30.0,"removeInvis",id);
No clip nu e invizibilitate .. Nu e aceiasi treaba ...
User avatar
Junky444
Membru, skill +1
Membru, skill +1
Posts: 412
Joined: 01 Feb 2014, 17:51
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Has thanked: 30 times
Been thanked: 4 times
Contact:

02 Mar 2014, 16:36

Lasa invizibilitatea ..... macar rezolva treaba cu NightVizion te rog
Image
Image
Image
#Vali
Fost moderator
Fost moderator
Posts: 2611
Joined: 24 Jan 2012, 11:00
Detinator Steam: Da
SteamID: id/spryt3
Reputatie: Fost Moderator
Fost Scripter eXtreamCS.com
1.2 / 3
Location: root
Has thanked: 81 times
Been thanked: 144 times
Contact:

02 Mar 2014, 16:48

Code: Select all

give_item(id, "item_nvgs");
->>>>>>>>>>>>>>>>>>>

Code: Select all

cs_set_user_nvg(id,1)
User avatar
Junky444
Membru, skill +1
Membru, skill +1
Posts: 412
Joined: 01 Feb 2014, 17:51
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Has thanked: 30 times
Been thanked: 4 times
Contact:

02 Mar 2014, 17:48

Iti multumesc Vali merge :P ms mult
VA MULTUMESC LA TOTI
Daca mai vrea cineva acest plugin il aveti aici

Code: Select all

#include <amxmodx>
#include <cstrike>
#include <fun>
#include <engine>

new g_Menu;

new bool:IsInvis[33];

public plugin_init() {
	register_plugin("DrShop", "0.1", "Ex3cuTioN");
	
	g_Menu = register_menuid("DeathRun Shop");
	register_menucmd(g_Menu, 1023, "drshop");
	
	register_clcmd("say /shop","cmdShop",-1,"<cumperi diverse lucruri>");
	register_clcmd("say /shop","cmdShop",-1,"<cumperi diverse lucruri>");
	
	register_event("CurWeapon", "CurrentWeapon", "be", "1=1");
	register_event("DeathMsg", "DeathMsg", "a");
}

public cmdShop(id) {   
	new menuBody[512];
	
	add(menuBody, 511, "\rMagazinul [ZE.WATF.RO]\w^n^n");
	add(menuBody, 511, "\r1. \wHe \y(Pret:900$)\w^n");
	add(menuBody, 511, "\r2. \wFlash \y(Pret:800$)\w^n");
	add(menuBody, 511, "\r3. \wSmoke \y(Pret:800$)\w^n");
	add(menuBody, 511, "\r4. \wSpeed \y(Pret:6000$)\w^n");
	add(menuBody, 511, "\r5. \wGravitatie \y(Pret:5000$)\w^n");
	add(menuBody, 511, "\r6. \wNight Vision \y(Pret:700$)\w^n");
	add(menuBody, 511, "\r0. \wExit^n");
	
	new keys = ( 1<<0 | 1<<1 | 1<<2 | 1<<3 | 1<<4 | 1<<5 | 1<<6 | 1<<7 | 1<<8 | 1<<9);
	show_menu(id, keys, menuBody, -1, "DeathRun Shop");
}

public drshop(id, key) {
	switch(key) 
	{
		case 0:
		{
			new bani,banif;
			bani = cs_get_user_money(id);
			if(bani < 900) {
				chat_color(id,"!g[ZE.WATF.RO] !yAi nevoie de !g900$");
				return PLUGIN_HANDLED;
			}
			
			banif = bani - 900;
			cs_set_user_money(id,banif);
			chat_color(id,"!g[ZE.WATF.RO] !yAi cumparat o grenada !gHe! !yAi ramas cu !g%d$",banif);
			give_item(id,"weapon_hegrenade");
		}
		case 1:
		{
			new bani,banif;
			bani = cs_get_user_money(id);
			if(bani < 800) {
				chat_color(id,"!g[ZE.WATF.RO] !yAi nevoie de !g800$");
				return PLUGIN_HANDLED;
			}
			
			banif = bani - 800;
			cs_set_user_money(id,banif);
			chat_color(id,"!g[ZE.WATF.RO] !yAi cumparat o grenada !gFlashBang! !yAi ramas cu !g%d$",banif);
			give_item(id,"weapon_flashbang");
		}
		case 2:
		{
			new bani,banif;
			bani = cs_get_user_money(id);
			if(bani < 800) {
				chat_color(id,"!g[ZE.WATF.RO] !yAi nevoie de !g800$");
				return PLUGIN_HANDLED;
			}
			
			banif = bani - 800;
			cs_set_user_money(id,banif);
			chat_color(id,"!g[ZE.WATF.RO] !yAi cumparat o grenada !gSmoke! !yAi ramas cu !g%d$",banif);
			give_item(id,"weapon_smokegrenade");
		}
		case 3:
		{
			new bani,banif;
			bani = cs_get_user_money(id);
			if(bani < 6000) {
				chat_color(id,"!g[ZE.WATF.RO] !yAi nevoie de !g6000$");
				return PLUGIN_HANDLED;
			}
			
			banif = bani - 6000;
			cs_set_user_money(id,banif);
			chat_color(id,"!g[ZE.WATF.RO] !yAi cumparat !gViteza! !yAi ramas cu !g%d$",banif);
			
			new Float:speed = get_user_maxspeed(id) + 50.0;
			set_user_maxspeed(id,speed);
		}
		case 4:
		{
			new bani,banif;
			bani = cs_get_user_money(id);
			if(bani < 5000) {
				chat_color(id,"!g[ZE.WATF.RO] !yAi nevoie de !g5000$");
				return PLUGIN_HANDLED;
			}
			
			banif = bani - 5000;
			cs_set_user_money(id,banif);
			chat_color(id,"!g[ZE.WATF.RO] !yAi cumparat !gGravitatie! !yAi ramas cu !g%d$",banif);
			set_user_gravity(id,0.4);
		}
		case 6:
		{
			if(cs_get_user_money(id) < 700)
			{
				chat_color(id,"!g[ZE.WATF.RO] !yAi nevoie de !g700$");
				return PLUGIN_HANDLED;
			}
			
			cs_set_user_money(id, cs_get_user_money(id) - 700);
			chat_color(id,"!g[ZE.WATF.RO] !yAi cumparat !gNight Vision!");
			cs_set_user_nvg(id,1)
		}
		
		default: return PLUGIN_HANDLED;
	}
	return PLUGIN_HANDLED;
}

stock chat_color(const id, const input[], any:...)
{
	new count = 1, players[32]
	static msg[191]
	vformat(msg, 190, input, 3)
	
	replace_all(msg, 190, "!g", "^4")
	replace_all(msg, 190, "!y", "^1")
	replace_all(msg, 190, "!team", "^3")
	
	if (id) players[0] = id; else get_players(players, count, "ch")
	{
		for (new i = 0; i < count; i++)
		{
			if (is_user_connected(players[i]))
			{
				message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players[i])
				write_byte(players[i]);
				write_string(msg);
				message_end();
			}
		}
	}
}
public CurrentWeapon(id)
{
	if(is_user_alive(id) && IsInvis[id])
		set_user_rendering(id, kRenderFxNone, 0, 0, 0, kRenderNormal, 4);
		
		
	else
		set_user_rendering(id, kRenderFxNone, 0, 0, 0, kRenderNormal);
		
}
public DeathMsg()
	IsInvis[read_data(2)] = false;
Image
Image
Image
Post Reply

Return to “Cereri”

  • Information