←  Prośby o modyfikacje silników/klas/perków

AMXX.pl: Support AMX Mod X i SourceMod

»

CoD Nowy
Przerobienie klasy na Premium

  • +
  • -
Jednorozus - zdjęcie Jednorozus 17.12.2011

Witam, czy mógłby mi ktoś przerobić tą klasę na flagę ADMIN_LEVEL_H ?


#include <amxmodx>
#include <amxmisc>
#include <codmod>
#include <cstrike>
#define PLUGIN "Kameleon"
#define VERSION "1.0"
#define AUTHOR "CheQ"
new const nazwa[] = "Kameleon";
new const opis[] = "z M4 jest ubany na Ct a z AK47 na Terro";
new const bronie = 1<<CSW_M4A1 | 1<<CSW_AK47 ;
new const zdrowie = 95;
new const kondycja = 2;
new const inteligencja = 0;
new const wytrzymalosc = 0;
new Ubrania_CT[4][]={"sas","gsg9","urban","gign"};
new Ubrania_Terro[4][]={"arctic","leet","guerilla","terror"};
new bool:ma_klase[33];
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
cod_register_class(nazwa, opis, bronie, zdrowie, kondycja, inteligencja, wytrzymalosc);
register_event("CurWeapon","CurWeapon","be", "1=1");
}
public cod_class_enabled(id)
ma_klase[id] = true;
public cod_class_disabled(id)
ma_klase[id] = false;
public CurWeapon(id)
{
new weapon = read_data(2);
new num = random_num(0,3);
if(ma_klase[id] && weapon == CSW_M4A1)
{
cs_set_user_model(id, Ubrania_CT[num]);
}
if(ma_klase[id] && weapon == CSW_AK47)
{
cs_set_user_model(id, Ubrania_Terro[num]);
}
return PLUGIN_CONTINUE;
}

Za przerobienie dam +
Użytkownik Jednorozus edytował ten post 17.12.2011 17:43
Odpowiedz

  • +
  • -
Raen - zdjęcie Raen 17.12.2011

To jest perk nie klasa....
Odpowiedz

  • +
  • -
Jednorozus - zdjęcie Jednorozus 17.12.2011

Sory, zły kod, poprawiłem. Proszę o przerobienie.
Odpowiedz

  • +
  • -
radim - zdjęcie radim 17.12.2011

Flaga "t"
#include <amxmodx>
#include <amxmisc>
#include <codmod>
#include <colorchat>
#include <cstrike>

#define PLUGIN "Kameleon"
#define VERSION "1.0"
#define AUTHOR "CheQ"

new const nazwa[] = "Kameleon";
new const opis[] = "z M4 jest ubany na Ct a z AK47 na Terro";
new const bronie = 1<<CSW_M4A1 | 1<<CSW_AK47 ;
new const zdrowie = 95;
new const kondycja = 2;
new const inteligencja = 0;
new const wytrzymalosc = 0;

new Ubrania_CT[4][]={"sas","gsg9","urban","gign"};
new Ubrania_Terro[4][]={"arctic","leet","guerilla","terror"};

new bool:ma_klase[33];

public plugin_init() {
	register_plugin(PLUGIN, VERSION, AUTHOR)
	cod_register_class(nazwa, opis, bronie, zdrowie, kondycja, inteligencja, wytrzymalosc);
	register_event("CurWeapon","CurWeapon","be", "1=1");
}
public cod_class_enabled(id)
{
	if(!(get_user_flags(id) && ADMIN_LEVEL_H))
	{
		ColorChat(id, GREEN, "[%s] Nie masz uprawnien aby korzystac z tej klasy", nazwa);
		return COD_STOP;
	}
	ma_klase[id] = true;
	
	return COD_CONTINUE;
}
public cod_class_disabled(id)
{
	ma_klase[id] = false;
}

public CurWeapon(id)
{
	new weapon = read_data(2);
	new num = random_num(0,3);
	if(ma_klase[id] && weapon == CSW_M4A1)
	{
		cs_set_user_model(id, Ubrania_CT[num]);
	}
	if(ma_klase[id] && weapon == CSW_AK47)
	{
		cs_set_user_model(id, Ubrania_Terro[num]);
	}
	return PLUGIN_CONTINUE;
}

Użytkownik radim edytował ten post 17.12.2011 17:52
Odpowiedz