INSIDE RESURSE

Resurse pentru toate jocurile online! samp, csgo, mape, muzica, filme, ps, divertisment, geforce, fzarea, muzica, clan, coduri, cfg, inside, resurse, servere, gata, facute, war, zone, pgl, long, nvid


Nu sunteti conectat. Conectati-va sau inregistrati-va

Deathrun Shop [Update 1.3A]

Por favor, faça o login para responder

Vezi subiectul anterior Vezi subiectul urmator In jos  Mesaj [Pagina 1 din 1]

#1vendME 

la data de Lun Mai 01, 2017 8:41 pm

avatar

Fondator
Fondator
Descriere: Este un plugin Shop pentru modul Deathrun cu diverse Extra Iteme doar pentru Conter Terrorist!
 
Descarcare[Trebuie sa fiti inscris si conectat pentru a vedea acest link]
 
Nume: Deathrun Shop
Versiune: 1.3a
Link oficial[Trebuie sa fiti inscris si conectat pentru a vedea acest link]
 
Sursa:
[sursa=]

Cod:
/* Plugin generated by AMXX-Studio */
 
#include <amxmodx>
#include <cstrike>
#include <fun>
 
new const PLUGIN[] = "Deathrun: Shop";
new const VERSION[] = "1.3a";
 
#pragma semicolon 1
#pragma tabsize 0
 
new const szTag[] = "!g[Deathrun]";
 
new const szPickAmmoSound[66] = "items/9mmclip1.wav";
new szTitle[128], szItem1[128], szItem2[128], szItem3[128], szItem4[128], szItem5[128], szItem6[128],
szItem7[128], szItem8[128], dr_hp, dr_hp_cost, dr_ap, dr_ap_cost, dr_deagle_cost, he_flash_cost,
dr_awp_cost, dr_gm_sec, dr_gm_rmv, dr_gm_cost, dr_invis_cost, dr_invis_rmv, dr_ak47_m4a1_cost;
 
public plugin_init()
{
register_plugin(PLUGIN, VERSION, "Adventx");
 
register_clcmd("say shop","ClCmdShop");
register_clcmd("say /shop","ClCmdShop");
 
dr_hp = register_cvar("deathrun_hp","100");
dr_hp_cost = register_cvar("deathrun_hp_cost","6000");
dr_ap = register_cvar("deathrun_ap","200");
dr_ap_cost = register_cvar("deathrun_ap_cost","6000");   
dr_deagle_cost = register_cvar("deathrun_deagle_cost","5000");
he_flash_cost = register_cvar("deathrun_he_flash_cost","5000");
dr_awp_cost = register_cvar("deathrun_awp_cost","5000");
dr_gm_sec = register_cvar("deathrun_gm_sec","3");
dr_gm_rmv = register_cvar("deathrun_gm_rmv","3.0");
dr_gm_cost = register_cvar("deathrun_gm_cost","16000");
dr_invis_cost = register_cvar("deathrun_invis_cost","5000");
dr_invis_rmv = register_cvar("deathrun_invis_rmv","10.0");
dr_ak47_m4a1_cost = register_cvar("deathrun_ak47_m4a1_cost","12000");
}
 
public plugin_precache()
{
precache_sound(szPickAmmoSound);
}
 
public ClCmdShop(id)
{
if(get_user_team(id) == 2)
{
set_task(0.1, "ShowMenuCT", id);
}
}
 
public ShowMenuCT(id)
{
new iBani = cs_get_user_money(id);
formatex(szTitle, charsmax(szTitle), "\yDeathrun \rShop^n\yBani: \w%d$", iBani);
new szMenu = menu_create(szTitle, "ShowShopHandler");
 
if(iBani >= get_pcvar_num(dr_hp_cost) )
{
formatex(szItem1, charsmax(szItem1), "+ %d HP \r(%d$)", get_pcvar_num(dr_hp), get_pcvar_num(dr_hp_cost));
menu_additem(szMenu, szItem1,"1");
}
else
{
formatex(szItem1, charsmax(szItem1), "+ %d HP \r(\dNo Money\r)", get_pcvar_num(dr_hp));
menu_additem(szMenu, szItem1,"1");
}
if(iBani >= get_pcvar_num(dr_ap_cost) )
{
formatex(szItem2, charsmax(szItem2), "+ %d AP \r(%d$)", get_pcvar_num(dr_ap), get_pcvar_num(dr_ap_cost));
menu_additem(szMenu, szItem2,"2");
}
else
{
formatex(szItem2, charsmax(szItem2), "+ %d AP \r(\dNo Money\r)", get_pcvar_num(dr_ap));
menu_additem(szMenu, szItem2,"2");
}
if(iBani >= get_pcvar_num(dr_deagle_cost) )
{
formatex(szItem3, charsmax(szItem3), "Deagle \r(%d$)", get_pcvar_num(dr_deagle_cost));
menu_additem(szMenu, szItem3,"3");
}
else
{
formatex(szItem3, charsmax(szItem3), "Deagle \r(\dNo Money\r)");
menu_additem(szMenu, szItem3,"3");
}
if(iBani >= get_pcvar_num(he_flash_cost) )
{
formatex(szItem4, charsmax(szItem4), "HE + Flash \r(%d$)", get_pcvar_num(he_flash_cost));
menu_additem(szMenu, szItem4,"4");
}
else
{
formatex(szItem4, charsmax(szItem4), "HE + Flash \r(\dNo Money\r)");
menu_additem(szMenu, szItem4,"4");
}
if(iBani >= get_pcvar_num(dr_awp_cost) )
{
formatex(szItem5, charsmax(szItem5), "AWP \r(%d$)", get_pcvar_num(dr_awp_cost));
menu_additem(szMenu, szItem5,"5");
}
else
{
formatex(szItem5, charsmax(szItem5), "AWP \r(\dNo Money\r)");
menu_additem(szMenu, szItem5,"5");
}
if(iBani >= get_pcvar_num(dr_gm_cost) )
{
formatex(szItem6, charsmax(szItem6), "Godmode \y(%d sec) \r(%d$)", get_pcvar_num(dr_gm_sec), get_pcvar_num(dr_gm_cost));
menu_additem(szMenu, szItem6,"6");
}
else
{
formatex(szItem6, charsmax(szItem6), "Godmode \y(%d sec) \r(\dNo Money\r)", get_pcvar_num(dr_gm_sec));
menu_additem(szMenu, szItem6,"6");
}
if(iBani >= get_pcvar_num(dr_invis_cost) )
{
formatex(szItem7, charsmax(szItem7), "Invizibilitate \y(80%) \r(%d$)", get_pcvar_num(dr_invis_cost));
menu_additem(szMenu, szItem7,"7");
}
else
{
formatex(szItem7, charsmax(szItem7), "Invizibilitate \y(80%) \r(\dNo Money\r)");
menu_additem(szMenu, szItem7,"7");
}
if(iBani >= get_pcvar_num(dr_ak47_m4a1_cost) )
{
formatex(szItem8, charsmax(szItem8), "AK47 + M4A1 \r(%d$)", get_pcvar_num(dr_ak47_m4a1_cost));
menu_additem(szMenu, szItem7,"8");
}
else
{
formatex(szItem8, charsmax(szItem8), "AK47 + M4A1 \r(\dNo Money\r)");
menu_additem(szMenu, szItem7,"8");
}
 
menu_setprop(szMenu, MPROP_EXIT, MEXIT_ALL);
menu_display(id, szMenu, 0);
 
return PLUGIN_HANDLED;
}
 
public ShowShopHandler(id, szMenu, item)
{
if(item == MENU_EXIT || !is_user_alive(id) || get_user_team(id) != 2)
{
return PLUGIN_HANDLED;
}
 
new data[6], szName[64];
new access, callback;
menu_item_getinfo(szMenu, item, access, data, charsmax(data), szName, charsmax(szName), callback);
new key = str_to_num(data);
 
switch(key)
{
case 1:
{
if(cs_get_user_money(id) < get_pcvar_num(dr_hp_cost))
{
ChatColor(id, "%s !nYou don't have enough money to buy !t%d HP", szTag, get_pcvar_num(dr_hp));
return PLUGIN_HANDLED;
}
 
else
{
client_cmd(id, "spk %s", szPickAmmoSound);
set_user_health(id, get_user_health(id) + get_pcvar_num(dr_hp));
cs_set_user_money(id, cs_get_user_money(id) - get_pcvar_num(dr_hp_cost));
ChatColor(id, "%s !nYou bought !t%d HP !nfor !t%d$", szTag, get_pcvar_num(dr_hp), get_pcvar_num(dr_hp_cost));
}
}
 
case 2:
{
if(cs_get_user_money(id) < get_pcvar_num(dr_ap_cost))
{
ChatColor(id, "%s !nYou don't have enough money to buy !t%d AP", szTag, get_pcvar_num(dr_ap));
return PLUGIN_HANDLED;
}
 
else
{
client_cmd(id, "spk %s", szPickAmmoSound);
set_user_armor(id, get_user_armor(id) + get_pcvar_num(dr_ap));
cs_set_user_money(id, cs_get_user_money(id) - get_pcvar_num(dr_ap_cost));
ChatColor(id, "%s !nYou bought !t%d AP !nfor !t%d$", szTag, get_pcvar_num(dr_ap), get_pcvar_num(dr_ap_cost));
}
}
 
case 3:
{
if(cs_get_user_money(id) < get_pcvar_num(dr_deagle_cost))
{
ChatColor(id, "%s !nYou don't have enough money to buy !tDeagle", szTag);
return PLUGIN_HANDLED;
}
 
else
{
client_cmd(id, "spk %s", szPickAmmoSound);
give_item(id, "weapon_deagle");
cs_set_user_money(id, cs_get_user_money(id) - get_pcvar_num(dr_deagle_cost));
ChatColor(id, "%s !nYou bought !tDeagle !nfor !t%d$", szTag, get_pcvar_num(dr_deagle_cost));
}
}
 
case 4:
{
if(cs_get_user_money(id) < get_pcvar_num(he_flash_cost))
{
ChatColor(id, "%s !nYou don't have enough money to buy !tHE + Flash", szTag);
return PLUGIN_HANDLED;
}
 
else
{
client_cmd(id, "spk %s", szPickAmmoSound);
give_item(id, "weapon_hegrenade");
give_item(id, "weapon_flashbang");
cs_set_user_money(id, cs_get_user_money(id) - get_pcvar_num(he_flash_cost));
ChatColor(id, "%s !nYou bought !tHE + Flash !nfor !t%d$", szTag, get_pcvar_num(he_flash_cost));
}
}
 
case 5:
{
if(cs_get_user_money(id) < get_pcvar_num(dr_awp_cost))
{
ChatColor(id, "%s !nYou don't have enough money to buy !tAWP", szTag);
return PLUGIN_HANDLED;
}
 
else
{
client_cmd(id, "spk %s", szPickAmmoSound);
give_item(id, "weapon_awp");
cs_set_user_money(id, cs_get_user_money(id) - get_pcvar_num(dr_awp_cost));
ChatColor(id, "%s !nYou bought !tAWP !nfor !t%d$", szTag, get_pcvar_num(dr_awp_cost));
}
}
 
case 6:
{
if(cs_get_user_money(id) < get_pcvar_num(dr_gm_cost))
{
ChatColor(id, "%s !nYou don't have enough money to buy !tGodmode", szTag);
return PLUGIN_HANDLED;
}
 
else
{
client_cmd(id, "spk %s", szPickAmmoSound);
set_user_godmode(id, 1);
set_task(get_pcvar_float(dr_gm_rmv), "rmv_gd", id);
cs_set_user_money(id, cs_get_user_money(id) - get_pcvar_num(dr_gm_cost));
ChatColor(id, "%s !nYou bought !tGodmode !nfor !t%d$", szTag, get_pcvar_num(dr_gm_cost));
}
}
 
case 7:
{
if(cs_get_user_money(id) < get_pcvar_num(dr_invis_cost))
{
ChatColor(id, "%s !nYou don't have enough money to buy !tInvizibility (80%)", szTag);
return PLUGIN_HANDLED;
}
 
else
{
client_cmd(id, "spk %s", szPickAmmoSound);
set_user_rendering(id, kRenderFxGlowShell, 0, 0, 0, kRenderTransAlpha, 100);
set_task(get_pcvar_float(dr_invis_rmv) , "rmv_invis", id);
cs_set_user_money(id, cs_get_user_money(id) - get_pcvar_num(dr_invis_cost));
ChatColor(id, "%s !nYou bought !tInvizibility !nfor !t%d$", szTag, get_pcvar_num(dr_invis_cost));
}
}
 
case 8:
{
if(cs_get_user_money(id) < get_pcvar_num(dr_ak47_m4a1_cost))
{
ChatColor(id, "%s !nYou don't have enough money to buy !tAK47 + M4A1", szTag);
return PLUGIN_HANDLED;
}
 
else
{
client_cmd(id, "spk %s", szPickAmmoSound);
give_item(id, "weapon_ak47");
give_item(id, "weapon_m4a1");
cs_set_user_money(id, cs_get_user_money(id) - get_pcvar_num(dr_ak47_m4a1_cost));
ChatColor(id, "%s !nYou bought !tAK47 + M4A1 !nfor !t%d$", szTag, get_pcvar_num(dr_ak47_m4a1_cost));
}
}
}
 
menu_destroy(szMenu);
return PLUGIN_HANDLED;
}
 
public rmv_gd(id)
{
ChatColor(id, "%s !nYou don't have Godmode!", szTag);
set_user_godmode(id, 0);
}
 
public rmv_invis(id)
{
ChatColor(id, "%s !nYou don't have Invisibility!", szTag);
set_user_rendering(id);
}
 
stock ChatColor(const id, const input[], any:...)
{
new count = 1, players[32];
static msg[191];
vformat(msg, 190, input, 3);
 
replace_all(msg, 190, "!g", "^4"); // Green Color
replace_all(msg, 190, "!n", "^1"); // Default Color
replace_all(msg, 190, "!t", "^3"); // Team Color
replace_all(msg, 190, "!t2", "^0"); // Team2 Color
 
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();
}
}
}
}
 
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1033\\ f0\\ fs16 \n\\ par }
*/
[size]


[/sursa][/size]
 
Credite:

  • NicutaMM | Cstrike - Thx for Update  


 
Instalare:
1. Fisierul dr_shop.sma il puneti in addons/amxmodx/scripting
2. Fisierul dr_shop.amxx il puneti in addons/amxmodx/plugins
3. Intrati in fisierul addons/amxmodx/configs/plugins.ini si adaugati la urma:
dr_shop.amxx
 
Cvar-uri (se adauga in fisierul amxmodx\configs\amxx.cfg):

  • deathrun_hp 100 - Health



  • deathrun_hp_cost 6000 - Health Cost



  • deathrun_ap 200 - Armor



  • deathrun_ap_cost 6000 - Armor Cost



  • deathrun_deagle_cost 5000 - Deagle Cost



  • deathrun_he_flash_cost 5000 HE/Flash Cost



  • deathrun_awp_cost 5000 - AWP Cost



  • deathrun_gm_sec 3 - Godmode Seconds



  • deathrun_gm_rmv 3.0 - Godmode Remove



  • deathrun_gm_cost 16000 - Godmode Cost



  • deathrun_invis_cost 5000 - Invisibility Cost



  • deathrun_invis_rmv 10.0 - Invisibility Remove



  • deathrun_ak47_m4a1_cost 12000 - AK47/M4A1 Cost


 
Comenzi administrative (se tasteaza in consola si trebuie sa fiti administrator):
-
 
Comenzi publice (se tasteaza in joc prin apasarea tastei Y):
/shop - afiseaza shopul
 
Module necesare (se sterge ; din fata modulului de mai jos; acestea le gasiti in fisierul amxmodx\configs\modules.ini):
- Cstrike
- Fun

http://resurseinside.forumgratuit.ro

Vezi subiectul anterior Vezi subiectul urmator Sus  Mesaj [Pagina 1 din 1]

Por favor, faça o login para responder

Permisiunile acestui forum:
Nu puteti raspunde la subiectele acestui forum