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.
|
VirusX
Rejestracja: 18.10.2010Aktualnie: Nieaktywny
Poza forum Ostatnio: 14.03.2019 20:45




Statystyki
- Grupa: Użytkownik
- Całość postów: 48
- Odwiedzin: 6 508
- Tytuł: Pomocny
- Wiek: 37 lat
- Urodziny: Listopad 29, 1987
-
Imię
Adam
-
Płeć
Mężczyzna
-
Lokalizacja
Zabrze
Kontakt
Narzędzia użytkownika
Znajomi
VirusX nie posiada znajomych
#377270 Jak to zoptymalizowac?
Napisane przez DarkGL
w 08.03.2012 17:41
jeśli chcesz wysyłać ten message do wszystkich do usuń pętle i pobieranie graczy i daj MSG_BROADCAST
#361384 [ROZWIĄZANE] Blokowanie cyfr w sayu
Napisane przez
hardbot
w 09.02.2012 21:20
http://amxx.pl/topic...-advertisement/
http://amxx.pl/topic/700-dont-say-ips/
http://amxx.pl/topic...eklamy-w-nicku/
Jeśli zaś nie jest tak proszę zapodaje inną wersję.
#include <amxmodx>
#define PLUGIN "Restrict Advertising"
#define VERSION "1.0"
#define AUTHOR "Alka & Sn!ff3r edit [H]ARDBO[T]"
stock const advertising_words[][] = {
"1",
"2",
"3",
"4",
"5",
"6",
"7",
"8",
"9",
"0"
}
new const reason[] = "Tutaj_wiadomosc_na_say_po_wpisaniu_numeru";
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR);
register_clcmd("say", "hook_chat");
register_clcmd("say_team", "hook_chat");
}
public hook_chat(id)
{
new szArgs[512]; read_args(szArgs, 511);
new len; len = strlen(szArgs);
new digits, periods;
for(new i = 0 ; i < sizeof (advertising_words) ; i++)
{
if(containi(szArgs, advertising_words[i]) != -1)
{
server_cmd("say %s", reason);
return 1;
}
}
for(new i; i < len; i++)
{
if(isdigit(szArgs[i])) digits++
else if(szArgs[i] == '.' || szArgs[i] == ':') periods++
}
return 0;
}
#361378 [ROZWIĄZANE] Blokowanie cyfr w sayu
Napisane przez DarkGL
w 09.02.2012 21:14
#include <amxmodx>
#include <amxmisc>
#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "DarkGL"
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_clcmd( "say" , "sayHandle" );
register_clcmd( "say_team" , "sayHandle" );
}
public sayHandle ( id ){
new szSay[ 256 ] ,
bool:bStop = false ;
read_argv( 1 , szSay , charsmax( szSay ) );
for( new i = 0 ; i < strlen( szSay ) ; i++ ){
if( isdigit( szSay [ i ] ) ) {
bStop = true;
client_print( id , print_chat , "Ten serwer jest cool" );
break;
}
}
return bStop ? PLUGIN_HANDLED : PLUGIN_CONTINUE;
}
</amxmisc></amxmodx>
#327506 [ROZWIĄZANE] Poszukuję klucza francuskiego albo cos na ksztalt
Napisane przez DarkGL
w 27.11.2011 20:32
#322868 IPB czy vBulletin?
Napisane przez Portek
w 17.11.2011 13:20
SEŁO master widzę... Każdy silnik ma swoje wady i zalety, każde forum jest inne ze względu na obciążenie generowane przez użytkowników, przez hosting, a nie od dziś wiadomo że google lubi fora które szybciej są generowane.A jak to wyglada w kwestii pozycjonowania, botow od googla oraz innych? Czy istnieja takie pod ipb?
To że silnik ma moduł 'SEO' nie znaczy że z automatu wskoczy na pierwsze pozycje - choćby dlatego że nie Ty jedyny masz taki moduł. SEO to nie tylko moduły, ale też zdrowy rozum, "mocne" linki i cała masa innych rzeczy. Ale odpowiadając na pytanie: http://community.inv...ile/3232-ipseo/
#322969 [ROZWIĄZANE] Renderowanie bytu w zaleznosci od wartosci zmiennej
Napisane przez DarkGL
w 17.11.2011 17:52
set_rendering(ent, kRenderFxNone, 255, 0, 0, kRenderTransAlpha, 255)gdzie ostatnia liczba to wartość od 255 do 0
255 to maksymalna widoczność
0 nie widać wogóle enta
do ustawiania wartości przezroczystości możesz użyć switch
http://amxx.pl/topic...laracja-switch/
#322899 [ROZWIĄZANE] Renderowanie bytu w zaleznosci od wartosci zmiennej
Napisane przez DarkGL
w 17.11.2011 15:42
#272240 Komenda say kupujaca item
Napisane przez kapi10072
w 21.07.2011 17:00
#include <amxmodx>
#include <fakemeta>
#include <hamsandwich>
#include <zombieplague>
const TASK_SPEED_BOOST = 100
#define ID_SPEED_BOOST (taskid - TASK_SPEED_BOOST)
// Hack to be able to use Ham_Player_ResetMaxSpeed (by joaquimandrade)
new Ham:Ham_Player_ResetMaxSpeed = Ham_Item_PreFrame
new g_itemid_boost
new cvar_boost_amount
new cvar_boost_duration
new g_has_speed_boost[33]
public plugin_init()
{
register_plugin("[ZP] Extra Item Speed Boost", "1.2", "MeRcyLeZZ")
g_itemid_boost = zp_register_extra_item("Przyspieszenie", 2000, ZP_TEAM_HUMAN | ZP_TEAM_ZOMBIE)
cvar_boost_amount = register_cvar("zp_boost_amount", "100.0")
cvar_boost_duration = register_cvar("zp_boost_duration", "5.0")
RegisterHam(Ham_Player_ResetMaxSpeed, "player", "fw_ResetMaxSpeed_Post", 1)
RegisterHam(Ham_Killed, "player", "fw_PlayerKilled")
register_event("HLTV", "event_round_start", "a", "1=0", "2=0")
register_clcmd("say /speed", "zp_extra_item_selected")
}
public zp_extra_item_selected(player, itemid)
{
if (itemid == g_itemid_boost)
{
// Player frozen (or CS freezetime)
if (pev(player, pev_maxspeed) <= 1)
{
client_print(player, print_chat, "[ZM] Nie mozesz uzywac gdy jestes zamrozony")
return ZP_PLUGIN_HANDLED;
}
// Already using speed boost
if (g_has_speed_boost[player])
{
client_print(player, print_chat, "[ZM] Kupiles juz Przyspieszenie.")
return ZP_PLUGIN_HANDLED;
}
// Enable speed boost
g_has_speed_boost[player] = true
client_print(player, print_chat, "[ZM] Przyspieszenie aktywne!")
// Set the restore speed task
set_task(get_pcvar_float(cvar_boost_duration), "restore_maxspeed", player+TASK_SPEED_BOOST)
// Update player's maxspeed
ExecuteHamB(Ham_Player_ResetMaxSpeed, player)
}
return PLUGIN_CONTINUE;
}
public restore_maxspeed(taskid)
{
// Disable speed boost
g_has_speed_boost[ID_SPEED_BOOST] = false
client_print(ID_SPEED_BOOST, print_chat, "[ZM] Przyspieszenie nieaktywne.")
// Update player's maxspeed
ExecuteHamB(Ham_Player_ResetMaxSpeed, ID_SPEED_BOOST)
}
// Remove speed boost task when infected, humanized, killed, or disconnected
public zp_user_infected_pre(id, infector, nemesis)
{
g_has_speed_boost[id] = false
remove_task(id+TASK_SPEED_BOOST)
}
public zp_user_humanized_pre(id, survivor)
{
g_has_speed_boost[id] = false
remove_task(id+TASK_SPEED_BOOST)
}
public fw_PlayerKilled(victim)
{
g_has_speed_boost[victim] = false
remove_task(victim+TASK_SPEED_BOOST)
}
public client_disconnect(id)
{
g_has_speed_boost[id] = false
remove_task(id+TASK_SPEED_BOOST)
}
// Remove speed boost at round start
public event_round_start()
{
new id
for (id = 1; id <= get_maxplayers(); id++)
{
g_has_speed_boost[id] = false
remove_task(id+TASK_SPEED_BOOST)
}
}
public fw_ResetMaxSpeed_Post(id)
{
if (!is_user_alive(id) || !g_has_speed_boost[id])
return;
// Apply speed boost
new Float:current_maxspeed
pev(id, pev_maxspeed, current_maxspeed)
set_pev(id, pev_maxspeed, current_maxspeed + get_pcvar_float(cvar_boost_amount))
}
#270858 String formatted incorrectly - parameter 4
Napisane przez R3X
w 17.07.2011 13:12
#259340 Granat - obsluga zdarzen
Napisane przez Fili:P
w 16.06.2011 11:08
if(!cs_get_weapon_id ( id ) & CSW_HEGRENADE)
{
// co się ma dziać kiedy granat jest w ręku
}
Trzymanie w ręku przykład 2 ( polecam tę metodę )
#include <amxmodx>
#include <amxmisc>
public plugin_init() {
register_event("CurWeapon","CurWeapon","be", "1=1")
}
public CurWeapon(id)
{
new wid = read_data(2) // Id broni
new ammo = read_data(3) // liczba naboi w magazynku
//code
}
Id
He : 4
Smoke : 9
Flashbang : 25
Napięcie granatu :
#include <amxmodx>
#include <amxmisc>
public plugin_init() {
register_event("CurWeapon","CurWeapon","be", "1=1")
}
public CurWeapon(id)
{
new wid = read_data(2) // Id broni
new ammo = read_data(3) // liczba naboi w magazynku
if(buttons & IN_ATTACK||wid==4)
{
// tu piszesz to co się stanie podczas trzymania lpm
}
}
#257557 Wielokrotne wywolanie bloku instrukcji
Napisane przez Knopers
w 10.06.2011 18:47
#196765 Problem Snowball War - znika paka
Napisane przez lajT?.
w 16.12.2010 10:25
//This can affect gameplay
new const g_not_needed[][] =
{
"weaponbox",
"armoury_entity",
"grenade",
"func_bomb_target",
"info_bomb_target",
"info_vip_start",
"func_vip_safetyzone",
"func_escapezone",
"hostage_entity",
"monster_scientist",
"func_hostage_rescue",
"info_hostage_rescue"
}
#190997 Czy jest plugin kickujacy NS ?
Napisane przez Meelo
w 22.11.2010 23:28
/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <amxmisc>
#define PLUGIN "Non-Steam kicker"
#define VERSION "1.0"
#define AUTHOR "peku33"
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR);
}
public client_authorized(id)
{
if(get_maxplayers() <= get_playersnum() + 1)
{
new authid[64];
get_user_authid(id, authid, 63);
if(check_nonsteam(authid))
{
server_cmd("kick #%d Slot zarezerwowany dla graczy STEAM", get_user_userid(id));
}
else
{
new players[32], plnum;
get_players(players, plnum, "bhc");
new kickid;
if(plnum > 0)
{
kickid = find_id_to_kick(players, plnum);
}
else
{
get_players(players, plnum, "hc");
kickid = find_id_to_kick(players, plnum);
}
if(kickid)
{
server_cmd("kick #%d Pierwszenstwo maja gracze STEAM", get_user_userid(kickid));
}
else
{
//Brak wolnego slota do gry
server_cmd("kick #%d Brak wolnego slota", get_user_userid(id));
}
}
}
}
public check_nonsteam(authid[])
{
if(containi(authid, "LAN"))
{
return true;
}
return false;
}
public find_id_to_kick(players[32], plnum)
{
new authid[64];
for(new i = 0; i < plnum; i++)
{
get_user_authid(i, authid, 63);
if(check_nonsteam(authid))
{
return i;
}
}
return false;
}
/* AMX Mod X
* Slots Reservation Plugin
*
* by the AMX Mod X Development Team
* originally developed by OLO
*
* This file is part of AMX Mod X.
*
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at
* your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* In addition, as a special exception, the author gives permission to
* link the code of this program with the Half-Life Game Engine ("HL
* Engine") and Modified Game Libraries ("MODs") developed by Valve,
* L.L.C ("Valve"). You must obey the GNU General Public License in all
* respects for all of the code used other than the HL Engine and MODs
* from Valve. If you modify this file, you may extend this exception
* to your version of the file, but you are not obligated to do so. If
* you do not wish to do so, delete this exception statement from your
* version.
*/
#include <amxmodx>
#include <amxmisc>
new g_ResPtr
new g_HidePtr
public plugin_init()
{
register_plugin("Slots Reservation", AMXX_VERSION_STR, "AMXX Dev Team")
register_dictionary("adminslots.txt")
register_dictionary("common.txt")
g_ResPtr = register_cvar("amx_reservation", "0")
g_HidePtr = register_cvar("amx_hideslots", "0")
}
public plugin_cfg()
{
set_task(3.0, "MapLoaded")
}
public MapLoaded()
{
if (!get_pcvar_num(g_HidePtr))
return
new maxplayers = get_maxplayers()
new players = get_playersnum(1)
new limit = maxplayers - get_pcvar_num(g_ResPtr)
setVisibleSlots(players, maxplayers, limit)
}
public ackSignal(id)
{
new lReason[64]
format(lReason, 63, "%L", id, "DROPPED_RES")
server_cmd("kick #%d ^"%s^"", get_user_userid(id), lReason)
return PLUGIN_HANDLED
}
public client_authorized(id)
{
new maxplayers = get_maxplayers()
new players = get_playersnum(1)
new limit = maxplayers - get_pcvar_num(g_ResPtr)
if (access(id, ADMIN_RESERVATION) || (players <= limit))
{
if (get_pcvar_num(g_HidePtr) == 1)
setVisibleSlots(players, maxplayers, limit)
return PLUGIN_CONTINUE
}
if(is_steam(id))
{
new tokick = get_fresh_ns()
if(!tokick || !is_user_connected(tokick))
{
ackSignal(id)
return PLUGIN_CONTINUE
}
ackSignal(tokick)
return PLUGIN_CONTINUE
}
ackSignal(id)
return PLUGIN_HANDLED
}
public client_disconnect(id)
{
if (!get_pcvar_num(g_HidePtr))
return PLUGIN_CONTINUE
new maxplayers = get_maxplayers()
setVisibleSlots(get_playersnum(1) - 1, maxplayers, maxplayers - get_pcvar_num(g_ResPtr))
return PLUGIN_CONTINUE
}
stock is_steam(id)
{
static authid[33]
get_user_authid(id, authid, 32)
if(contain(authid, "0:0") != -1 || contain(authid, "0:1") != -1)
{
return true
}
return false
}
stock get_fresh_ns()
{
static who, itime, shortest = 0x7fffffff, players[32], num, i
get_players(players, num)
for(i = 0; i < num; i++)
{
if(is_steam(players[i]) || !is_user_connected(players[i]))
continue
if(get_user_flags(players[i] & ADMIN_RESERVATION))
continue
itime = get_user_time(players[i])
if(shortest > itime )
{
shortest = itime
who = players[i]
}
}
return who
}
stock setVisibleSlots(players, maxplayers, limit)
{
new num = players + 1
if (players == maxplayers)
num = maxplayers
else if (players < limit)
num = limit
set_cvar_num("sv_visiblemaxplayers", num)
}albo to, albo to
#181473 [minigun] Prosba o usuniecie funkcji
Napisane przez kyku
w 19.10.2010 16:57
- AMXX.pl: Support AMX Mod X i SourceMod
- → Przeglądanie profilu: Reputacja: VirusX
- Regulamin


Dodatki SourceMod



Moja zawartość
