Jump to content


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

Posted Image Posted Image

Guest Message by DevFuse
 

byCZUS's Photo

byCZUS

Rejestracja: 03.01.2009
Aktualnie: Nieaktywny
Poza forum Ostatnio: 15.06.2020 22:52
*****

#156134 Po zgonie jest respawn

Posted by byCZUS on 31.07.2010 02:33

@Up nie pisz że plugin jest twój...

Zobacz sobie to:

/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <hamsandwich>

public plugin_init() {
register_plugin("asdasd", "1.0", "Me?");
register_event("DeathMsg", "ded", "a");
}

public ded()
{
new killer = read_data(1);
new victim = read_data(2);

if(killer != victim && get_user_team(killer) != get_user_team(victim))
set_task(0.5, "resawn", victim);
}

public resawn(id)
ExecuteHamB(Ham_CS_RoundRespawn, id);

  • +
  • -
  • 1


#156132 Przechodzenie przez graczy

Posted by byCZUS on 31.07.2010 02:16

SemiClip

SemiClip - Nieoficjalny polski support AMX Mod X
  • +
  • -
  • 2


#139120 Prośba o plugin

Posted by byCZUS on 27.05.2010 18:24

Plugin Sniffera + moja edycja


#include <amxmodx>
#include <fakemeta>

#define PLUGIN "Granat, gleba!"
#define VERSION "0.1"
#define AUTHOR "Sn!ff3r"

public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR);
register_forward(FM_EmitSound, "EmitSound");
}

new CUSTOM_SOUND[][] = { "misc/gleba.wav", "misc/gleba.wav", "misc/gleba.wav", "misc/gleba.wav"};

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

public EmitSound(entity, channel, const sound[])
{
if(pev_valid(entity))
{
if(contain(sound, "radio/ct_fireinhole.wav")!=-1)
{
emit_sound(entity, channel, CUSTOM_SOUND[random_num(0, sizeof(CUSTOM_SOUND) - 1)], 1.0, ATTN_NORM, 0, PITCH_NORM);
return FMRES_SUPERCEDE;
}
}
return FMRES_IGNORED;
}

  • +
  • -
  • 1


#138920 Odpychający się gracze zm Średnie

Posted by byCZUS on 26.05.2010 21:59


/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <biohazard>
#include <engine>

#define PLUGIN "Push player"
#define VERSION "1.0"
#define AUTHOR "OneEyed & Sn!ff3r"

new cvar

public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)

cvar = register_cvar("amx_moveplayer", "1")

register_touch("player", "player", "touchtouch")
}

public touchtouch(player, player2)
{
if(get_pcvar_num(cvar))
{
if((!(task_exists(player * 1000 + player2))) &&
(!(task_exists(player2 * 1000 + player))) &&
(get_user_button(player) & IN_ATTACK2) &&
is_user_zombie(player) &&
is_user_zombie(player2))
{
new Float:speed[2][3]
new Float:over_speed[3]

set_task(0.2, "empty_space", player * 1000 + player2)
set_task(0.2, "empty_space", player2 * 1000 + player)

entity_get_vector(player, EV_VEC_velocity, speed[0])
entity_get_vector(player2, EV_VEC_velocity, speed[1])

for(new i = 0; i < 3; i++)
{
over_speed[i] = speed[0][i] + speed[1][i]
speed[0][i] += over_speed[i] * 0.65
speed[1][i] -= over_speed[i] * 0.65
}
entity_set_vector(player, EV_VEC_velocity, speed[0])
entity_set_vector(player2, EV_VEC_velocity, speed[1])
}
}
}

public empty_space() {}



Kod znaleziony na alliedmods + dodanie only zm
  • +
  • -
  • 2


#138479 Funkcja na 4 losowych graczach...

Posted by byCZUS on 25.05.2010 18:29

tak na botach również jest wykonywana. Jeśli tego nie chcesz get_players powinien wyglądać tak
get_players(players, num, "c")

  • +
  • -
  • 1


#138367 Funkcja na 4 losowych graczach...

Posted by byCZUS on 25.05.2010 14:59


public costutaj()
{
new players[32], num
new bool: wylosowany[33]
get_players(players, num)

if(num > 1)
{
for(new i = 0; i < num; i++) wylosowany[players[i]] = false

new i = 0
while(i < 5)
{
wylosowany[players[random_num(0, num-1)]] = true
i++
}

for(new i = 0; i < num; i++)
{
if(wylosowany[players[i]])
{
// tutaj co chcesz zrobic z wylosowanymi id - players[i]
}
else
{
// z reszta
}
}
}
}

  • +
  • -
  • 1


#134430 optymalizacja kodu

Posted by byCZUS on 12.05.2010 18:15

Po optymalizacji


#include <amxmodx>
#include <fakemeta_util>
#include <hamsandwich>

new g_bronie[][] = { "ammo_556nato", "ammo_556nato", "ammo_556nato", "weapon_deagle", "ammo_50ae",
"ammo_50ae", "ammo_50ae", "ammo_50ae", "ammo_50ae", "ammo_50ae", "ammo_50ae", "weapon_hegrenade",
"weapon_flashbang", "weapon_flashbang", "weapon_smokegrenade", "item_assaultsuit", "item_thighpack" }

public plugin_init()
{
register_plugin("admin dostaje bron", "1.0", "naven")
RegisterHam(Ham_Spawn, "player", "runda", 1);

}
public runda(id)
{
if(is_user_alive(id))
{
if (get_user_flags(id) & ADMIN_LEVEL_H)
{
for(new i = 0; i < sizeof(g_bronie); i++)
fm_give_item(id, g_bronie[i])
}
}
}

  • +
  • -
  • 1


#133495 Przeróbka - worki z piaskiem

Posted by byCZUS on 09.05.2010 12:54

jako admin boostbags w console i robisz skrzynki, zapisujesz i są hp ustalasz tu: set_pev(ent, pev_health, 1000.0)
  • +
  • -
  • 1


#133468 Wymuszanie tagu przed nickiem

Posted by byCZUS on 09.05.2010 12:10


#include <amxmodx>

public plugin_init()
{
register_plugin("Plugin", "1.0", "Author")
register_event("ResetHUD", "event_resethud", "b")
}

public event_resethud(id) set_task(1.0, "check", id);

public check(id)
{
new name[33]; get_user_name(id, name, 32);

if(get_user_flags(id) & ADMIN_LEVEL_H && !(get_user_flags(id) & ADMIN_BAN))
{
if(containi(name, "VIP | ") != -1)
return;

client_cmd(id, "name ^"VIP | %s^"", name);
}
else if(!(get_user_flags(id) & ADMIN_LEVEL_H) && containi(name, "VIP | ") > 0)
{
delete(name, "VIP | ")
trim(name)

if(strlen(name) < 1)
copy(name, 32, "Player")

client_cmd(id, "name ^"%s^"", name);
}
}

stock delete(text[], const what[])
{
new pos, len, i

pos = containi(text, what)
while (pos>=0)
{
len = strlen(what)
i = 0

while (text[pos+len+i]!=0)
{
text[pos+i] = text[pos+len+i]
i++
}

text[pos+i] = 0
pos = containi(text, what)
}
}


Masz to, użyta funkcja do kasowania tagu.
  • +
  • -
  • 1


#133454 Wymuszanie tagu przed nickiem

Posted by byCZUS on 09.05.2010 11:45

Nie prościej ?


#include <amxmodx>

public plugin_init()
{
register_plugin("Plugin", "1.0", "Author")
register_event("ResetHUD", "event_resethud", "b")
}

public event_resethud(id) set_task(1.0, "check", id);

public check(id)
{
if(get_user_flags(id) & ADMIN_LEVEL_H)
{
new name[33]; get_user_name(id, name, 32);

if(containi(name, "VIP |") != -1)
return;

client_cmd(id, "name ^"VIP | %s^"", name);
}
}

  • +
  • -
  • 2


#133374 Wybieranie Boosa na poczatku tury i respienie sie

Posted by byCZUS on 09.05.2010 01:11


#include <amxmodx>
#include <hamsandwich>

new g_boss

public plugin_init() {
register_plugin("Boss", "1.0","byQQ")

register_event("HLTV", "event_newround", "a", "1=0", "2=0")
register_event("DeathMsg", "event_death", "a")
}

public event_newround()
{
new players[32], name[33], num, i
get_players(players, num , "ae", "CT")

if(num > 1)
{
g_boss = players[random_num(0, num-1)]

get_user_name(g_boss, name, 32)

for(i = 0; i < num; i++)
{
client_print(players[i], print_chat, "%s zostal bossem", name)
}
}
}

public event_death()
{
new victim = read_data(2)

if(is_user_alive(g_boss) && get_user_team(victim) == 2 && victim != g_boss)
set_task(3.0, "respawn_player", victim)
}

public respawn_player(id)
ExecuteHamB(Ham_CS_RoundRespawn, id)


Testowałem i działa.
  • +
  • -
  • 1


#133268 VIP - napisanie!

Posted by byCZUS on 08.05.2010 20:24

Już plugin z mojego serwera ....
  • +
  • -
  • -1


#132507 Aktywni admini (VIPy)

Posted by byCZUS on 06.05.2010 16:38

Cieszę się, więc można zamknąć.
  • +
  • -
  • 1


#132124 Aktywni admini (VIPy)

Posted by byCZUS on 05.05.2010 18:41

public print_adminlist(user) 

{

	new adminnames[33][32]

	new message[256]

	new contactinfo[256], contact[112]

	new id, count, x, len

	

	for(id = 1 ; id <= maxplayers ; id++)

	{

		if(is_user_connected(id))

		{

			if(get_user_flags(id) & ADMIN_LEVEL_H && get_user_flags(id) != ADMIN_IMMUNITY) 

				get_user_name(id, adminnames[count++], 31)	

		}

	}

	

	len = format(message, 255, "%s Dostepny VIP: ",COLOR)

	if(count > 0) 

	{

		for(x = 0 ; x < count ; x++) 

		{

			len += format(message[len], 255-len, "%s%s%s ", COLOR, adminnames[x], x < (count-1) ? "^x01, ":"")

			if(len > 96 ) {

				print_message(user, message)

				len = format(message, 255, "%s ",COLOR)

			}

		}

		print_message(user, message)

	}

	else {

		len += format(message[len], 255-len, "Brak dostepnych VIPow.")

		print_message(user, message)

	}

	

	get_cvar_string("sv_contact", contact, 63)

	if(contact[0])  {

		format(contactinfo, 111, "%s Kontakt z Adminem -- %s", COLOR, contact)

		print_message(user, contactinfo)

	}

	return PLUGIN_HANDLED;

}

  • +
  • -
  • 1




Sign In