Skocz do zawartości

Witamy w Nieoficjalnym polskim support'cie AMX Mod X

Witamy w Nieoficjalnym polskim support'cie AMX Mod X, jak w większości społeczności internetowych musisz się zarejestrować aby móc odpowiadać lub zakładać nowe tematy, ale nie bój się to jest prosty proces w którym wymagamy minimalnych informacji.
  • Rozpoczynaj nowe tematy i odpowiedaj na inne
  • Zapisz się do tematów i for, aby otrzymywać automatyczne uaktualnienia
  • Dodawaj wydarzenia do kalendarza społecznościowego
  • Stwórz swój własny profil i zdobywaj nowych znajomych
  • Zdobywaj nowe doświadczenia

Dołączona grafika Dołączona grafika

Guest Message by DevFuse
 

Zdjęcie

Nadanie pluginowi flagi T


  • Nie możesz napisać tematu
  • Zaloguj się, aby dodać odpowiedź
12 odpowiedzi w tym temacie

#1 One ShooT

    Profesjonalista

  • Użytkownik

Reputacja: 16
Początkujący

  • Postów:214
  • Imię:Patryk
  • Lokalizacja:Gdynia
Offline

Napisano 02.02.2023 19:15

Cześć mam pytanie jak zrobić żeby czapki były pod flagą T 

 

gdzie co trzeba dopisać lub zmienić proszę o szybką pomoc

#include <amxmodx>
#include <fakemeta>
#include <ColorChat>

#define PLUG_TAG "Czapki"

new g_HatEnt[33], g_NazwaAktualnej[33][128];
new const sciezka[] = "models/CSB_Czapki01.mdl"

public plugin_init()
{
	register_plugin("Czapki", "0.1", "SgtBane, K!113r");
	register_clcmd("say /czapki", "cmd_czapki");
	register_clcmd("say /hats", "cmd_czapki");
}
public plugin_precache()
{
	precache_model(sciezka);
}
public client_disconnect(id)
{
	Set_Hat(id, 0, id, "Brak");
}
public cmd_czapki(id)
{
	new tytul[128], menu;
	if(!strlen(g_NazwaAktualnej[id]))
	formatex(tytul, 127, "Twoja aktualna czapka to: Brak^n^nWybierz czapke:");
	else
	formatex(tytul, 127, "Twoja aktualna czapka to: \r%s^n^n\yWybierz czapke:", g_NazwaAktualnej[id]);
	menu = menu_create(tytul, "menu_handler");
	menu_additem(menu, "\yBrak");
	menu_additem(menu, "Zaciesz");
	menu_additem(menu, "Wiking");
	menu_additem(menu, "Uszanka");
	menu_display(id, menu);
}
public menu_handler(id, menu, item)
{
	new data[6], iName[64];
	new access, callback;
	menu_item_getinfo(menu, item, access, data,5, iName, 63, callback);
	if(item == MENU_EXIT)
	return PLUGIN_CONTINUE;
	Set_Hat(id, item, id, iName);
	formatex(g_NazwaAktualnej[id], 127, "%s", iName);
	return PLUGIN_CONTINUE;
}
public Set_Hat(player, imodelnum, targeter, const nazwa[])
{
	new name[32];
	get_user_name(player, name, 31);
	if(imodelnum == 0)
	{
		if(g_HatEnt[player] > 0)
		{
			if(pev_valid(g_HatEnt[player]))
			{
				engfunc(EngFunc_RemoveEntity,g_HatEnt[player]);
				g_HatEnt[player] = -1;
			}
		}
		if(targeter != 0)
		ColorChat(targeter, NORMAL, "[^x04%s^x01] Czapka zostala ci usunieta",PLUG_TAG);
	}
	else
	{
		if(g_HatEnt[player] < 1)
		{
			g_HatEnt[player] = engfunc(EngFunc_CreateNamedEntity, engfunc(EngFunc_AllocString, "info_target"));
			if(g_HatEnt[player] > 0)
			{
				set_pev(g_HatEnt[player], pev_movetype, MOVETYPE_FOLLOW);
				set_pev(g_HatEnt[player], pev_aiment, player);
				set_pev(g_HatEnt[player], pev_rendermode, 	kRenderNormal);
				engfunc(EngFunc_SetModel, g_HatEnt[player], sciezka);
				set_pev(g_HatEnt[player], pev_body, imodelnum);
			}
		}
		else
		set_pev(g_HatEnt[player], pev_body, imodelnum);
		if (targeter != 0)
		ColorChat(targeter, NORMAL, "[^x04%s^x01] Ustawiles sobie czapke: ^x04%s",PLUG_TAG,nazwa);
	}
}

  • +
  • -
  • 0

#2 Rivit

    Godlike

  • Support Team

Reputacja: 1 319
Godlike

  • Postów:4 381
Offline

Napisano 02.02.2023 19:47

do cmd_hats dodaj warunek na flage czyli tak:

public cmd_czapki(id)
{
	if(!(get_user_flags(id) & ADMIN_LEVEL_H)) return;
	new tytul[128], menu;

  • +
  • -
  • 1

#3 One ShooT

    Profesjonalista

  • Autor tematu
  • Użytkownik

Reputacja: 16
Początkujący

  • Postów:214
  • Imię:Patryk
  • Lokalizacja:Gdynia
Offline

Napisano 02.02.2023 20:07

 

do cmd_hats dodaj warunek na flage czyli tak:

public cmd_czapki(id)
{
	if(!(get_user_flags(id) & ADMIN_LEVEL_H)) return;
	new tytul[128], menu;

Super działa i czy da się jeszcze dodać ze po wpisaniu /czapki wyskakuje na say wiadomość ze sa dostępne dla vip'a ?


  • +
  • -
  • 0

#4 Rivit

    Godlike

  • Support Team

Reputacja: 1 319
Godlike

  • Postów:4 381
Offline

Napisano 02.02.2023 20:28

public cmd_czapki(id)
{
	if(!(get_user_flags(id) & ADMIN_LEVEL_H)){
		ColorChat(id, NORMAL, "[^x04%s^x01] Tylko dla vipow",PLUG_TAG);
		return;
	}
	new tytul[128], menu;

to cos takiego wtedy


  • +
  • -
  • 1

#5 One ShooT

    Profesjonalista

  • Autor tematu
  • Użytkownik

Reputacja: 16
Początkujący

  • Postów:214
  • Imię:Patryk
  • Lokalizacja:Gdynia
Offline

Napisano 02.02.2023 21:35

I super ;) wszystko dziala ;)


  • +
  • -
  • 0

#6 One ShooT

    Profesjonalista

  • Autor tematu
  • Użytkownik

Reputacja: 16
Początkujący

  • Postów:214
  • Imię:Patryk
  • Lokalizacja:Gdynia
Offline

Napisano 02.02.2023 22:04

Jeszcze problem mam ze ścieżką modeli bo tutaj mamy więcej cazpek kilka usunąłem ale one są dalej mamy po wpisaniu /czapki 5 opcji np. anonymouse a jak założę ją to mamy tv 

 

i próbowałem z innego pliku wziąć ścieżkę modelu ale od razu kompilator wywala mi błędy


  • +
  • -
  • 0

#7 mordoryjacz

    Profesjonalista

  • Użytkownik

Reputacja: 24
Życzliwy

  • Postów:171
Offline

Napisano 02.02.2023 22:07

albo masz zle nazwy czapek albo zle submodele w modelu 


  • +
  • -
  • 0

#8 One ShooT

    Profesjonalista

  • Autor tematu
  • Użytkownik

Reputacja: 16
Początkujący

  • Postów:214
  • Imię:Patryk
  • Lokalizacja:Gdynia
Offline

Napisano 02.02.2023 23:21

w tym mdl są wszystkie czapki dopisane około 10 może 14 ja wziąłem i wybrałem 5 i teraz są nazwy które chciał żeby były ale czapki są inne 

 

CSB_Czapki01.mdl w tym modelu są wszystkie czapki i usuwając z pluginu jakąś na jej miejsce chciałem tą którą zostawiłem ale tylko z menu wyboru czapek się usunęła po założeniu np. anonymouse dalej mamy tv które było na 1 miejscu 


  • +
  • -
  • 0

#9 mordoryjacz

    Profesjonalista

  • Użytkownik

Reputacja: 24
Życzliwy

  • Postów:171
Offline

Napisano 03.02.2023 09:34

to w takim razie zamien nazwy czapek w menu 


  • +
  • -
  • 0

#10 PANDA_2zl

    Guru

  • Power User

Reputacja: 180
Profesjonalista

  • Postów:738
  • Imię:Michał
  • Lokalizacja:Kraków
Offline

Napisano 03.02.2023 10:11

Set_Hat(id, item, id, iName);
Musisz znaleźć która cyfra odpowiada której czapce i taką przesyłać dalej bo tak to ci wysyła nr opcji z menu 0-4
  • +
  • -
  • 0

#11 One ShooT

    Profesjonalista

  • Autor tematu
  • Użytkownik

Reputacja: 16
Początkujący

  • Postów:214
  • Imię:Patryk
  • Lokalizacja:Gdynia
Offline

Napisano 03.02.2023 17:58

No znależć nie problem . 

public menu_handler(id, menu, item)
{
	new data[6], iName[64];
	new access, callback;
	menu_item_getinfo(menu, item, access, data,5, iName, 63, callback);
	if(item == MENU_EXIT)
	return PLUGIN_CONTINUE;
	Set_Hat(id, item, id, iName);
	formatex(g_NazwaAktualnej[id], 127, "%s", iName);
	return PLUGIN_CONTINUE;
}

Bardziej chciałem rozwiązanie na zmianę ścieżki i dodania innej na każdy model niż w jednym pliku wszystkie modele ciężko edytować zmienić czapkę itd.

 

bardziej interesuję mnie zmiana scieżki 

 

Zamiast jednej

new g_HatEnt[33], g_NazwaAktualnej[33][128];
new const sciezka[] = "models/CSB_Czapki01.mdl"

Zrobić 

 

"models/czapki/anonymouse"

"models/czapki/zaciesz"

 

itd. 


  • +
  • -
  • 0

#12 mordoryjacz

    Profesjonalista

  • Użytkownik

Reputacja: 24
Życzliwy

  • Postów:171
Offline

Napisano 03.02.2023 19:16

bardzo nie optymalne jesli plugin ma byc na serwerze jb a jesli chcesz tak bardzo miec kazda czapke w oddzielnym modelu to dekompilowac model musisz 


  • +
  • -
  • 0

#13 One ShooT

    Profesjonalista

  • Autor tematu
  • Użytkownik

Reputacja: 16
Początkujący

  • Postów:214
  • Imię:Patryk
  • Lokalizacja:Gdynia
Offline

Napisano 04.02.2023 08:52

bardzo nie optymalne jesli plugin ma byc na serwerze jb a jesli chcesz tak bardzo miec kazda czapke w oddzielnym modelu to dekompilowac model musisz 

Zmieniłem plik czapek wziąłem z paczki JB i próbuję usunąć czapki na głowę i nadać na flagę je.

 

Ale tak jak 

 

 

do cmd_hats dodaj warunek na flage czyli tak:

public cmd_czapki(id)
{
	if(!(get_user_flags(id) & ADMIN_LEVEL_H)) return;
	new tytul[128], menu;

mi podesłał nie mogę tego znaleźć w pluginie 

 

podeślę sma

#include 
#include
#include
#include

// #define ZP_SUPPORT

#define PREFIX "4Maps"
#define DICTIONARY "cso_like_costumes.txt"

#define MAX_MODELS 4

#if defined ZP_SUPPORT
#include
#include
#endif

new menu[33]
new g_CostumeModelBack[33]
new g_CostumeModelBack2[33]
new g_CostumeModelHead[33]
new g_CostumeModelPelvis[33]
new costume_back[33]
new costume_head[33]
new costume_pelvis[33]
new save_costume_back[33]
new save_costume_head[33]
new save_costume_pelvis[33]

new bool:g_HadCostumeModel[33]

new const CostumeNamesBack[][] =
{
"Orzech",
"Skrzydla Aniola",
"Tunczyk",
"Swiateczna Skarpetka",
"Zegar",
"Diabelskie Skrzydla",
"Zlota Tarcza",
"Duch",
"Panda",
"Widelec",
"Pingwin"
}

new const CostumeNamesHead[][] =
{
"Aureola Aniola",
"Glowa Bazziego",
"Kocie Uszy",
"Glowa Dao",
"Rogi Diabla",
"Zlota Maska",
"Uszy Pandy",
"Uszy Swini",
"Glowa Niedzwiedzia Polarnego",
"Dyniowa Glowa",
"Glowa Balwana",
"Uszy Wiewiorki"
}

new const CostumeNamesPelvis[][] =
{
"Ogon Kota",
"Diabelski Ogon",
"Ogon Pandy",
"Swinski Ogon",
"Ogon Wiewiorki"
}

new const CostumeModels[MAX_MODELS][] =
{
"models/cso_like_costumes/cso_like_costumes_back.mdl",
"models/cso_like_costumes/cso_like_costumes_face.mdl",
"models/cso_like_costumes/cso_like_costumes_head.mdl",
"models/cso_like_costumes/cso_like_costumes_pelvis.mdl"
}

public plugin_init()
{
register_plugin("[CSO LIKE] Costumes", "1.0", "RaZzoR")
register_clcmd("say /czapki", "costumes")

#if defined ZP_SUPPORT
RegisterHam(Ham_Spawn, "player", "Spawn", 1)
#endif

register_dictionary(DICTIONARY)
}

public client_putinserver(id)
{
g_CostumeModelBack[id] = 0
g_CostumeModelBack2[id] = 0
g_CostumeModelHead[id] = 0
g_CostumeModelPelvis[id] = 0

costume_back[id] = 0
costume_head[id] = 0
costume_pelvis[id] = 0
save_costume_back[id] = 0
save_costume_head[id] = 0
save_costume_pelvis[id] = 0

g_HadCostumeModel[id] = false
}

public client_disconnect(id)
{
g_CostumeModelBack[id] = 0
g_CostumeModelBack2[id] = 0
g_CostumeModelHead[id] = 0
g_CostumeModelPelvis[id] = 0

costume_back[id] = 0
costume_head[id] = 0
costume_pelvis[id] = 0
save_costume_back[id] = 0
save_costume_head[id] = 0
save_costume_pelvis[id] = 0

g_HadCostumeModel[id] = false
}

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

#if defined ZP_SUPPORT
public zp_user_infected_post(id)
{
reset_costume(id, 1)
reset_costume(id, 2)
reset_costume(id, 3)
reset_costume(id, 4)

g_HadCostumeModel[id] = false
}

public Spawn(id)
{
set_task(2.0, "load", id)
}

public load(id)
{
if(g_HadCostumeModel[id] || zp_get_user_zombie(id))
return

if(save_costume_back[id] == 1)
{
if(costume_back[id] == 1)
{
reset_costume(id, 1)
reset_costume(id, 4)

make_costume(id, CostumeModels[0], 1, 10)

print_colorchat(id, "!g[%s] !n%L: !g%s", PREFIX, LANG_PLAYER, "CSO_LOADED", CostumeNamesBack[0])

if(costume_back[id] == 1 && costume_head[id] == 12 && costume_pelvis[id] == 5)
{
reset_costume(id, 4)

make_costume(id, CostumeModels[1], 4, 3)
}
}

else if(costume_back[id] == 2)
{
reset_costume(id, 1)
reset_costume(id, 4)

make_costume(id, CostumeModels[0], 1, 0)

print_colorchat(id, "!g[%s] !n%L: !g%s", PREFIX, LANG_PLAYER, "CSO_LOADED", CostumeNamesBack[1])
}

else if(costume_back[id] == 3)
{
reset_costume(id, 1)
reset_costume(id, 4)

make_costume(id, CostumeModels[0], 1, 1)

print_colorchat(id, "!g[%s] !n%L: !g%s", PREFIX, LANG_PLAYER, "CSO_LOADED", CostumeNamesBack[2])

if(costume_back[id] == 3 && costume_head[id] == 3 && costume_pelvis[id] == 1)
{
reset_costume(id, 4)

make_costume(id, CostumeModels[1], 4, 0)
}
}

else if(costume_back[id] == 4)
{
reset_costume(id, 1)
reset_costume(id, 4)

make_costume(id, CostumeModels[0], 1, 9)

print_colorchat(id, "!g[%s] !n%L: !g%s", PREFIX, LANG_PLAYER, "CSO_LOADED", CostumeNamesBack[3])
}

else if(costume_back[id] == 5)
{
reset_costume(id, 1)
reset_costume(id, 4)

make_costume(id, CostumeModels[0], 1, 2)

print_colorchat(id, "!g[%s] !n%L: !g%s", PREFIX, LANG_PLAYER, "CSO_LOADED", CostumeNamesBack[4])
}

else if(costume_back[id] == 6)
{
reset_costume(id, 1)
reset_costume(id, 4)

make_costume(id, CostumeModels[0], 1, 3)

print_colorchat(id, "!g[%s] !n%L: !g%s", PREFIX, LANG_PLAYER, "CSO_LOADED", CostumeNamesBack[5])
}

else if(costume_back[id] == 7)
{
reset_costume(id, 1)
reset_costume(id, 4)

make_costume(id, CostumeModels[0], 1, 4)

print_colorchat(id, "!g[%s] !n%L: !g%s", PREFIX, LANG_PLAYER, "CSO_LOADED", CostumeNamesBack[6])
}

else if(costume_back[id] == 8)
{
reset_costume(id, 1)
reset_costume(id, 4)

make_costume(id, CostumeModels[0], 1, 8)

print_colorchat(id, "!g[%s] !n%L: !g%s", PREFIX, LANG_PLAYER, "CSO_LOADED", CostumeNamesBack[7])
}

else if(costume_back[id] == 9)
{
reset_costume(id, 1)
reset_costume(id, 4)

make_costume(id, CostumeModels[0], 1, 5)

print_colorchat(id, "!g[%s] !n%L: !g%s", PREFIX, LANG_PLAYER, "CSO_LOADED", CostumeNamesBack[8])

if(costume_back[id] == 9 && costume_head[id] == 7 && costume_pelvis[id] == 3)
{
reset_costume(id, 4)

make_costume(id, CostumeModels[1], 4, 1)
}
}

else if(costume_back[id] == 10)
{
reset_costume(id, 1)
reset_costume(id, 4)

make_costume(id, CostumeModels[0], 1, 6)

print_colorchat(id, "!g[%s] !n%L: !g%s", PREFIX, LANG_PLAYER, "CSO_LOADED", CostumeNamesBack[9])

if(costume_back[id] == 10 && costume_head[id] == 8 && costume_pelvis[id] == 4)
{
reset_costume(id, 4)

make_costume(id, CostumeModels[1], 4, 2)
}
}

else if(costume_back[id] == 11)
{
reset_costume(id, 1)
reset_costume(id, 4)

make_costume(id, CostumeModels[0], 1, 7)

print_colorchat(id, "!g[%s] !n%L: !g%s", PREFIX, LANG_PLAYER, "CSO_LOADED", CostumeNamesBack[10])
}
}

if(save_costume_head[id] == 1)
{
if(costume_head[id] == 1)
{
reset_costume(id, 2)
reset_costume(id, 4)

make_costume(id, CostumeModels[2], 2, 0)

print_colorchat(id, "!g[%s] !n%L: !g%s", PREFIX, LANG_PLAYER, "CSO_LOADED", CostumeNamesHead[0])
}

else if(costume_head[id] == 2)
{
reset_costume(id, 2)
reset_costume(id, 4)

make_costume(id, CostumeModels[2], 2, 1)

print_colorchat(id, "!g[%s] !n%L: !g%s", PREFIX, LANG_PLAYER, "CSO_LOADED", CostumeNamesHead[1])
}

else if(costume_head[id] == 3)
{
reset_costume(id, 2)
reset_costume(id, 4)

make_costume(id, CostumeModels[2], 2, 2)

print_colorchat(id, "!g[%s] !n%L: !g%s", PREFIX, LANG_PLAYER, "CSO_LOADED", CostumeNamesHead[2])

if(costume_back[id] == 3 && costume_head[id] == 3 && costume_pelvis[id] == 1)
{
reset_costume(id, 4)

make_costume(id, CostumeModels[1], 4, 0)
}
}

else if(costume_head[id] == 4)
{
reset_costume(id, 2)
reset_costume(id, 4)

make_costume(id, CostumeModels[2], 2, 3)

print_colorchat(id, "!g[%s] !n%L: !g%s", PREFIX, LANG_PLAYER, "CSO_LOADED", CostumeNamesHead[3])
}

else if(costume_head[id] == 5)
{
reset_costume(id, 2)
reset_costume(id, 4)

make_costume(id, CostumeModels[2], 2, 4)

print_colorchat(id, "!g[%s] !n%L: !g%s", PREFIX, LANG_PLAYER, "CSO_LOADED", CostumeNamesHead[4])
}

else if(costume_head[id] == 6)
{
reset_costume(id, 2)
reset_costume(id, 4)

make_costume(id, CostumeModels[2], 2, 5)

print_colorchat(id, "!g[%s] !n%L: !g%s", PREFIX, LANG_PLAYER, "CSO_LOADED", CostumeNamesHead[5])
}

else if(costume_head[id] == 7)
{
reset_costume(id, 2)
reset_costume(id, 4)

make_costume(id, CostumeModels[2], 2, 6)

print_colorchat(id, "!g[%s] !n%L: !g%s", PREFIX, LANG_PLAYER, "CSO_LOADED", CostumeNamesHead[6])

if(costume_back[id] == 9 && costume_head[id] == 7 && costume_pelvis[id] == 3)
{
reset_costume(id, 4)

make_costume(id, CostumeModels[1], 4, 1)
}
}

else if(costume_head[id] == 8)
{
reset_costume(id, 2)
reset_costume(id, 4)

make_costume(id, CostumeModels[2], 2, 7)

print_colorchat(id, "!g[%s] !n%L: !g%s", PREFIX, LANG_PLAYER, "CSO_LOADED", CostumeNamesHead[7])

if(costume_back[id] == 10 && costume_head[id] == 8 && costume_pelvis[id] == 4)
{
reset_costume(id, 4)

make_costume(id, CostumeModels[1], 4, 2)
}
}

else if(costume_head[id] == 9)
{
reset_costume(id, 2)
reset_costume(id, 4)

make_costume(id, CostumeModels[2], 2, 8)

print_colorchat(id, "!g[%s] !n%L: !g%s", PREFIX, LANG_PLAYER, "CSO_LOADED", CostumeNamesHead[8])
}

else if(costume_head[id] == 10)
{
reset_costume(id, 2)
reset_costume(id, 4)

make_costume(id, CostumeModels[2], 2, 9)

print_colorchat(id, "!g[%s] !n%L: !g%s", PREFIX, LANG_PLAYER, "CSO_LOADED", CostumeNamesHead[9])
}

else if(costume_head[id] == 11)
{
reset_costume(id, 2)
reset_costume(id, 4)

make_costume(id, CostumeModels[2], 2, 10)

print_colorchat(id, "!g[%s] !n%L: !g%s", PREFIX, LANG_PLAYER, "CSO_LOADED", CostumeNamesHead[10])
}

else if(costume_head[id] == 12)
{
reset_costume(id, 2)
reset_costume(id, 4)

make_costume(id, CostumeModels[2], 2, 11)

print_colorchat(id, "!g[%s] !n%L: !g%s", PREFIX, LANG_PLAYER, "CSO_LOADED", CostumeNamesHead[11])

if(costume_back[id] == 1 && costume_head[id] == 12 && costume_pelvis[id] == 5)
{
reset_costume(id, 4)

make_costume(id, CostumeModels[1], 4, 3)
}
}
}

if(save_costume_pelvis[id] == 1)
{
if(costume_pelvis[id] == 1)
{
reset_costume(id, 3)
reset_costume(id, 4)

make_costume(id, CostumeModels[3], 3, 0)

print_colorchat(id, "!g[%s] !n%L: !g%s", PREFIX, LANG_PLAYER, "CSO_LOADED", CostumeNamesPelvis[0])

if(costume_back[id] == 3 && costume_head[id] == 3 && costume_pelvis[id] == 1)
{
reset_costume(id, 4)

make_costume(id, CostumeModels[1], 4, 0)
}
}

else if(costume_pelvis[id] == 2)
{
reset_costume(id, 3)
reset_costume(id, 4)

make_costume(id, CostumeModels[3], 3, 1)

print_colorchat(id, "!g[%s] !n%L: !g%s", PREFIX, LANG_PLAYER, "CSO_LOADED", CostumeNamesPelvis[1])
}

else if(costume_pelvis[id] == 3)
{
reset_costume(id, 3)
reset_costume(id, 4)

make_costume(id, CostumeModels[3], 3, 2)

print_colorchat(id, "!g[%s] !n%L: !g%s", PREFIX, LANG_PLAYER, "CSO_LOADED", CostumeNamesPelvis[2])

if(costume_back[id] == 9 && costume_head[id] == 7 && costume_pelvis[id] == 3)
{
reset_costume(id, 4)

make_costume(id, CostumeModels[1], 4, 1)
}
}

else if(costume_pelvis[id] == 4)
{
reset_costume(id, 3)
reset_costume(id, 4)

make_costume(id, CostumeModels[3], 3, 3)

print_colorchat(id, "!g[%s] !n%L: !g%s", PREFIX, LANG_PLAYER, "CSO_LOADED", CostumeNamesPelvis[3])

if(costume_back[id] == 10 && costume_head[id] == 8 && costume_pelvis[id] == 4)
{
reset_costume(id, 4)

make_costume(id, CostumeModels[1], 4, 2)
}
}

else if(costume_pelvis[id] == 5)
{
reset_costume(id, 3)
reset_costume(id, 4)

make_costume(id, CostumeModels[3], 3, 4)

print_colorchat(id, "!g[%s] !n%L: !g%s", PREFIX, LANG_PLAYER, "CSO_LOADED", CostumeNamesPelvis[4])

if(costume_back[id] == 1 && costume_head[id] == 12 && costume_pelvis[id] == 5)
{
reset_costume(id, 4)

make_costume(id, CostumeModels[1], 4, 3)
}
}
}

g_HadCostumeModel[id] = true
}
#endif


public costumes(id)
{
static Letterhead[64]
static MenuName[64]

#if defined ZP_SUPPORT
if(zp_get_user_zombie(id))
{
print_colorchat(id, "!g[%s] !n%L", PREFIX, LANG_PLAYER, "CSO_NO_ZOMBIE")
return
}
#endif

format(Letterhead, 63, "\w%L\r", LANG_PLAYER, "CSO_CHOOSE_CATEGORY")
menu[id] = menu_create(Letterhead, "costumes_handler")

format(MenuName, 63, "\w%L", LANG_PLAYER, "CSO_BACK")
menu_additem(menu[id], MenuName, "1", 0)

format(MenuName, 63, "\w%L", LANG_PLAYER, "CSO_HEAD")
menu_additem(menu[id], MenuName, "2", 0)

format(MenuName, 63, "\w%L^n", LANG_PLAYER, "CSO_PELVIS")
menu_additem(menu[id], MenuName, "3", 0)

format(MenuName, 63, "\w%L", LANG_PLAYER, "CSO_NO_COSTUME")
menu_additem(menu[id], MenuName, "4", 0)

menu_setprop(menu[id], MPROP_EXIT, MEXIT_ALL)
menu_display(id, menu[id], 0)
}

public back_menu(id)
{
static Letterhead[64]
static MenuName[64]

format(Letterhead, 63, "\w%L\r", LANG_PLAYER, "CSO_CHOOSE_COSTUME")
menu[id] = menu_create(Letterhead, "back_handler")

format(MenuName, 63, "\w%s", CostumeNamesBack[0])
menu_additem(menu[id], MenuName, "1", 0)

format(MenuName, 63, "\w%s", CostumeNamesBack[1])
menu_additem(menu[id], MenuName, "2", 0)

format(MenuName, 63, "\w%s", CostumeNamesBack[2])
menu_additem(menu[id], MenuName, "3", 0)

format(MenuName, 63, "\w%s", CostumeNamesBack[3])
menu_additem(menu[id], MenuName, "4", 0)

format(MenuName, 63, "\w%s", CostumeNamesBack[4])
menu_additem(menu[id], MenuName, "5", 0)

format(MenuName, 63, "\w%s", CostumeNamesBack[5])
menu_additem(menu[id], MenuName, "6", 0)

format(MenuName, 63, "\w%s", CostumeNamesBack[6])
menu_additem(menu[id], MenuName, "7", 0)

format(MenuName, 63, "\w%s", CostumeNamesBack[7])
menu_additem(menu[id], MenuName, "8", 0)

format(MenuName, 63, "\w%s", CostumeNamesBack[8])
menu_additem(menu[id], MenuName, "9", 0)

format(MenuName, 63, "\w%s", CostumeNamesBack[9])
menu_additem(menu[id], MenuName, "10", 0)

format(MenuName, 63, "\w%s", CostumeNamesBack[10])
menu_additem(menu[id], MenuName, "11", 0)

menu_setprop(menu[id], MPROP_EXIT, MEXIT_ALL)
menu_display(id, menu[id], 0)
}

public head_menu(id)
{
static Letterhead[64]
static MenuName[64]

format(Letterhead, 63, "\w%L\r", LANG_PLAYER, "CSO_CHOOSE_COSTUME")
menu[id] = menu_create(Letterhead, "head_handler")

format(MenuName, 63, "\w%s", CostumeNamesHead[0])
menu_additem(menu[id], MenuName, "1", 0)

format(MenuName, 63, "\w%s", CostumeNamesHead[1])
menu_additem(menu[id], MenuName, "2", 0)

format(MenuName, 63, "\w%s", CostumeNamesHead[2])
menu_additem(menu[id], MenuName, "3", 0)

format(MenuName, 63, "\w%s", CostumeNamesHead[3])
menu_additem(menu[id], MenuName, "4", 0)

format(MenuName, 63, "\w%s", CostumeNamesHead[4])
menu_additem(menu[id], MenuName, "5", 0)

format(MenuName, 63, "\w%s", CostumeNamesHead[5])
menu_additem(menu[id], MenuName, "6", 0)

format(MenuName, 63, "\w%s", CostumeNamesHead[6])
menu_additem(menu[id], MenuName, "7", 0)

format(MenuName, 63, "\w%s", CostumeNamesHead[7])
menu_additem(menu[id], MenuName, "8", 0)

format(MenuName, 63, "\w%s", CostumeNamesHead[8])
menu_additem(menu[id], MenuName, "9", 0)

format(MenuName, 63, "\w%s", CostumeNamesHead[9])
menu_additem(menu[id], MenuName, "10", 0)

format(MenuName, 63, "\w%s", CostumeNamesHead[10])
menu_additem(menu[id], MenuName, "11", 0)

format(MenuName, 63, "\w%s", CostumeNamesHead[11])
menu_additem(menu[id], MenuName, "12", 0)

menu_setprop(menu[id], MPROP_EXIT, MEXIT_ALL)
menu_display(id, menu[id], 0)
}

public pelvis_menu(id)
{
static Letterhead[64]
static MenuName[64]

format(Letterhead, 63, "\w%L\r", LANG_PLAYER, "CSO_CHOOSE_COSTUME")
menu[id] = menu_create(Letterhead, "pelvis_handler")

format(MenuName, 63, "\w%s", CostumeNamesPelvis[0])
menu_additem(menu[id], MenuName, "1", 0)

format(MenuName, 63, "\w%s", CostumeNamesPelvis[1])
menu_additem(menu[id], MenuName, "2", 0)

format(MenuName, 63, "\w%s", CostumeNamesPelvis[2])
menu_additem(menu[id], MenuName, "3", 0)

format(MenuName, 63, "\w%s", CostumeNamesPelvis[3])
menu_additem(menu[id], MenuName, "4", 0)

format(MenuName, 63, "\w%s", CostumeNamesPelvis[4])
menu_additem(menu[id], MenuName, "5", 0)

menu_setprop(menu[id], MPROP_EXIT, MEXIT_ALL)
menu_display(id, menu[id], 0)
}

public costumes_handler(id, menu, item)
{
if(item == MENU_EXIT)
{
menu_destroy(menu)
return PLUGIN_HANDLED
}

new data[6], iName[64]
new access, callback

menu_item_getinfo(menu, item, access, data, 6, iName, 63, callback)

new key = str_to_num(data)

if(key == 1)
{
back_menu(id)
}

if(key == 2)
{
head_menu(id)
}

if(key == 3)
{
pelvis_menu(id)
}

if(key == 4)
{
if(!g_HadCostumeModel[id])
{
print_colorchat(id, "!g[%s] !n%L", PREFIX, LANG_PLAYER, "CSO_NF_COSTUME")
}

else
{
reset_costume(id, 1)
reset_costume(id, 2)
reset_costume(id, 3)
reset_costume(id, 4)

print_colorchat(id, "!g[%s] !n%L", PREFIX, LANG_PLAYER, "CSO_REMOVED")

g_HadCostumeModel[id] = false

costume_back[id] = 0
costume_head[id] = 0
costume_pelvis[id] = 0
save_costume_back[id] = 0
save_costume_head[id] = 0
save_costume_pelvis[id] = 0
}
}

menu_destroy(menu)
return PLUGIN_HANDLED
}

public back_handler(id, menu, item)
{
if(item == MENU_EXIT)
{
menu_destroy(menu)
return PLUGIN_HANDLED
}

new data[6], iName[64]
new access, callback
menu_item_getinfo(menu, item, access, data, 6, iName, 63, callback)

new key = str_to_num(data)

if(key == 1)
{
reset_costume(id, 1)
reset_costume(id, 4)

make_costume(id, CostumeModels[0], 1, 10)

print_colorchat(id, "!g[%s] !n%L: !g%s", PREFIX, LANG_PLAYER, "CSO_CHOOSED", CostumeNamesBack[0])

g_HadCostumeModel[id] = true

costume_back[id] = 1

if(costume_back[id] == 1 && costume_head[id] == 12 && costume_pelvis[id] == 5)
{
reset_costume(id, 4)

make_costume(id, CostumeModels[1], 4, 3)
}

save_costume_back[id] = 1
}

if(key == 2)
{
reset_costume(id, 1)
reset_costume(id, 4)

make_costume(id, CostumeModels[0], 1, 0)

print_colorchat(id, "!g[%s] !n%L: !g%s", PREFIX, LANG_PLAYER, "CSO_CHOOSED", CostumeNamesBack[1])

g_HadCostumeModel[id] = true

costume_back[id] = 2

save_costume_back[id] = 1
}

if(key == 3)
{
reset_costume(id, 1)
reset_costume(id, 4)

make_costume(id, CostumeModels[0], 1, 1)

print_colorchat(id, "!g[%s] !n%L: !g%s", PREFIX, LANG_PLAYER, "CSO_CHOOSED", CostumeNamesBack[2])

g_HadCostumeModel[id] = true

costume_back[id] = 3

if(costume_back[id] == 3 && costume_head[id] == 3 && costume_pelvis[id] == 1)
{
reset_costume(id, 4)

make_costume(id, CostumeModels[1], 4, 0)
}

save_costume_back[id] = 1
}

if(key == 4)
{
reset_costume(id, 1)
reset_costume(id, 4)

make_costume(id, CostumeModels[0], 1, 9)

print_colorchat(id, "!g[%s] !n%L: !g%s", PREFIX, LANG_PLAYER, "CSO_CHOOSED", CostumeNamesBack[3])

g_HadCostumeModel[id] = true

costume_back[id] = 4

save_costume_back[id] = 1
}

if(key == 5)
{
reset_costume(id, 1)
reset_costume(id, 4)

make_costume(id, CostumeModels[0], 1, 2)

print_colorchat(id, "!g[%s] !n%L: !g%s", PREFIX, LANG_PLAYER, "CSO_CHOOSED", CostumeNamesBack[4])

g_HadCostumeModel[id] = true

costume_back[id] = 5

save_costume_back[id] = 1
}

if(key == 6)
{
reset_costume(id, 1)
reset_costume(id, 4)

make_costume(id, CostumeModels[0], 1, 3)

print_colorchat(id, "!g[%s] !n%L: !g%s", PREFIX, LANG_PLAYER, "CSO_CHOOSED", CostumeNamesBack[5])

costume_back[id] = 6

save_costume_back[id] = 1
}

if(key == 7)
{
reset_costume(id, 1)
reset_costume(id, 4)

make_costume(id, CostumeModels[0], 1, 4)

print_colorchat(id, "!g[%s] !n%L: !g%s", PREFIX, LANG_PLAYER, "CSO_CHOOSED", CostumeNamesBack[6])

g_HadCostumeModel[id] = true

costume_back[id] = 7

save_costume_back[id] = 1
}

if(key == 8)
{
reset_costume(id, 1)
reset_costume(id, 4)

make_costume(id, CostumeModels[0], 1, 8)

print_colorchat(id, "!g[%s] !n%L: !g%s", PREFIX, LANG_PLAYER, "CSO_CHOOSED", CostumeNamesBack[7])

g_HadCostumeModel[id] = true

costume_back[id] = 8

save_costume_back[id] = 1
}

if(key == 9)
{
reset_costume(id, 1)
reset_costume(id, 4)

make_costume(id, CostumeModels[0], 1, 5)

print_colorchat(id, "!g[%s] !n%L: !g%s", PREFIX, LANG_PLAYER, "CSO_CHOOSED", CostumeNamesBack[8])

g_HadCostumeModel[id] = true

costume_back[id] = 9

if(costume_back[id] == 9 && costume_head[id] == 7 && costume_pelvis[id] == 3)
{
reset_costume(id, 4)

make_costume(id, CostumeModels[1], 4, 1)
}

save_costume_back[id] = 1
}

if(key == 10)
{
reset_costume(id, 1)
reset_costume(id, 4)

make_costume(id, CostumeModels[0], 1, 6)

print_colorchat(id, "!g[%s] !n%L: !g%s", PREFIX, LANG_PLAYER, "CSO_CHOOSED", CostumeNamesBack[9])

g_HadCostumeModel[id] = true

costume_back[id] = 10

if(costume_back[id] == 10 && costume_head[id] == 8 && costume_pelvis[id] == 4)
{
reset_costume(id, 4)

make_costume(id, CostumeModels[1], 4, 2)
}

save_costume_back[id] = 1
}

if(key == 11)
{
reset_costume(id, 1)
reset_costume(id, 4)

make_costume(id, CostumeModels[0], 1, 7)

print_colorchat(id, "!g[%s] !n%L: !g%s", PREFIX, LANG_PLAYER, "CSO_CHOOSED", CostumeNamesBack[10])

g_HadCostumeModel[id] = true

costume_back[id] = 11

save_costume_back[id] = 1
}

menu_destroy(menu)
return PLUGIN_HANDLED
}

public head_handler(id, menu, item)
{
if(item == MENU_EXIT)
{
menu_destroy(menu)
return PLUGIN_HANDLED
}

new data[6], iName[64]
new access, callback
menu_item_getinfo(menu, item, access, data, 6, iName, 63, callback)

new key = str_to_num(data)

if(key == 1)
{
reset_costume(id, 2)
reset_costume(id, 4)

make_costume(id, CostumeModels[2], 2, 0)

print_colorchat(id, "!g[%s] !n%L: !g%s", PREFIX, LANG_PLAYER, "CSO_CHOOSED", CostumeNamesHead[0])

g_HadCostumeModel[id] = true

costume_head[id] = 1

save_costume_head[id] = 1
}

if(key == 2)
{
reset_costume(id, 2)
reset_costume(id, 4)

make_costume(id, CostumeModels[2], 2, 1)

print_colorchat(id, "!g[%s] !n%L: !g%s", PREFIX, LANG_PLAYER, "CSO_CHOOSED", CostumeNamesHead[1])

g_HadCostumeModel[id] = true

costume_head[id] = 2

save_costume_head[id] = 1
}

if(key == 3)
{
reset_costume(id, 2)
reset_costume(id, 4)

make_costume(id, CostumeModels[2], 2, 2)

print_colorchat(id, "!g[%s] !n%L: !g%s", PREFIX, LANG_PLAYER, "CSO_CHOOSED", CostumeNamesHead[2])

g_HadCostumeModel[id] = true

costume_head[id] = 3

if(costume_back[id] == 3 && costume_head[id] == 3 && costume_pelvis[id] == 1)
{
reset_costume(id, 4)

make_costume(id, CostumeModels[1], 4, 0)
}

save_costume_head[id] = 1
}

if(key == 4)
{
reset_costume(id, 2)
reset_costume(id, 4)

make_costume(id, CostumeModels[2], 2, 3)

print_colorchat(id, "!g[%s] !n%L: !g%s", PREFIX, LANG_PLAYER, "CSO_CHOOSED", CostumeNamesHead[3])

g_HadCostumeModel[id] = true

costume_head[id] = 4

save_costume_head[id] = 1
}

if(key == 5)
{
reset_costume(id, 2)
reset_costume(id, 4)

make_costume(id, CostumeModels[2], 2, 4)

print_colorchat(id, "!g[%s] !n%L: !g%s", PREFIX, LANG_PLAYER, "CSO_CHOOSED", CostumeNamesHead[4])

g_HadCostumeModel[id] = true

costume_head[id] = 5

save_costume_head[id] = 1
}

if(key == 6)
{
reset_costume(id, 2)
reset_costume(id, 4)

make_costume(id, CostumeModels[2], 2, 5)

print_colorchat(id, "!g[%s] !n%L: !g%s", PREFIX, LANG_PLAYER, "CSO_CHOOSED", CostumeNamesHead[5])

g_HadCostumeModel[id] = true

costume_head[id] = 6

save_costume_head[id] = 1
}

if(key == 7)
{
reset_costume(id, 2)
reset_costume(id, 4)

make_costume(id, CostumeModels[2], 2, 6)

print_colorchat(id, "!g[%s] !n%L: !g%s", PREFIX, LANG_PLAYER, "CSO_CHOOSED", CostumeNamesHead[6])

g_HadCostumeModel[id] = true

costume_head[id] = 7

if(costume_back[id] == 9 && costume_head[id] == 7 && costume_pelvis[id] == 3)
{
reset_costume(id, 4)

make_costume(id, CostumeModels[1], 4, 1)
}

save_costume_head[id] = 1
}

if(key == 8)
{
reset_costume(id, 2)
reset_costume(id, 4)

make_costume(id, CostumeModels[2], 2, 7)

print_colorchat(id, "!g[%s] !n%L: !g%s", PREFIX, LANG_PLAYER, "CSO_CHOOSED", CostumeNamesHead[7])

g_HadCostumeModel[id] = true

costume_head[id] = 8

if(costume_back[id] == 10 && costume_head[id] == 8 && costume_pelvis[id] == 4)
{
reset_costume(id, 4)

make_costume(id, CostumeModels[1], 4, 2)
}

save_costume_head[id] = 1
}

if(key == 9)
{
reset_costume(id, 2)
reset_costume(id, 4)

make_costume(id, CostumeModels[2], 2, 8)

print_colorchat(id, "!g[%s] !n%L: !g%s", PREFIX, LANG_PLAYER, "CSO_CHOOSED", CostumeNamesHead[8])

g_HadCostumeModel[id] = true

costume_head[id] = 9

save_costume_head[id] = 1
}

if(key == 10)
{
reset_costume(id, 2)
reset_costume(id, 4)

make_costume(id, CostumeModels[2], 2, 9)

print_colorchat(id, "!g[%s] !n%L: !g%s", PREFIX, LANG_PLAYER, "CSO_CHOOSED", CostumeNamesHead[9])

g_HadCostumeModel[id] = true

costume_head[id] = 10

save_costume_head[id] = 1
}

if(key == 11)
{
reset_costume(id, 2)
reset_costume(id, 4)

make_costume(id, CostumeModels[2], 2, 10)

print_colorchat(id, "!g[%s] !n%L: !g%s", PREFIX, LANG_PLAYER, "CSO_CHOOSED", CostumeNamesHead[10])

g_HadCostumeModel[id] = true

costume_head[id] = 11

save_costume_head[id] = 1
}

if(key == 12)
{
reset_costume(id, 2)
reset_costume(id, 4)

make_costume(id, CostumeModels[2], 2, 11)

print_colorchat(id, "!g[%s] !n%L: !g%s", PREFIX, LANG_PLAYER, "CSO_CHOOSED", CostumeNamesHead[11])

g_HadCostumeModel[id] = true

costume_head[id] = 12

if(costume_back[id] == 1 && costume_head[id] == 12 && costume_pelvis[id] == 5)
{
reset_costume(id, 4)

make_costume(id, CostumeModels[1], 4, 3)
}

save_costume_head[id] = 1
}

menu_destroy(menu)
return PLUGIN_HANDLED
}

public pelvis_handler(id, menu, item)
{
if(item == MENU_EXIT)
{
menu_destroy(menu)
return PLUGIN_HANDLED
}

new data[6], iName[64]
new access, callback
menu_item_getinfo(menu, item, access, data, 6, iName, 63, callback)

new key = str_to_num(data)

if(key == 1)
{
reset_costume(id, 3)
reset_costume(id, 4)

make_costume(id, CostumeModels[3], 3, 0)

print_colorchat(id, "!g[%s] !n%L: !g%s", PREFIX, LANG_PLAYER, "CSO_CHOOSED", CostumeNamesPelvis[0])

g_HadCostumeModel[id] = true

costume_pelvis[id] = 1

if(costume_back[id] == 3 && costume_head[id] == 3 && costume_pelvis[id] == 1)
{
reset_costume(id, 4)

make_costume(id, CostumeModels[1], 4, 0)
}

save_costume_pelvis[id] = 1
}

if(key == 2)
{
reset_costume(id, 3)
reset_costume(id, 4)

make_costume(id, CostumeModels[3], 3, 1)

print_colorchat(id, "!g[%s] !n%L: !g%s", PREFIX, LANG_PLAYER, "CSO_CHOOSED", CostumeNamesPelvis[1])

g_HadCostumeModel[id] = true

costume_pelvis[id] = 2

save_costume_pelvis[id] = 1
}

if(key == 3)
{
reset_costume(id, 3)
reset_costume(id, 4)

make_costume(id, CostumeModels[3], 3, 2)

print_colorchat(id, "!g[%s] !n%L: !g%s", PREFIX, LANG_PLAYER, "CSO_CHOOSED", CostumeNamesPelvis[2])

g_HadCostumeModel[id] = true

costume_pelvis[id] = 3

if(costume_back[id] == 9 && costume_head[id] == 7 && costume_pelvis[id] == 3)
{
reset_costume(id, 4)

make_costume(id, CostumeModels[1], 4, 1)
}

save_costume_pelvis[id] = 1
}

if(key == 4)
{
reset_costume(id, 3)
reset_costume(id, 4)

make_costume(id, CostumeModels[3], 3, 3)

print_colorchat(id, "!g[%s] !n%L: !g%s", PREFIX, LANG_PLAYER, "CSO_CHOOSED", CostumeNamesPelvis[3])

g_HadCostumeModel[id] = true

costume_pelvis[id] = 4

if(costume_back[id] == 10 && costume_head[id] == 8 && costume_pelvis[id] == 4)
{
reset_costume(id, 4)

make_costume(id, CostumeModels[1], 4, 2)
}

save_costume_pelvis[id] = 1
}

if(key == 5)
{
reset_costume(id, 3)
reset_costume(id, 4)

make_costume(id, CostumeModels[3], 3, 4)

print_colorchat(id, "!g[%s] !n%L: !g%s", PREFIX, LANG_PLAYER, "CSO_CHOOSED", CostumeNamesPelvis[4])

g_HadCostumeModel[id] = true

costume_pelvis[id] = 5

if(costume_back[id] == 1 && costume_head[id] == 12 && costume_pelvis[id] == 5)
{
reset_costume(id, 4)

make_costume(id, CostumeModels[1], 4, 3)
}

save_costume_pelvis[id] = 1
}

menu_destroy(menu)
return PLUGIN_HANDLED
}

public make_costume(id, model[], part, anim)
{
switch(part)
{
case 1:
{
g_CostumeModelBack[id] = engfunc(EngFunc_CreateNamedEntity, engfunc(EngFunc_AllocString, "info_target"))

set_pev(g_CostumeModelBack[id], pev_movetype, MOVETYPE_FOLLOW)
set_pev(g_CostumeModelBack[id], pev_aiment, id)
set_pev(g_CostumeModelBack[id], pev_rendermode, kRenderNormal)
engfunc(EngFunc_SetModel, g_CostumeModelBack[id], model)
set_pev(g_CostumeModelBack[id], pev_body, anim)
set_pev(g_CostumeModelBack[id], pev_sequence, anim)
set_pev(g_CostumeModelBack[id], pev_animtime, get_gametime())
set_pev(g_CostumeModelBack[id], pev_framerate, 1.0)
}

case 2:
{
g_CostumeModelHead[id] = engfunc(EngFunc_CreateNamedEntity, engfunc(EngFunc_AllocString, "info_target"))

set_pev(g_CostumeModelHead[id], pev_movetype, MOVETYPE_FOLLOW)
set_pev(g_CostumeModelHead[id], pev_aiment, id)
set_pev(g_CostumeModelHead[id], pev_rendermode, kRenderNormal)
engfunc(EngFunc_SetModel, g_CostumeModelHead[id], model)
set_pev(g_CostumeModelHead[id], pev_body, anim)
set_pev(g_CostumeModelHead[id], pev_sequence, anim)
set_pev(g_CostumeModelHead[id], pev_animtime, get_gametime())
set_pev(g_CostumeModelHead[id], pev_framerate, 1.0)
}

case 3:
{
g_CostumeModelPelvis[id] = engfunc(EngFunc_CreateNamedEntity, engfunc(EngFunc_AllocString, "info_target"))

set_pev(g_CostumeModelPelvis[id], pev_movetype, MOVETYPE_FOLLOW)
set_pev(g_CostumeModelPelvis[id], pev_aiment, id)
set_pev(g_CostumeModelPelvis[id], pev_rendermode, kRenderNormal)
engfunc(EngFunc_SetModel, g_CostumeModelPelvis[id], model)
set_pev(g_CostumeModelPelvis[id], pev_body, anim)
set_pev(g_CostumeModelPelvis[id], pev_sequence, anim)
set_pev(g_CostumeModelPelvis[id], pev_animtime, get_gametime())
set_pev(g_CostumeModelPelvis[id], pev_framerate, 1.0)
}

case 4:
{
g_CostumeModelBack2[id] = engfunc(EngFunc_CreateNamedEntity, engfunc(EngFunc_AllocString, "info_target"))

set_pev(g_CostumeModelBack2[id], pev_movetype, MOVETYPE_FOLLOW)
set_pev(g_CostumeModelBack2[id], pev_aiment, id)
set_pev(g_CostumeModelBack2[id], pev_rendermode, kRenderNormal)
engfunc(EngFunc_SetModel, g_CostumeModelBack2[id], model)
set_pev(g_CostumeModelBack2[id], pev_body, anim)
set_pev(g_CostumeModelBack2[id], pev_sequence, anim)
set_pev(g_CostumeModelBack2[id], pev_animtime, get_gametime())
set_pev(g_CostumeModelBack2[id], pev_framerate, 1.0)
}
}
}

public reset_costume(id, number)
{
switch(number)
{
case 1:
{
fm_set_entity_visibility(g_CostumeModelBack[id], 0)
g_CostumeModelBack[id] = 0
}

case 2:
{
fm_set_entity_visibility(g_CostumeModelHead[id], 0)
g_CostumeModelHead[id] = 0
}

case 3:
{
fm_set_entity_visibility(g_CostumeModelPelvis[id], 0)
g_CostumeModelPelvis[id] = 0
}

case 4:
{
fm_set_entity_visibility(g_CostumeModelBack2[id], 0)
g_CostumeModelBack2[id] = 0
}
}
}

//Stock
stock print_colorchat(id, String[], any:...)
{
new SzMsg[192]
vformat(SzMsg, charsmax(SzMsg), String, 3)

replace_all(SzMsg, charsmax(SzMsg), "!n", "^1")
replace_all(SzMsg, charsmax(SzMsg), "!t", "^3")
replace_all(SzMsg, charsmax(SzMsg), "!g", "^4")

static msgSayText = 0
static fake_user

if(!msgSayText)
{
msgSayText = get_user_msgid("SayText")
fake_user = get_maxplayers() + 1
}

message_begin(id ? MSG_ONE_UNRELIABLE : MSG_BROADCAST, msgSayText, _, id)
write_byte(id ? id : fake_user)
write_string(SzMsg)
message_end()
}


  • +
  • -
  • 0




Użytkownicy przeglądający ten temat: 0

0 użytkowników, 0 gości, 0 anonimowych