Witam, zwracam się z prośbą czy moglibyście przerobić ten plugin zeby był dostępny tylko na VIPA? na flagę n
https://amxx.pl/topi...alizator-by-me/
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.
|
Napisano 20.01.2020 19:21
Witam, zwracam się z prośbą czy moglibyście przerobić ten plugin zeby był dostępny tylko na VIPA? na flagę n
https://amxx.pl/topi...alizator-by-me/
Napisano 20.01.2020 19:53
Na początku funkcji dodaj warunek
if(!(get_user_flags(id) & tu wpisz nazwę flagi)) return PLUGIN_HANDLED;
Napisano 20.01.2020 20:54
Tutaj?
public plugin_init()
Napisano 20.01.2020 21:32
Pierwsza funkcja zarejestrowana, w tym przypadku to:
public fwTakeDamage(this, idinflictor, idattacker, Float:damage, damagebits)
Wygląda to tak:
public fwTakeDamage(this, idinflictor, idattacker, Float:damage, damagebits) { new username[31]; get_user_name(this, username, 31); if(is_user_alive(idattacker) && get_user_team(idattacker) == 2) {
public fwTakeDamage(this, idinflictor, idattacker, Float:damage, damagebits) { if(!(get_user_flags(id) & tu wpisz nazwę flagi)) return PLUGIN_HANDLED;)) return PLUGIN_HANDLED; new username[31]; get_user_name(this, username, 31); if(is_user_alive(idattacker) && get_user_team(idattacker) == 2) {
Napisano 21.01.2020 16:46
Nie chce się skompilować jak tak wkleiłem.
public fwTakeDamage(this, idinflictor, idattacker, Float:damage, damagebits) { if(!(get_user_flags(id) & ADMIN_LEVEL_B)) return PLUGIN_HANDLED;)) return PLUGIN_HANDLED; new username[31]; get_user_name(this, username, 31); if(is_user_alive(idattacker) && get_user_team(idattacker) == 2) { new wid = get_user_weapon(idattacker); // Id broni if(wid == CSW_KNIFE && !CheckParaliz(this) && is_user_alive(this) && get_user_team(this) == 1) { set_hudmessage(0, 0, 255, 0.0, 0.35, 0, 10.1, 10.1, 0.1, 0.1, 2); show_hudmessage(idattacker, "[Sparalizowales: %s]^n[Masz 10 sekund na przeszukanie go]", username); g_iCzas[this] = 10; set_task(1.0, "Freeze", this, _, _, "a", 10); set_user_maxspeed(this, 0.1); set_user_rendering(this, kRenderFxGlowShell, 0, 0, 255, kRenderGlow, 60) SetParaliz(this); pValue == 1; return HAM_SUPERCEDE } } return HAM_IGNORED; }
Napisano 21.01.2020 18:44
Mój błąd zabrakło index'u oraz jest 2x "return PLUGIN_HANDLED;"
Poprawione i działa
public fwTakeDamage(id, this, idinflictor, idattacker, Float:damage, damagebits) { if(!(get_user_flags(id) & ADMIN_LEVEL_B)) return PLUGIN_HANDLED; new username[31]; get_user_name(this, username, 31); if(is_user_alive(idattacker) && get_user_team(idattacker) == 2) { new wid = get_user_weapon(idattacker); // Id broni if(wid == CSW_KNIFE && !CheckParaliz(this) && is_user_alive(this) && get_user_team(this) == 1) { set_hudmessage(0, 0, 255, 0.0, 0.35, 0, 10.1, 10.1, 0.1, 0.1, 2); show_hudmessage(idattacker, "[Sparalizowales: %s]^n[Masz 10 sekund na przeszukanie go]", username); g_iCzas[this] = 10; set_task(1.0, "Freeze", this, _, _, "a", 10); set_user_maxspeed(this, 0.1); set_user_rendering(this, kRenderFxGlowShell, 0, 0, 255, kRenderGlow, 60) SetParaliz(this); pValue == 1; return HAM_SUPERCEDE } } return HAM_IGNORED; }
0 użytkowników, 0 gości, 0 anonimowych