Knife Shop - Problem

В този раздел можете да подавате всякакви заявки за намиране, изработка или преработка на плъгини/модове.
Аватар
lantimilan
Извън линия
Foreigner
Foreigner
Мнения: 424
Регистриран на: 29 Ное 2017, 22:49
Се отблагодари: 31 пъти
Получена благодарност: 3 пъти

Knife Shop - Problem

Мнение от lantimilan » 15 Мар 2018, 15:25

Hi who can help me to edit this i add in menu and 3 things but i need code to add in case :
And i want to add same message same this

Код за потвърждение: Избери целия код

case 3: // Gravity
		{
			if( HasGravity[ id ] )
			{
				NextUse( id );
				return PLUGIN_HANDLED;
			}

			if( iPlayerPoints[ id ] >= get_pcvar_num( gravitycost ) )
			{
				set_user_gravity(id, 0.40)
				set_task(get_pcvar_float(time_gravity), "remove_gravity", id)

				iPlayerPoints[ id ] -= get_pcvar_num( gravitycost );
				HasGravity[ id ] = true;

				ColorChat(0, TEAM_COLOR, "%s^x04 %s^x01 bleu^x03 Gravity^x01 prej^x04 %d^x01 sek.", iPrefix, szName, get_pcvar_num(time_gravity));
			}
			else NoPoints( id );
		}

Код за потвърждение: Избери целия код

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

public plugin_init() {
    register_plugin("Shitorja Thikave", "1.0", "Raps");
    
    register_menucmd(register_menuid("Knife Shop"), 1023, "ShopHandle");
    
    register_clcmd("say /shop", "Shop");
    register_clcmd("say_team /shop", "Shop");
    
    register_dictionary("knife_expmod.txt");
}
public Shop(id) {
    static szMenuBody[128], iLen=0;
    
    iLen = formatex(szMenuBody, charsmax(szMenuBody), "Dyqani Thikave:^n");
    iLen += formatex(szMenuBody[iLen], charsmax(szMenuBody)-iLen, "^n1. Respawn [12000$]");
    iLen += formatex(szMenuBody[iLen], charsmax(szMenuBody)-iLen, "^n2. HE Grenates [11000$]");
    iLen += formatex(szMenuBody[iLen], charsmax(szMenuBody)-iLen, "^n3. 15 Extra Health [5500$]");
    iLen += formatex(szMenuBody[iLen], charsmax(szMenuBody)-iLen, "^n4. Gravity [5000]");
	iLen += formatex(szMenuBody[iLen], charsmax(szMenuBody)-iLen, "^n5. Speed [10000]");
	iLen += formatex(szMenuBody[iLen], charsmax(szMenuBody)-iLen, "^n6. Armour [10000]");
	
    iLen += format(szMenuBody[iLen], charsmax(szMenuBody)-iLen, "^n^n0. Exit");
    
    new iKeys = MENU_KEY_1 | MENU_KEY_2 | MENU_KEY_3 | MENU_KEY_0;
    
    show_menu(id, iKeys, szMenuBody, -1, "Knife Shop");
}

public ShopHandle(id, iKey) {
    switch(iKey) {
        case 0: {
            if(cs_get_user_money(id) > 12000) {
                cs_set_user_money(id, cs_get_user_money(id) - 12000);
                
                ExecuteHamB(Ham_CS_RoundRespawn, id);
                
                static szName[33];
                get_user_name(id, szName, charsmax(szName));
                
                client_print(0, print_chat, "%s %L", szName, id, "ML_BUY");
            }
            else client_print(id, print_chat, "%L", id, "ML_NOTENOUGH");
        }
        
        case 1: {
            if(cs_get_user_money(id) > 15000) {
                cs_set_user_money(id, cs_get_user_money(id) - 15000);
                
                give_item(id, "weapon_hegrenade");
            }
            else client_print(id, print_chat, "%L", id, "ML_NOTENOUGH");
        }
        
        case 2: {
            if(cs_get_user_money(id) > 5500) {
                cs_set_user_money(id, cs_get_user_money(id) - 5500);
                
                set_user_health(id, get_user_health(id) + 15);
            }
            else client_print(id, print_chat, "%L", id, "ML_NOTENOUGH");
        }
    }
}

Аватар
lantimilan
Извън линия
Foreigner
Foreigner
Мнения: 424
Регистриран на: 29 Ное 2017, 22:49
Се отблагодари: 31 пъти
Получена благодарност: 3 пъти

Knife Shop - Problem

Мнение от lantimilan » 18 Мар 2018, 09:07

Close topic !

Заключено
  • Подобни теми
    Отговори
    Преглеждания
     Последно мнение

Обратно към “Заявки за плъгини”

Кой е на линия

Потребители разглеждащи този форум: 0 регистрирани и 6 госта