Counter-Strike GO
[BG] NOLAG-CS | CS2 Public #1
45.144.155.107:27015
de_dust2
Играчи: 21/26
de_dust2
Counter-Strike 1.6
VIP
Cs-PlovdiV.com - Aim Attack 93.123.16.4:27022 aim_aztec Играчи: 0/16
Counter-Strike 1.6
VIP
93.123.16.4:27022 Cs-PlovdiV.com - Aim Attack aim_aztec 0/16

Преработка на admin models плъгин

В този раздел можете да подавате всякакви заявки за намиране, изработка или преработка на плъгини/модове.
Аватар
bg-bb
Извън линия
Потребител
Потребител
Мнения: 7
Регистриран на: 19 Окт 2021, 19:09
Обратна връзка:

Преработка на admin models плъгин

Мнение от bg-bb » 20 Окт 2021, 13:42

Може ли да се преработи този плъгин да е само за отбора CT и да смени флага на този флаг "e"

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

/*########################################################################## 
## 
## -- www.SteamTools.net 
##      ___   _____       ___  ___   _   __   _            ___  ___   _____   _      
##     /   | |  _  \     /   |/   | | | |  \ | |          /   |/   | |  _  \ | |      
##    / /| | | | | |    / /|   /| | | | |   \| |         / /|   /| | | | | | | |      
##   / / | | | | | |   / / |__/ | | | | | |\   |        / / |__/ | | | | | | | |      
##  / /  | | | |_| |  / /       | | | | | | \  |       / /       | | | |_| | | |___  
## /_/   |_| |_____/ /_/        |_| |_| |_|  \_|      /_/        |_| |_____/ |_____| 
##                                                        
##          |__                   |__  o _|_   ___   __ __  o |__,  ___  
##      --  |__) (__|     (__(__( |  ) |  |_, (__/_ |  )  ) | |  \ (__/_ 
##                  |                                                    
## 
##   Originated as a simple idea back in 2004, it was forgotten due to 
## lack of my 'Small' coding skills. However I have progressed in recent 
## months and somehow crossed that old post with this concept in it. So 
## naturally I challenged myself to see if I could do it, and voila! I 
## could :) 
## 
##   Once you join, you play a normal person for the first round, and for 
## all remaining rounds your CT or TE models are custom. They now read 
## "ADMIN" on front and back, and also have small "A" patches on the arms. 
## I designed these models myself, it's very easy, just bring the textures 
## into photoshop, tweak out, and replace. 
## 
##   Enjoy! 
## 
## 
## CHANGELOG 
##------------------------------------------------------------------------ 
## 2) v1.1.1 - Fixed missing event 
## 1) v1.1.0 - Fixed VIP and other model bugs 
## 
## 
## INSTALLATION 
##------------------------------------------------------------------------ 
## 1) Unzip (which you may have done already) 
## 2) Place 'amx_adminmodel.amxx' in 'cstrike/addons/amxmodx/plugins' 
## 3) Add a line in 'configs/plugins.ini' containing 'amx_adminmodel.amxx' 
## 4) Put the 'admin_ct' and 'admin_te' folders into 'cstrike/models' folder 
## 5) -- Visit www.SteamTools.net and enjoy your new plugin! 
## 
## 
## 
## THE CVARs 
##------------------------------------------------------------------------ 
## 
## No CVARs for this plugin :) 
## 
## 
##########################################################################*/	


#include <amxmodx>
#include <amxmisc>
#include <cstrike>

new bool: g_bSetModel[33];

new const szCommands[][] = {
	"say /models", "say_team /models",
	"say /model", "say_team /model"
}

public plugin_init() {
	register_plugin("AMX Admin Model", "1.1.1", "whitemike")
	register_event("ResetHUD", "resetModel", "b")
	for(new i = 0; i < sizeof(szCommands); i++)
		register_clcmd(szCommands[i], "setModel")
	return PLUGIN_CONTINUE
}

public plugin_precache() {
	precache_model("models/player/admin_ct/admin_ct.mdl")
	precache_model("models/player/admin_te/admin_te.mdl")
	
	return PLUGIN_CONTINUE
}
public client_putinserver(id)
{
g_bSetModel[id] = false;
}
public setModel(id)
{
	if(!(get_user_flags(id) & ADMIN_SLAY))
	{
		client_print(id, print_chat, "[bg-bb] Sorry you don't have access to that command")
		return
	}
	new szName[32]
	get_user_name(id, szName, charsmax(szName))
	
	g_bSetModel[id] = !g_bSetModel[id]
	
	client_print(0, print_chat, "[bg-bb] %s successfully %s his admin model" , szName, g_bSetModel[id] ? "set" : "removed")
}
public resetModel(id, level, cid) {
	if (get_user_flags(id) & ADMIN_SLAY) {
		new CsTeams:userTeam = cs_get_user_team(id)
		if(!g_bSetModel[id]) {
			cs_reset_user_model(id)
		}
		else if (userTeam == CS_TEAM_T && g_bSetModel[id]) {
			cs_set_user_model(id, "admin_te")
		}
		else if(userTeam == CS_TEAM_CT && g_bSetModel[id]) {
			cs_set_user_model(id, "admin_ct")
		}
		else {
			cs_reset_user_model(id)
		}
	}
	
	return PLUGIN_CONTINUE
}

Аватар
zolfeca
Извън линия
Администратор
Администратор
Мнения: 417
Регистриран на: 10 Окт 2016, 23:48
Се отблагодари: 24 пъти
Получена благодарност: 92 пъти

Преработка на admin models плъгин

Мнение от zolfeca » 20 Окт 2021, 13:46

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

/*########################################################################## 
## 
## -- www.SteamTools.net 
##      ___   _____       ___  ___   _   __   _            ___  ___   _____   _      
##     /   | |  _  \     /   |/   | | | |  \ | |          /   |/   | |  _  \ | |      
##    / /| | | | | |    / /|   /| | | | |   \| |         / /|   /| | | | | | | |      
##   / / | | | | | |   / / |__/ | | | | | |\   |        / / |__/ | | | | | | | |      
##  / /  | | | |_| |  / /       | | | | | | \  |       / /       | | | |_| | | |___  
## /_/   |_| |_____/ /_/        |_| |_| |_|  \_|      /_/        |_| |_____/ |_____| 
##                                                        
##          |__                   |__  o _|_   ___   __ __  o |__,  ___  
##      --  |__) (__|     (__(__( |  ) |  |_, (__/_ |  )  ) | |  \ (__/_ 
##                  |                                                    
## 
##   Originated as a simple idea back in 2004, it was forgotten due to 
## lack of my 'Small' coding skills. However I have progressed in recent 
## months and somehow crossed that old post with this concept in it. So 
## naturally I challenged myself to see if I could do it, and voila! I 
## could :) 
## 
##   Once you join, you play a normal person for the first round, and for 
## all remaining rounds your CT or TE models are custom. They now read 
## "ADMIN" on front and back, and also have small "A" patches on the arms. 
## I designed these models myself, it's very easy, just bring the textures 
## into photoshop, tweak out, and replace. 
## 
##   Enjoy! 
## 
## 
## CHANGELOG 
##------------------------------------------------------------------------ 
## 2) v1.1.1 - Fixed missing event 
## 1) v1.1.0 - Fixed VIP and other model bugs 
## 
## 
## INSTALLATION 
##------------------------------------------------------------------------ 
## 1) Unzip (which you may have done already) 
## 2) Place 'amx_adminmodel.amxx' in 'cstrike/addons/amxmodx/plugins' 
## 3) Add a line in 'configs/plugins.ini' containing 'amx_adminmodel.amxx' 
## 4) Put the 'admin_ct' and 'admin_te' folders into 'cstrike/models' folder 
## 5) -- Visit www.SteamTools.net and enjoy your new plugin! 
## 
## 
## 
## THE CVARs 
##------------------------------------------------------------------------ 
## 
## No CVARs for this plugin :) 
## 
## 
##########################################################################*/	


#include <amxmodx>
#include <amxmisc>
#include <cstrike>

new bool: g_bSetModel[33];

new const szCommands[][] = {
	"say /models", "say_team /models",
	"say /model", "say_team /model"
}

public plugin_init() {
	register_plugin("AMX Admin Model", "1.1.1", "whitemike")
	register_event("ResetHUD", "resetModel", "b")
	for(new i = 0; i < sizeof(szCommands); i++)
		register_clcmd(szCommands[i], "setModel")
	return PLUGIN_CONTINUE
}

public plugin_precache() {
	precache_model("models/player/admin_ct/admin_ct.mdl")
	
	return PLUGIN_CONTINUE
}
public client_putinserver(id)
{
g_bSetModel[id] = false;
}
public setModel(id)
{
	if(!(get_user_flags(id) & ADMIN_SLAY))
	{
		client_print(id, print_chat, "[bg-bb] Sorry you don't have access to that command")
		return
	}
	new szName[32]
	get_user_name(id, szName, charsmax(szName))
	
	g_bSetModel[id] = !g_bSetModel[id]
	
	client_print(0, print_chat, "[bg-bb] %s successfully %s his admin model" , szName, g_bSetModel[id] ? "set" : "removed")
}
public resetModel(id, level, cid) {
	if (get_user_flags(id) & ADMIN_SLAY) {
		new CsTeams:userTeam = cs_get_user_team(id)
		if(!g_bSetModel[id]) {
			cs_reset_user_model(id)
		}
		else if(userTeam == CS_TEAM_CT && g_bSetModel[id]) {
			cs_set_user_model(id, "admin_ct")
		}
		else {
			cs_reset_user_model(id)
		}
	}
	
	return PLUGIN_CONTINUE
}

Аватар
bg-bb
Извън линия
Потребител
Потребител
Мнения: 7
Регистриран на: 19 Окт 2021, 19:09
Обратна връзка:

Преработка на admin models плъгин

Мнение от bg-bb » 20 Окт 2021, 14:09

Работи Лок!

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

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

Кой е на линия

Потребители разглеждащи този форум: Google [Bot], Semrush [Bot] и 1 гост