Cerere modificare plugin

Modificari necesare ale pluginurilor

Moderators: Moderatori ajutatori, Moderatori, Echipa eXtreamCS.com

Locked
Azazel
Membru, skill +1
Membru, skill +1
Posts: 110
Joined: 20 Jul 2013, 11:35
Detinator Steam: Da
Detinator server CS: RESPAWN.CS1.RO
SteamID: crippezzz
Location: Miami
Has thanked: 6 times
Been thanked: 1 time
Contact:

17 Dec 2013, 20:59

Vreau sa-mi modificati si mie sa-mi ramana puterile si runda urmatoare.
Powers shop | Afiseaza codul
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fun>
#include <fakemeta>


#define PLUGIN "Powers shop"
#define VERSION "1.0"
#define AUTHOR "Azazel"

new FunnyMenu, gravity_server, invis_cvar, gravity_cvar, speed_cvar, armor_value
new pretnoclip, pretgodmode, pretspeed, prethealth_armor, pretrevive, pretgravity, pretinvis

new msg[256];
new bool:speed[33];
new menu[128];

public plugin_init()
{
	register_plugin(PLUGIN, VERSION, AUTHOR)
	
	// Cost's Cvars
	pretnoclip = register_cvar("fun_noclip_cost", "7000");
	pretgodmode = register_cvar("fun_godmode_cost", "10000");
	pretspeed =  register_cvar("fun_speed_cost","5000")
	prethealth_armor = register_cvar("fun_health_armor_cost","1000")
	pretrevive = register_cvar("fun_revive_cost","16000")
	pretgravity = register_cvar("fun_gravity_cost","1500")
	pretinvis = register_cvar("fun_invis_cost","16000")
	
	// Cvar's
	invis_cvar = register_cvar("fun_invis_cvar","5")
	gravity_cvar = register_cvar("fun_gravity_cvar","350")
	speed_cvar = register_cvar("fun_speed_cvar","500")
	gravity_server = get_cvar_pointer("sv_gravity")
	armor_value = register_cvar("fun_armor_cvar", "500")
	
	// Client Cmd's
	register_clcmd("say shop", "showmenu");
	register_clcmd("say_team shop","showmenu");
		
	// Event
	register_event("CurWeapon", "speed_check", "be");
	register_logevent("RoundEnd", 2, "1=Round_End", "1=Round_Draw");
		
		
	//Menu Stuff
	FunnyMenu = menu_create("\yPaintball Mode Powers Menu:", "menu_cmds", 0);
	
	// thanks to alka for help :)
	formatex(menu, 127, "\wBuy Godmode (Cost: %d)", get_pcvar_num(pretgodmode));
	menu_additem(FunnyMenu, menu, "1");
	formatex(menu, 127, "\wBuy Noclip (Cost: %d)", get_pcvar_num(pretnoclip));
	menu_additem(FunnyMenu, menu, "2");
	formatex(menu, 127, "\wBuy Speed (Cost: %d)", get_pcvar_num(pretspeed));
	menu_additem(FunnyMenu, menu, "3");
	formatex(menu, 127, "\wBuy Health & Armor (Cost: %d)", get_pcvar_num(prethealth_armor));
	menu_additem(FunnyMenu, menu, "4");
	formatex(menu, 127, "\wBuy Revive (Cost %d)", get_pcvar_num(pretrevive));
	menu_additem(FunnyMenu, menu, "5");
	formatex(menu, 127, "\wBuy Gravity (Cost %d)", get_pcvar_num(pretgravity));
	menu_additem(FunnyMenu, menu, "6");
	formatex(menu, 127, "\wBuy Invisibility(Cost %d)", get_pcvar_num(pretinvis));
	menu_additem(FunnyMenu, menu, "7");	
	menu_addblank(FunnyMenu, 0);
	
}

public showmenu(id)
{
	menu_display(id, FunnyMenu, 0);
}

public menu_cmds(id, menu, item)
{
	if(item == MENU_EXIT && is_user_connected(id))
	{
		menu_cancel(id);
		return 1;
	}
	
	new Data[2];
	new Access, Callback;
	
	menu_item_getinfo(menu, item, Access, Data, sizeof Data - 1, _, _, Callback);
	
	new Key = str_to_num(Data);
	
	switch(Key)
	{
		case 1:
		{
			if(!is_user_alive(id))
			{
				client_print(id, print_center,"^x03[CSONE]^x01 Esti mort, nu poti cumpara nimic acum.")
				return 0;
			}
			else
			if(cs_get_user_money(id) < get_pcvar_num(pretgodmode))
			{
				format(msg, 255, "^x03[CSONE]^x01 Ne pare rau, dar ai nevoie de ^x04%i$ ^x01 pentru a cumpara ^x04godmode ^x01!", get_pcvar_num(pretgodmode));
				mesaj_afisat(id, msg)
				return 1;
			}
			else
			{
				cs_set_user_money(id, cs_get_user_money(id) - get_pcvar_num(pretgodmode), 0);				
				format(msg, 255, "^x03[CSONE]^x01 Ai cumparat cu succes ^x04godmode !x01!");
				mesaj_afisat(id, msg)
				set_user_godmode(id, 1)
			}
		}
		case 2:
		{
			if(!is_user_alive(id))
			{
				client_print(id, print_center,"^x03[CSONE]^x01 Esti mort, nu poti cumpara nimic acum.")
				return 0;
			}
			else
			if(cs_get_user_money(id) < get_pcvar_num(pretnoclip))
			{
				format(msg, 255, "^x03[CSONE]^x01 Ne pare rau, dar ai nevoie de ^x04%i$ ^x01pentru a cumpara ^x04noclip ^x01!", get_pcvar_num(pretnoclip));
				mesaj_afisat(id, msg)
				return 1;
			}
			else
			{
				cs_set_user_money(id, cs_get_user_money(id) - get_pcvar_num(pretnoclip), 0);
				format(msg, 255, "^x03[CSONE]^x01 Ai cumparat cu succes ^x04noclip ^x04!");
				mesaj_afisat(id, msg)
				set_user_noclip(id, 1)
			}
		}
		case 3:
		{
			if(!is_user_alive(id))
			{
				client_print(id, print_center,"^x03[CSONE]^x01 Esti mort, nu poti cumpara nimic acum.")
				return 0;
			}
			else
			if(cs_get_user_money(id) < get_pcvar_num(pretspeed))
			{
				format(msg, 255, "^x03[CSONE]^x01 Ne pare rau, dar ai nevoie de ^x04%i$ ^x01pentru a cumpara ^x04speed ^x01!", get_pcvar_num(pretspeed));
				mesaj_afisat(id, msg)
				return 1;
			}
			else
			{
				cs_set_user_money(id, cs_get_user_money(id) - get_pcvar_num(pretspeed), 0);
				format(msg, 255, "^x03[CSONE]^x01 Ai cumparat cu succes ^x04speed ^x01!.");
				mesaj_afisat(id, msg)
				speed[id] = true
			}
		}
		case 4:
		{
			if(!is_user_alive(id))
			{
				client_print(id, print_center,"^x03[CSONE]^x01 Esti mort, nu poti cumpara nimic acum.")
				return 0;
			}
			else
			if(cs_get_user_money(id) < get_pcvar_num(prethealth_armor))
			{
				format(msg, 255, "^x03[CSONE]^x01 Ne pare rau, dar ai nevoie de ^x04%i$ ^x01pentru a cumpara ^x04health and armor ^x01!", get_pcvar_num(prethealth_armor));
				mesaj_afisat(id, msg)
				return 1;
			}
			else
			{
				cs_set_user_money(id, cs_get_user_money(id) - get_pcvar_num(prethealth_armor), 0);
				format(msg, 255, "^x03[CSONE]^x01 Ai cumparat cu succes ^x04health and armor ^x01! ");
				mesaj_afisat(id, msg)
				if(get_user_health(id) == 5)
				{
					set_user_health(id, 245)
					cs_set_user_armor(id, get_pcvar_num(armor_value), CS_ARMOR_VESTHELM)
					return 0;
				}
				else
				if(is_user_connected(id))
				{
					set_user_health(id, 255)
					cs_set_user_armor(id, get_pcvar_num(armor_value), CS_ARMOR_VESTHELM)
				}
			}
		}
		case 5:
		{
			if(is_user_alive(id))
			{
				client_print(id, print_center,"^x03[CSONE]^x01 Esti in viata, nu poti cumpara revive acum !")
				return 0;
			}
			else
			if(cs_get_user_money(id) < get_pcvar_num(pretrevive))
			{
				format(msg, 255, "^x03[CSONE]^x01 Ne pare rau, dar ai nevoie de ^x04%i$ ^x01pentru a cumpara ^x04revive ^x01.", get_pcvar_num(pretrevive));
				mesaj_afisat(id, msg)
				return 1;
			}
			else
			{
				cs_set_user_money(id, cs_get_user_money(id) - get_pcvar_num(pretrevive), 0);
				format(msg, 255, "^x03[CSONE]^x01 Ai reinviat!");
				mesaj_afisat(id, msg)
				if(!is_user_connected(id))
				set_task(0.2,"revive",id)
				set_task(0.4,"revive",id)
				new name[32]
				get_user_name(id, name, 31)
				set_hudmessage(255, 255, 255, 0.27, 0.82, 1, 6.0, 6.0)
				show_hudmessage(0, "%s a reinviat !")
				show_hudmessage(id, "Ai reinviat !")
			}
			
		}
		case 6:
		{
			if(!is_user_alive(id))
			{
				client_print(id, print_center,"^x03[CSONE]^x01 Esti mort, nu poti cumpara nimic acum.")
				return 0;
			}
			else
			if(cs_get_user_money(id) < get_pcvar_num(pretgravity))
			{
				format(msg, 255, "^x03[CSONE]^x01 Ne pare rau, dar ai nevoie de ^x04%i$ ^x01ca sa cumperi ^x04gravity ^x01!", get_pcvar_num(pretgravity));
				mesaj_afisat(id, msg)
				return 1;
			}
			else
			{
				cs_set_user_money(id, cs_get_user_money(id) - get_pcvar_num(pretgravity), 0);
				format(msg, 255, "^x03[CSONE]^x01 Ai cumparat cu succes ^x04gravity ^x01!");
				mesaj_afisat(id, msg)
				new Float:Gravity = get_pcvar_float(gravity_cvar) / get_pcvar_float(gravity_server)
				set_user_gravity(id , Gravity)
			}
		}
		case 7:
		{
			if(!is_user_alive(id))
			{
				client_print(id, print_center,"x03[CSONE]^x01 Esti mort, nu poti cumpara nimic acum.")
				return 0;
			}
			else
			if(cs_get_user_money(id) < get_pcvar_num(pretinvis))
			{
				format(msg, 255, "^x03[CSONE]^x01 Ne pare rau, dar ai nevoie de ^x04%i$ ^x01ca sa cumperi ^x04gravity ^x01!", get_pcvar_num(pretinvis));
				mesaj_afisat(id, msg)
				return 1;
			}
			else
			{
				cs_set_user_money(id, cs_get_user_money(id) - get_pcvar_num(pretinvis), 0);
				format(msg, 255, "^x03[CSONE]^x01 Ai cumparat cu succes ^x04gravity^x01 !");
				mesaj_afisat(id, msg)
				set_task(1.0,"invis",id,_,_,"a",1)
			}
		}
		
	}
	return 1;
}


public client_putinserver(id)
{
	set_task(10.0,"show_mesaj",id);

}

public show_mesaj(id)
{
	format(msg, 255, "^x01Pentru a cumpara ^x03SUPER-PUTERI ^x01 tastati in chat ^x04SHOP ^x01 !")
	mesaj_afisat(id, msg)
}


// Color chat

mesaj_afisat(id, msg[]) 
{
	message_begin(MSG_ONE, get_user_msgid("SayText"), {0,0,0}, id)
	write_byte(id)
	write_string(msg)
	message_end()
}

// Spawn

public revive(id)
{
	// Thanks to hlstriker for that info :)
	set_pev(id, pev_deadflag, 3)
	if(get_user_team(id) == 1)
	{
		give_item(id,"weapon_knife")
		give_item(id,"weapon_glock18")
		give_item(id,"ammo_9mm")
		give_item(id,"ammo_9mm")
		give_item(id,"ammo_9mm")
		give_item(id,"ammo_9mm")
	}
	else
	{
		give_item(id,"weapon_knife")
		give_item(id,"weapon_usp")
		give_item(id,"ammo_45acp")
		give_item(id,"ammo_45acp")
		give_item(id,"ammo_45acp")
		give_item(id,"ammo_45acp")
	}
}


// Speed Stuff
public speed_check(id)
{	
	if(speed[id])
		set_user_maxspeed(id, get_user_maxspeed(id) + get_pcvar_num(speed_cvar));	
}

public RoundEnd(id)
{
	new Players[32], Num;
	get_players(Players, Num);
	
	for(new i = 0 ; i < Num ; i++)
	{
		if(speed[Players])
		{
			speed[Players] = false;
			set_user_maxspeed(Players);
		}
	}
}
////////////

// Invizibility
public invis(id)
{
	set_user_rendering(id,kRenderFxGlowShell,0,0,0,kRenderTransAlpha,get_pcvar_num(invis_cvar))
}
Image
Image
Rapidserver
User avatar
Adventx
Membru, skill +4
Membru, skill +4
Posts: 1785
Joined: 17 Sep 2013, 20:44
Detinator Steam: Da
Reputatie: Fost moderator ajutator
Has thanked: 125 times
Been thanked: 142 times
Contact:

17 Dec 2013, 22:06

Ce puteri sa ramina?
User avatar
Mădălin
Fost moderator
Fost moderator
Posts: 4938
Joined: 06 Mar 2013, 21:40
Detinator Steam: Nu
Reputatie: Fost Administrator
Fost manager cs.extream.ro
Has thanked: 17 times
Been thanked: 240 times
Contact:

17 Dec 2013, 22:34

Mutat în: Modificari pluginuri
www.phpbb-themes.com - custom designs
Azazel
Membru, skill +1
Membru, skill +1
Posts: 110
Joined: 20 Jul 2013, 11:35
Detinator Steam: Da
Detinator server CS: RESPAWN.CS1.RO
SteamID: crippezzz
Location: Miami
Has thanked: 6 times
Been thanked: 1 time
Contact:

17 Dec 2013, 22:36

Toate, acel plugin este un shop de puteri, dar problema e ca expira runda viitoare dupa ce le cumperi.
Image
Image
User avatar
h4wk
Fost moderator
Fost moderator
Posts: 3806
Joined: 22 Sep 2009, 12:10
Detinator Steam: Da
Reputatie: Fost eXtream Mod
Nume anterior : DaZ , zimpe , Dan eXtream
Location: Iasi
Has thanked: 305 times
Been thanked: 320 times
Contact:

09 Jan 2014, 15:13

TOPIC INCHIS !
MOTIV : Titlul trebuie sa fie concis si sa reflecte, pe cat de mult posibil, continutul. Nu mai sunt acceptate titlurile de genul "Cerere modificare plugin".

Code: Select all

"Daca ai culoare nu inseamna ca esti mai presus ca un utilizator. Culoare e un fel de "rasplata" pentru ca te implici in "ridicarea" acestei comunitati.
Unii nu realizeaza ca daca ai culoare nu inseamna ca esti smecher." -- by Alexey
:troll :troll

Spui ceva,dar faci altceva !
Locked

Return to “Modificari pluginuri”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 4 guests