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
Soke
Membru, skill +1
Membru, skill +1
Posts: 248
Joined: 31 May 2012, 20:58
Detinator Steam: Da
CS Status: Umblu pe forum
Detinator server CS: Da
SteamID: MorenuRaulAndrei
Has thanked: 11 times
Been thanked: 16 times
Contact:

12 Jul 2012, 14:16

Salut vreau si eu un plugin shop pentru deathrun sa aiba asa :
1.Deagle [cost 10000$]
2.Viata [cost 2000$]
3.Grenada HE,SMOKE [cost 4500$]
4.Viteza [cost 5000$]


La viteza vreau sa fie viteza mare ff mare nu extrema dar sa fie mare
Cand scri /shop
Soke
Membru, skill +1
Membru, skill +1
Posts: 248
Joined: 31 May 2012, 20:58
Detinator Steam: Da
CS Status: Umblu pe forum
Detinator server CS: Da
SteamID: MorenuRaulAndrei
Has thanked: 11 times
Been thanked: 16 times
Contact:

13 Jul 2012, 22:30

UP .....
User avatar
tre3fla
Membru eXtream
Membru eXtream
Posts: 5333
Joined: 27 May 2012, 10:15
Detinator Steam: Da
CS Status: Allah Akbar !
Detinator server CS: Nu
SteamID: /id/tre3fla_xxx
Has thanked: 14 times
Been thanked: 129 times

13 Jul 2012, 23:31

pentru ce echipe il vrei? T/CT
User avatar
CamPagNe
Fost moderator
Fost moderator
Posts: 329
Joined: 12 Jun 2012, 14:20
Detinator Steam: Da
CS Status: Fuck yeah !
Reputatie: Fost Moderator ajutator
Has thanked: 13 times
Been thanked: 71 times
Contact:

13 Jul 2012, 23:32

Vezi daca merge, sunt incepator deci fara critici :D

SMA | Afiseaza codul
#include <amxmodx>
#include <fun>
#include <amxmisc>
#include <cstrike>
			
public plugin_init(){

    register_plugin("Shop Menu", "1.0", "Power.")
    
    register_menucmd(register_menuid("SHOP MENU"), 1023, "setoption") 
    
    register_clcmd("say /shop","shop_menu")
}

public shop_menu(id) 
{
	if(cs_get_user_team(id) == CS_TEAM_T)
        {
             client_print(id, print_chat,"[SHOP] doar CT pot folosi comanda de shop !");
             return PLUGIN_HANDLED
        } 
             
	chooseoption(id)
	
	return PLUGIN_HANDLED
       
}

public chooseoption(id)
{
    new menu[192] 
    new keys = MENU_KEY_0|MENU_KEY_1|MENU_KEY_2|MENU_KEY_3|MENU_KEY_4|MENU_KEY_5|MENU_KEY_6|MENU_KEY_7|MENU_KEY_8|MENU_KEY_9     
    format(menu, 191, "\yShop Menu^n^n\r1.\w Deagle \r- \y10000$ ^n\r2.\w Viata \r- \y2000$^n\r3.\w Greanda HE/Smoke \r- \y4500$^n\r4.\w Viteza \r- \y5000$^n^n\r0.\w Exit") 
    show_menu(id, keys, menu)      
    return PLUGIN_CONTINUE
}

public setoption(id, key, menu)
{
    if(key == 0) {
    	
         new money = cs_get_user_money(id);
	 
         new cost = 10000;
         if (money < cost)
         {
            client_print(id, print_chat, "[SHOP] Nu ai destui bani !");
            return PLUGIN_CONTINUE;
         }
       
	 give_item(id, "weapon_deagle ");
	
	 cs_set_user_money(id, money-cost);
	 client_print(id, print_chat, "[SHOP] Ai primit un Deagle !");
         menu_destroy(menu)
         return PLUGIN_HANDLED
         
    }

    if(key == 1) {
       
         new money = cs_get_user_money(id);
	 
         new cost = 2000;
         if (money < cost)
         {
            client_print(id, print_chat, "[SHOP] Nu ai destui bani !");
            return PLUGIN_CONTINUE;
         }
       
	 set_user_health(id, 100)
	
	 cs_set_user_money(id, money-cost);
	 client_print(id, print_chat, "[SHOP] Ai primit 100 HP !");
         menu_destroy(menu)
         return PLUGIN_HANDLED

    }

    if(key == 2) {
         new money = cs_get_user_money(id);
	 
         new cost = 4500;
         if (money < cost)
         {
            client_print(id, print_chat, "[SHOP] Nu ai destui bani !");
            return PLUGIN_CONTINUE;
         }
       
	 give_item(id, "weapon_hegrenade");
	 give_item(id, "weapon_smokegrenade");
	
	 cs_set_user_money(id, money-cost);
	 client_print(id, print_chat, "[SHOP] Ai primit o grenada HE & Smoke !");
         menu_destroy(menu)
         return PLUGIN_HANDLED
    }

    if(key == 3) {
            new money = cs_get_user_money(id);
	 
         new cost = 5000;
         if (money < cost)
         {
            client_print(id, print_chat, "[SHOP] Nu ai destui bani !");
            return PLUGIN_CONTINUE;
         }
       
         set_user_maxspeed(id, 420.0);
	
	 cs_set_user_money(id, money-cost);
	 client_print(id, print_chat, "[SHOP] Viteza ti-a crescut la 420 !");
         menu_destroy(menu)
         return PLUGIN_HANDLED

    }
         
    else {
         return PLUGIN_HANDLED
    }

    return PLUGIN_HANDLED
}
Post Reply

Return to “Cereri”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 24 guests