Cerere plugin SHOP.

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
Cristian
Fost moderator
Fost moderator
Posts: 3098
Joined: 12 Sep 2010, 12:19
Detinator Steam: Da
CS Status: None!
Detinator server CS: Nu
SteamID: -
Reputatie: Fost Moderator
Nume anterior : S!l@ba, jackanape, vengeance
Fost Membru Club eXtreamCS (doua luni)
Location: Craiova
Has thanked: 34 times
Been thanked: 149 times
Contact:

10 Dec 2013, 15:13

Doresc un plugin care să pot face 2 arme(adică,am awp cu model clasic,original,dar şi încă unul care e alt model) şi să aibă 2x arme(modele) pentru : m4a1,arma cu 200 gloanţe,pistoale duble,ak47,famas şi dacă se poate şi un shop pentru a cumpăra aceste arme(cele cu model nou) să se poată lua doar de adminii care au acces-ul h în componenţă !
Last edited by Cristian on 12 Dec 2013, 19:06, edited 1 time in total.
“You only live once, but if you do it right, once is enough.”
― Mae West
Rapidserver
User avatar
Cristian
Fost moderator
Fost moderator
Posts: 3098
Joined: 12 Sep 2010, 12:19
Detinator Steam: Da
CS Status: None!
Detinator server CS: Nu
SteamID: -
Reputatie: Fost Moderator
Nume anterior : S!l@ba, jackanape, vengeance
Fost Membru Club eXtreamCS (doua luni)
Location: Craiova
Has thanked: 34 times
Been thanked: 149 times
Contact:

11 Dec 2013, 08:42

UP !!!!
“You only live once, but if you do it right, once is enough.”
― Mae West
User avatar
DaNNe.
Fost moderator
Fost moderator
Posts: 2808
Joined: 08 Nov 2013, 20:43
Detinator Steam: Da
CS Status: Activitate scăzută
SteamID: /id/FurienMaster
Reputatie: Nick anterior: DnD. Gold, Emrys
0.5/3
Fost moderator ajutator
Fost Membru Club eXtreamCS (doua luni)
Has thanked: 230 times
Been thanked: 128 times
Contact:

11 Dec 2013, 21:52

Eu unul nu inteleg. Te rog mai explica odata mai clar.
Contact: Activitate scazuta.
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:

11 Dec 2013, 22:24

DnD. Gold wrote:Eu unul nu inteleg. Te rog mai explica odata mai clar.
Un plugin gen ala a lu hades {furien weapons shop} sau ceva de genu ... As face eu pluginul , dar am cam multe pe cap :))
User avatar
DaNNe.
Fost moderator
Fost moderator
Posts: 2808
Joined: 08 Nov 2013, 20:43
Detinator Steam: Da
CS Status: Activitate scăzută
SteamID: /id/FurienMaster
Reputatie: Nick anterior: DnD. Gold, Emrys
0.5/3
Fost moderator ajutator
Fost Membru Club eXtreamCS (doua luni)
Has thanked: 230 times
Been thanked: 128 times
Contact:

11 Dec 2013, 23:19

Gata am inteles.
Shopul sa fie pentru VIP, nu?
Lasa-mi modelele + ce sa contina.
Maine nu il pot face ca plec la un verisor care are PC de 128 mb RAM, dar Vineri il ai.
Doar da-mi mai multe detalii.
Contact: Activitate scazuta.
User avatar
Cristian
Fost moderator
Fost moderator
Posts: 3098
Joined: 12 Sep 2010, 12:19
Detinator Steam: Da
CS Status: None!
Detinator server CS: Nu
SteamID: -
Reputatie: Fost Moderator
Nume anterior : S!l@ba, jackanape, vengeance
Fost Membru Club eXtreamCS (doua luni)
Location: Craiova
Has thanked: 34 times
Been thanked: 149 times
Contact:

12 Dec 2013, 19:55

Upp,mă poate ajuta cineva?
“You only live once, but if you do it right, once is enough.”
― Mae West
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, 22:35

S!l@ba wrote:Upp,mă poate ajuta cineva?
Stai calm ti-l fac eu maine dupaamiaza cand vin de la scoata /:)

EDIT: Flagul "h" sau ADMIN_LEVEL_H?
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, 17:39

| Afiseaza codul
#include <amxmodx>
#include <fun>
#include <hamsandwich>
#include <fakemeta>
#include <cstrike>
#include <colorchat>

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

#define ADMIN_LEVEL	ADMIN_LEVEL_H
#define is_admin(%1)	(get_user_flags(%1) & ADMIN_LEVEL)

new bool:m4a1[33], bool:ak47[33], bool:m249[33], bool:elites[33], bool:famas[33];

new const m4a1_new_v[66] = "models/weap/v_m4a1.mdl"
new const m4a1_new_p[66] = "models/weap/p_m4a1.mdl"
new const ak47_new_v[66] = "models/weap/v_ak47.mdl"
new const ak47_new_p[66] = "models/weap/p_ak47.mdl"
new const m249_new_v[66] = "models/weap/v_m249.mdl"
new const m249_new_p[66] = "models/weap/p_m249.mdl"
new const elites_new_v[66] = "models/weap/v_elite.mdl"
new const elites_new_p[66] = "models/weap/p_elite.mdl"
new const famas_new_v[66] = "models/weap/v_famas.mdl"
new const famas_new_p[66] = "models/weap/p_famas.mdl"

new const szTag[] = "[SHOP]"

public plugin_init()
{
	register_plugin(PLUGIN, VERSION, AUTHOR)
	
	register_event("HLTV", "new_round", "a", "1=0", "2=0")
	register_event("CurWeapon", "CurrWeap", "be", "1=1")
	register_clcmd("say /shop", "shop")
}

public plugin_precache()
{
	precache_model(m4a1_new_v)
	precache_model(m4a1_new_p)
	
	precache_model(ak47_new_v)
	precache_model(ak47_new_p)
	
	precache_model(m249_new_v)
	precache_model(m249_new_p)
	
	precache_model(elites_new_v)
	precache_model(elites_new_p)
	
	precache_model(famas_new_v)
	precache_model(famas_new_p)
}
public CurrWeap(id)
{
	new szWeap = get_user_weapon(id)
	
	if(szWeap == CSW_M4A1 && m4a1[id])
	{
		set_pev(id, pev_viewmodel2, m4a1_new_v)
		set_pev(id, pev_weaponmodel2, m4a1_new_p)
	}
	else if(szWeap == CSW_AK47 && ak47[id])
	{
		set_pev(id, pev_viewmodel2, ak47_new_v)
		set_pev(id, pev_weaponmodel2, ak47_new_p)
	}
	else if(szWeap == CSW_M249 && m249[id])
	{
		set_pev(id, pev_viewmodel2, m249_new_v)
		set_pev(id, pev_weaponmodel2, m249_new_p)
	}
	else if(szWeap == CSW_FAMAS && famas[id])
	{
		set_pev(id, pev_viewmodel2, famas_new_v)
		set_pev(id, pev_weaponmodel2, famas_new_p)
	}
	else if(szWeap == CSW_ELITE && elites[id])
	{
		set_pev(id, pev_viewmodel2, elites_new_v)
		set_pev(id, pev_weaponmodel2, elites_new_p)
	}
}
public new_round(id)
{
	m4a1[id] = false;
	ak47[id] = false;
	m249[id] = false;
	elites[id] = false;
	famas[id] = false;
}
public shop(id)
{
	if(is_user_alive(id) && is_admin(id))
	{
		open_shop(id)
	}
	else if(!is_user_alive(id))
	{
		ColorChat(id, GREEN, "%s^x03 Nu poti cumpara nimic cand esti mort !", szTag)
	}
	else if(get_user_flags(id) & ADMIN_USER)
	{
		ColorChat(id, GREEN, "%s^x03 Nu poti cumpara decat daca esti admin !", szTag)
	}
}
public open_shop(id)
{
	new menu = menu_create("\yShop Menu", "items_shop")
	
	menu_additem(menu, "\yM4A1", "1", 0)
	menu_additem(menu, "\yAk47", "2", 0)
	menu_additem(menu, "\yM249", "3", 0)
	menu_additem(menu, "\yFamas", "4", 0)
	menu_additem(menu, "\yDouble Elites", "5", 0)
	
	menu_setprop(menu, MPROP_EXIT, MEXIT_ALL)
	menu_display(id, menu, 0)
}
public items_shop(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:
		{
			ColorChat(id, GREEN, "%s^x03 Ai cumparat^x04 M4A1^x03 !", szTag)
			give_item(id, "weapon_m4a1")
			cs_set_user_bpammo(id, CSW_M4A1, 90)
			m4a1[id] = true
		}
		case 2:
		{
			ColorChat(id, GREEN, "%s^x03 Ai cumparat^x04 AK 47^x03 !", szTag)
			give_item(id, "weapon_ak47")
			cs_set_user_bpammo(id, CSW_AK47, 90)
			ak47[id] = true
		}
		case 3:
		{
			ColorChat(id, GREEN, "%s^x03 Ai cumparat^x04 M249^x03 !", szTag)
			give_item(id, "weapon_m249")
			cs_set_user_bpammo(id, CSW_M249, 200)
			m249[id] = true
		}
		case 4:
		{
			ColorChat(id, GREEN, "%s^x03 Ai cumparat^x04 Famas^x03 !", szTag)
			give_item(id, "weapon_famas")
			cs_set_user_bpammo(id, CSW_FAMAS, 90)
			famas[id] = true
		}
		case 5:
		{
			ColorChat(id, GREEN, "%s^x03 Ai cumparat^x04 Double Elites^x03 !", szTag)
			give_item(id, "weapon_m4a1")
			cs_set_user_bpammo(id, CSW_ELITE, 120)
			elites[id] = true
		}
	}
	menu_destroy(menu)
	return 1;
}
Vezi daca merge , editezi tu flagul Adminului [La linia: "#define ADMIN_LEVEL ADMIN_LEVEL_H"]
Cosmin
Fost moderator
Fost moderator
Posts: 9366
Joined: 06 Jul 2013, 21:08
Detinator Steam: Da
Detinator server CS: Nu
Reputatie: Fost eXtream Mod
Fost Scripter eXtreamCS
Nume anterior: scosmynnnn
Has thanked: 492 times
Been thanked: 546 times

13 Dec 2013, 18:24

Code: Select all

public new_round(id)
{
	m4a1[id] = false;
	ak47[id] = false;
	m249[id] = false;
	elites[id] = false;
	famas[id] = false;
}
Aici sa parcurgi toti jucatorii :) Frumos gestul tau,ca ii ajuti ;) gj
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, 18:45

scosmynnnn wrote:

Code: Select all

public new_round(id)
{
	m4a1[id] = false;
	ak47[id] = false;
	m249[id] = false;
	elites[id] = false;
	famas[id] = false;
}
Aici sa parcurgi toti jucatorii :) Frumos gestul tau,ca ii ajuti ;) gj
Multumesc , incerc sa imi fac si eu o "reputatie" pe forum :D
Post Reply

Return to “Cereri”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 10 guests