how to fix this plugin that i made - VIP Models it doesn't work

В този раздел можете да подавате всякакви заявки за намиране, изработка или преработка на плъгини/модове.
Аватар
Nuhannad
Извън линия
Foreigner
Foreigner
Мнения: 2
Регистриран на: 06 Апр 2019, 11:19

how to fix this plugin that i made - VIP Models it doesn't work

Мнение от Nuhannad » 13 Апр 2019, 11:38

when i join server there is menu but when i press on model its not change

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

#include <amxmodx>
#include <amxmisc>
#include <colorchat>
#include <cstrike>
#include <fun>
#include <engine>

#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "Nuhannad"

new const g_VipPlayerModels[][] =
{
	"models/Player/Predator/Predatorct.mdl",  
	"models/Player/heavybear/heavybeart.mdl",
	"models/Player/cross/SJB-GR.mdl",
	"models/Player/halo 2/haloct.mdl",
	"models/Player/Predator/Predatort.mdl",  
	"models/Player/heavybear/heavybearct.mdl",
	"models/Player/cross/SJB-BL.mdl",
	"models/Player/halo 2/halot.mdl"	

};

public plugin_init() {
	register_plugin(PLUGIN, VERSION, AUTHOR)
	register_clcmd("say /vskins", "vipmenuShow")
}

public plugin_precache() {  
	
	for ( new i = 0 ; i < sizeof( g_VipPlayerModels ) ; i++ )
		precache_model( g_VipPlayerModels[ i ] );
}

public vipmenuShow(id, item)	
{
        if (get_user_flags(id) & ADMIN_IMMUNITY)
        {
	new menu = menu_create( "\r[\dVIP\r]Skins \wMenu", "VipPlayerMenu_Handler"); 	
	menu_additem(menu, "\rPredator", "1", 0)	
	menu_additem(menu, "\rHeavy \dBear", "2", 0)
	menu_additem(menu, "\rcross \dfire", "3", 0)
	menu_additem(menu, "\rhalo", "4", 0);
	
	menu_setprop(menu, MPROP_EXIT, MEXIT_ALL );
	menu_display(id, menu, 0 );
	
	}
	else
	{
             ColorChat(0,NORMAL,"^4These Skins ^3is ^1only ^3For ^4VIP's.")
	}

	return PLUGIN_CONTINUE;
}


public VipPlayerMenu_Handler(id, menu, item)
{
	if(item == MENU_EXIT)
	{
		menu_destroy(menu)
		return PLUGIN_HANDLED
	}
	new data[4];
	new key = str_to_num(data)
	switch( key ) {
		case 1: {
			if( cs_get_user_team(id) != CS_TEAM_CT )
			{
				cs_set_user_model( id, "Predatorct" );
			}
			else if ( cs_get_user_team(id) != CS_TEAM_T )
			{
				cs_set_user_model( id, "Predatort" );
			}

			}
		case 2: {
			if( cs_get_user_team(id) != CS_TEAM_CT )
			{
				cs_set_user_model( id, "heavybearct" );
			}
			else if ( cs_get_user_team(id) != CS_TEAM_T )
			{
				cs_set_user_model( id, "heavybeart" );
			}
			
			}
		case 3: {
			if( cs_get_user_team(id) != CS_TEAM_CT )
			{
				cs_set_user_model( id, "SJB-GR" );
			}
			else if ( cs_get_user_team(id) != CS_TEAM_T )
			{
				cs_set_user_model( id, "SJB-BL" );
			}

			}
		case 4: {
			if( cs_get_user_team(id) != CS_TEAM_CT )
			{
				cs_set_user_model( id, "haloct" );
			}
			else if ( cs_get_user_team(id) != CS_TEAM_T )
			{
				cs_set_user_model( id, "halot" );
			}

			}
		}
	return PLUGIN_HANDLED;
}
Последно промяна от Nuhannad на 13 Апр 2019, 12:44, променено общо 3 пъти.

Аватар
illusion
Извън линия
Developer
Developer
Мнения: 1796
Регистриран на: 27 Ное 2016, 17:47
Местоположение: CraftVision
Се отблагодари: 151 пъти
Получена благодарност: 358 пъти
Обратна връзка:

какъв е проблемът тук?

Мнение от illusion » 13 Апр 2019, 12:08

Оправи си заглавието и следващият път слагай source кодовете в code BBCode-a.
/ Fix your title and the next time use the code bbcode for "SMA" files. /

BTW - Write in english.

Аватар
Nuhannad
Извън линия
Foreigner
Foreigner
Мнения: 2
Регистриран на: 06 Апр 2019, 11:19

какъв е проблемът тук?

Мнение от Nuhannad » 13 Апр 2019, 12:30

МНЕНИЕТО Е СКРИТО ОТ СТРАНА НА МОДЕРАТОР! ЦЪКНИ ВЪРХУ ЛЕНТАТА ЗА ДА ГО ПРЕГЛЕДАШ.
Последно промяна от illusion на 13 Апр 2019, 12:52, променено общо 1 път.
Причина: Don't use the Google Translate, we can't understand anything..

Аватар
illusion
Извън линия
Developer
Developer
Мнения: 1796
Регистриран на: 27 Ное 2016, 17:47
Местоположение: CraftVision
Се отблагодари: 151 пъти
Получена благодарност: 358 пъти
Обратна връзка:

how to fix this plugin that i made - VIP Models it doesn't work

Мнение от illusion » 13 Апр 2019, 12:55


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

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

Кой е на линия

Потребители разглеждащи този форум: Bing [Bot] и 15 госта