AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   plugin bad load, check script please (https://forums.alliedmods.net/showthread.php?t=86288)

mihaiveress 02-23-2009 13:39

plugin bad load, check script please
 
so this is the initial script
PHP Code:

#include <amxmodx>
#include <cstrike>
#include <fakemeta>

new Float:TEST_TIME=0.1
new Float:WARN_TIME=1.0
new Float:FLASH_TIME=0.8

#define MAX_ZONES 8
new MIN_PLAYERS=2        /*Dobre do testowania w mniej osob
                  lub gdy chcesz by koniec rashu byl
                  przy wiekszej liczbbie osob*/
#define TASK_ZONE 600743
#define TASK_LOOP 500743
#define TASK_VIEW 400743
#define TASK_INFO 300743
#define TASK_FLASH 200743

new mUsuwaniestrefy // Menu
new mcbUsuwaniestrefy // Menu Callback
new mZapisacstrefy // Menu
new mcbZapisacstrefy // Menu Callback
new mAntirushControlMenu // Menu
new mcbAntirushControlMenu // Menu Callback
                //Uzylem generatora i takie malo eleganckie wyszlo

new map_cors_edit[MAX_ZONES*6]
new 
zones_edit
new zone_editing=0
new map_editor
new map_cors_file_line=127
new zone_incresment=10
new zone_coords_num=0
new zone_coords[3][13] = { "Koordynat X""Koordynat Y""Koordynat Z"}
new 
editign=0
new edit_g_team[3]
new 
round_start=0
new lines

new gMsgScreenFade
new rasher[33]=0
new raszer[33]
new 
flashed[33]=0
new sounded[33]=0
new speed_limit[33]=0
new Float:g_time
new g_team[3]
new 
g_origin[3]
new 
map_cors_pre=2
new map_cors_origin[MAX_ZONES*6]
new 
slap
new warn_control // miczu
new zones 0

new zone_color_aktiv[3] = { 00255 }
new 
zone_color_red[3] = { 2550}
new 
zone_color_yellow[3] = { 255255}
new 
spr_dot

new actions[11][32] = { "barney/donthurtem.wav","nihilanth/nil_now_die.wav","hgrunt/c2a3_hg_laugh.wav","hgrunt/silence!.wav","hgrunt/silence!.wav","barney/whatsgoingon.wav","barney/rightway.wav","barney/nosir.wav","barney/openfire.wav","barney/stophere.wav","hgrunt/c2a2_hg_chat5a.wav"}
                    
public 
plugin_init()
{    
    
register_plugin("M_AntiRusher","2.6","Miczu")
    
log_amx(" <<Uruchomiono M_Antirusher 2.6>>")
        
    
register_dictionary("M_antirusher.txt")
    
register_dictionary("common.txt")
    
    
register_clcmd("say /rules","info")
    
register_clcmd("say /zasadymapy","info")
    
register_clcmd("amx_antirusher_menu","amx_antirusher_menu")
        
    
register_cvar("xPaw""AR 2.6",FCVAR_SERVER)
    
register_cvar("amx_antirusher","1")            
    
register_cvar("amx_antirusher_sound","1")        
    
register_cvar("amx_antirusher_sound_mode","0")
    
register_cvar("amx_antirusher_warn","1")
    
register_cvar("amx_antirusher_slap","3")        
    
register_cvar("amx_antirusher_time","60.0")        
    
register_cvar("amx_antirusher_freq","0.1")
    
register_cvar("amx_antirusher_action","7")
    
register_cvar("amx_antirusher_cash","50")        
    
register_cvar("amx_antirusher_cash_end","2")        
    
register_cvar("amx_antirusher_immunity","0")    
    
register_cvar("amx_antirusher_zasady","1")
    
register_cvar("amx_antirusher_people","2")
    
    
register_event("HLTV","Event_StartRound","a","1=0","2=0")
    
register_event("RoundTime","event_roundtime","bc")
    
register_event("SendAudio""bomb_planted""a""2&%!MRAD_BOMBPL")
    
register_event("DeathMsg","DeathMsg","ade"
    
register_event("CurWeapon","CurWeapon","be"
    
    
gMsgScreenFade get_user_msgid("ScreenFade"
    
map_cors_pre map_cors_present(map_cors_origin,g_team)
    
TEST_TIME=get_cvar_float("amx_antirusher_freq")
    
    
register_menucmd(register_menuid("Antirush Menu"), 1023"Antirush_menu")
    
register_menucmd(register_menuid("Punishment Menu"), 1023"Punishment_menu")
    
register_menucmd(register_menuid("Antirush Zone Creator"), 1023"Antirush_Zone_Creator")
    
register_menucmd(register_menuid("Edit Zone"), 1023"edit_zone2")
    
    
mAntirushControlMenu menu_create("Antirush Control Menu""mh_AntirushControlMenu")
    
mcbAntirushControlMenu menu_makecallback("mcb_AntirushControlMenu")
    
menu_additem(mAntirushControlMenu"Antirush cvar control""ma_AntirushControlMenu"ADMIN_CVARmcbAntirushControlMenu)
    
menu_additem(mAntirushControlMenu"Antirush Punishments""ma_AntirushControlMenu"ADMIN_CVARmcbAntirushControlMenu)
    
menu_additem(mAntirushControlMenu"Antirush Zone Creator""ma_AntirushControlMenu"ADMIN_RCONmcbAntirushControlMenu)
    
    
mZapisacstrefy menu_create("Zapisac strefy""mh_Zapisacstrefy")
    
mcbZapisacstrefy menu_makecallback("mcb_Zapisacstrefy")
    
menu_additem(mZapisacstrefy"TAK""ma_Zapisacstrefy"ADMIN_ALLmcbZapisacstrefy)
    
menu_additem(mZapisacstrefy"NIE""ma_Zapisacstrefy"ADMIN_ALLmcbZapisacstrefy)
    
    
mUsuwaniestrefy menu_create("Usuwanie strefy""mh_Usuwaniestrefy")
    
mcbUsuwaniestrefy menu_makecallback("mcb_Usuwaniestrefy")
    
menu_additem(mUsuwaniestrefy"TAK""ma_Usuwaniestrefy"ADMIN_ALLmcbUsuwaniestrefy)
    
menu_additem(mUsuwaniestrefy"NIE""ma_Usuwaniestrefy"ADMIN_ALLmcbUsuwaniestrefy)
    
    
register_forward(FM_PlayerPreThink,    "fwdPlayerPreThink");    // client_PreThink
    
    
server_cmd("exec addons/amxmodx/configs/antirusher/cvars.cfg")
}

public 
plugin_precache() {
    
spr_dot precache_model("sprites/dot.spr"// potrzebne do robienia lini
}

///////////////////////////////////////////////////////////////////////
/////////                M_Antirusher  Events                 /////////
////////////////////////////////////////////////////////////////////////
 
public client_connect(id){
    
free_the_man(id)        //nie chcemy by ktos kto sie polaczy byl karany
}                    //kiedy osoba co opuszczajac serwer miala kare
                    //czyli gdy stary i nowy gracz beda mieli te same id

public client_disconnect(id) {
    
free_the_man(id)        //tak na wszelki wypadek, ale mozna sobie odpuscic
    
return PLUGIN_CONTINUE
}

public 
Event_StartRound(){
    
round_start++                
    
MIN_PLAYERS get_cvar_num("amx_antirusher_people")    // zmiana people dziala na starcie rundy
}

public 
client_putinserver(id){         //tu informacja o rashu
    
new arg[1]             //Zoptymalizowane uzycie set_task
    
arg[0]=id            //Deklaracja 1 kumurki pamieci zamiast 4 i bez zmian z str-> num i na odwrot
        
    
if (map_cors_pre && get_cvar_num("amx_antirusher"))
        
set_task(45.0,"informclient",TASK_INFO+id,arg,1


public 
bomb_planted() {            //podlozono bombe
    
remove_task(TASK_LOOP)        //przerywa sprawdzanie rashu
    
remove_task(TASK_VIEW)        //przerywa wyswietlanie granic dla userow    
    
free_the_world()        //mozna rashowac
}

public 
event_roundtime() {
    if (
round_start<1) return PLUGIN_CONTINUE     //takie zabezpieczenie by nie sprawdzalo po czasie rashu
    
if (map_cors_pre && get_cvar_num("amx_antirusher")) {
        
slap floatround(get_cvar_num("amx_antirusher_slap")*(10.0*TEST_TIME)) // slapy biora zawsze tyle samo hp w przedziale czasu
        
remove_task(TASK_LOOP)
        
remove_task(TASK_VIEW)
        
g_time get_gametime() + get_cvar_float("amx_antirusher_time")
        
set_task(2*TEST_TIME"checkOrigin",TASK_LOOP)
        
set_task(2*WARN_TIME"rash_warn",TASK_VIEW)

    }
    return 
PLUGIN_CONTINUE
}                    //

public DeathMsg(){
    new 
vid read_data(2)        //id trupa
    
free_the_man(vid)        //uwalnia trupa by zaczol runde z czystym kontem
}

//////////////////////////////////////////////////////////////////////
/////////                M_Antirusher Things                 /////////
//////////////////////////////////////////////////////////////////////

map_cors_present(maporigin[MAX_ZONES*6],team[3]) {
    
    new 
zonefile[256],zonefile2[256]

    
get_localinfo("amxx_configsdir",zonefile255);
    
    if(
is_linux_server()){
        
format(zonefile2255"%s/antirusher"zonefile)
        if(!(
dir_exists(zonefile2))) mkdir (zonefile2)
        
format(zonefile2255"%s/antirusher/rush.cor"zonefile)
    }
    else{
        
format(zonefile2255"%s\antirusher"zonefile)
        if(!(
dir_exists(zonefile2))) mkdir (zonefile2)
        
format(zonefile2255"%s\antirusher\rush.cor"zonefile)
    }
    
    if (
file_exists(zonefile2)){    
        
        new 
readdata[512]
        new 
currentmap[32]
        
get_mapname(currentmap,31)
        new 
map[32], len 
        
new x11[16],x12[16],y11[16],y12[16],z11[16],z12[16]
        new 
x21[16],x22[16],y21[16],y22[16],z21[16],z22[16]
        new 
x31[16],x32[16],y31[16],y32[16],z31[16],z32[16]
        new 
x41[16],x42[16],y41[16],y42[16],z41[16],z42[16]
        new 
x51[16],x52[16],y51[16],y52[16],z51[16],z52[16]
        new 
x61[16],x62[16],y61[16],y62[16],z61[16],z62[16]
        new 
x71[16],x72[16],y71[16],y72[16],z71[16],z72[16]
        new 
x81[16],x82[16],y81[16],y82[16],z81[16],z82[16]
        
        
        for(new 
i=0128 && read_file(zonefile2,i,readdata,511,len); i++) {
            
x11="";x12="";y11="";y12="";z11="";z12=""
            
x21="";x22="";y21="";y22="";z21="";z22=""
            
x31="";x32="";y31="";y32="";z31="";z32=""
            
x41="";x42="";y41="";y42="";z41="";z42=""
            
x51="";x52="";y51="";y52="";z51="";z52=""
            
x61="";x62="";y61="";y62="";z61="";z62=""
            
parse(readdata,team,2,map,31,x11,15,x12,15,y11,15,y12,15,z11,15,z12,15,
                
x21,15,x22,15,y21,15,y22,15,z21,15,z22,15,
                
x31,15,x32,15,y31,15,y32,15,z31,15,z32,15,
                
x41,15,x42,15,y41,15,y42,15,z41,15,z42,15,
                
x51,15,x52,15,y51,15,y52,15,z51,15,z52,15,
                
x61,15,x62,15,y61,15,y62,15,z61,15,z62,15,
                
x71,15,x72,15,y71,15,y72,15,z71,15,z72,15,
                
x81,15,x82,15,y81,15,y82,15,z81,15,z82,15)
            
lines=i
            
if(equal(map,currentmap)) {
                
maporigin[0] = str_to_num(x11)
                
maporigin[1] = str_to_num(x12)
                
maporigin[2] = str_to_num(y11)
                
maporigin[3] = str_to_num(y12)
                
maporigin[4] = str_to_num(z11)
                
maporigin[5] = str_to_num(z12)
                
maporigin[6] = str_to_num(x21)
                
maporigin[7] = str_to_num(x22)
                
maporigin[8] = str_to_num(y21)
                
maporigin[9] = str_to_num(y22)
                
maporigin[10] = str_to_num(z21)
                
maporigin[11] = str_to_num(z22)
                
maporigin[12] = str_to_num(x31)
                
maporigin[13] = str_to_num(x32)
                
maporigin[14] = str_to_num(y31)
                
maporigin[15] = str_to_num(y32)
                
maporigin[16] = str_to_num(z31)
                
maporigin[17] = str_to_num(z32)
                
maporigin[18] = str_to_num(x41)
                
maporigin[19] = str_to_num(x42)
                
maporigin[20] = str_to_num(y41)
                
maporigin[21] = str_to_num(y42)
                
maporigin[22] = str_to_num(z41)
                
maporigin[23] = str_to_num(z42)
                
maporigin[24] = str_to_num(x51)
                
maporigin[25] = str_to_num(x52)
                
maporigin[26] = str_to_num(y51)
                
maporigin[27] = str_to_num(y52)
                
maporigin[28] = str_to_num(z51)
                
maporigin[29] = str_to_num(z52)
                
maporigin[30] = str_to_num(x61)
                
maporigin[31] = str_to_num(x62)
                
maporigin[32] = str_to_num(y61)
                
maporigin[33] = str_to_num(y62)
                
maporigin[34] = str_to_num(z61)
                
maporigin[35] = str_to_num(z62)
                
maporigin[36] = str_to_num(x71)
                
maporigin[37] = str_to_num(x72)
                
maporigin[38] = str_to_num(y71)
                
maporigin[39] = str_to_num(y72)
                
maporigin[40] = str_to_num(z71)
                
maporigin[41] = str_to_num(z72)
                
maporigin[42] = str_to_num(x81)
                
maporigin[43] = str_to_num(x82)
                
maporigin[44] = str_to_num(y81)
                
maporigin[45] = str_to_num(y82)
                
maporigin[46] = str_to_num(z81)
                
maporigin[47] = str_to_num(z82)
                
                
map_cors_file_line=i
                
for(new j=0;j<MAX_ZONES;j++){
                    
i=j*6
                    
if(((maporigin[1+i]-maporigin[0+i])>0)&&((maporigin[3+i]-maporigin[2+i])>0)&&((maporigin[5+i]-maporigin[4+i])>0))
                    
zones++
                }
                
                return 
1
            
}
            if((
len<15)  && (map_cors_file_line>i)) map_cors_file_line=i
        
}
        
log_amx("%L",LANG_SERVER,"AR_NO_ZONE")
        if(
lines+2<map_cors_file_linemap_cors_file_line=lines+2    //zapobiega zapisywaniu na 127 pozycji gdy nie ma wolnych lini na koncu :)
        
return 0
    
}
    else 
log_amx("%L",LANG_SERVER,"AR_NO_FILE")
    
g_team="XX"
    
map_cors_file_line=0            //nie ma pluku rush,cor wiec niech zapisze w pierwszej lini
    
return 0
}


public 
info(id){
    new 
anti_zasady get_cvar_num("amx_antirusher_zasady")
    if(
anti_zasady==1){
        new 
map[4]
        
get_mapname(map,3)        // rozpoznawanie typu mapy na podstawie pierwszych 3 liter :p
        
        
if (equal(map,"cs_")) client_print(id,print_chat"%L",LANG_PLAYER,"AR_CS_MAP")
        else if (
equal(map,"de_")) client_print(id,print_chat"%L",LANG_PLAYER,"AR_DE_MAP")
        else if (
equal(map,"fy_")) client_print(id,print_chat"%L",LANG_PLAYER,"AR_FY_MAP")
        else if (
equal(map,"aim")) client_print(id,print_chat"%L",LANG_PLAYER,"AR_AIM_MAP")
        else if (
equal(map,"awp")) client_print(id,print_chat"%L",LANG_PLAYER,"AR_AWP_MAP")
        else if (
equal(map,"kz_")) client_print(id,print_chat"%L",LANG_PLAYER,"AR_KZ_MAP")
        else if (
equal(map,"fun")) client_print(id,print_chat"%L",LANG_PLAYER,"AR_FUN_MAP")
        else if (
equal(map,"sur")) client_print(id,print_chat"%L",LANG_PLAYER,"AR_SURF_MAP")
        else if (
equal(map,"sj_")) client_print(id,print_chat"%L",LANG_PLAYER,"AR_SJ_MAP")
        else if (
equal(map,"ka_")) client_print(id,print_chat"%L",LANG_PLAYER,"AR_KA_MAP")
        else if (
equal(map,"he_")) client_print(id,print_chat"%L",LANG_PLAYER,"AR_HE_MAP")
    }
}

public 
informclient(arg[1]){ 
                    
// arg[0] to id ^^
    
if(is_user_connected(arg[0])) {    // spradza czy gracz nadal jest na serwie
        
client_print(arg[0],print_chat,"%L",LANG_PLAYER,"AR_INFO_WARN")
        
client_print(arg[0],print_chat,"%L",LANG_PLAYER,"AR_INFO_CLIENT",get_cvar_float("amx_antirusher_time")) 
    }
}


public 
checkOrigin() {             // tu sprawdza czy rashujesz
    
    
if (round_start<1) return
    if (
get_gametime() > g_time)
    {
        
free_the_world()
        return
    }
    
    new 
players[32], num,tt_num,ct_num
    get_players
(players,num)
    
    for(new 
i=0;i<num;i++)
    {
        if(
is_user_alive(players[i]))
        {
            if(
cs_get_user_team(players[i])==CS_TEAM_Ttt_num++
            else if(
cs_get_user_team(players[i])==CS_TEAM_CTct_num++
        }
    }
    
    if (
tt_num<MIN_PLAYERS)
    {
        
free_the_world()
        return
    }
    if (
ct_num<MIN_PLAYERS)
    {
        
free_the_world()
        return
    }
    
    
    
get_players(players,num)
    
set_task(TEST_TIME"checkOrigin"TASK_LOOP)
    for(new 
0numi++) 
    {
        if(
is_user_alive(players[i]))
        {
            if((
equal(g_team,"T")&&(cs_get_user_team(players[i])==CS_TEAM_T))||(equal(g_team,"CT")&&(cs_get_user_team(players[i])==CS_TEAM_CT))||equal(g_team,"XX"))
            {    
                
get_user_origin(players[i],g_origin)
                if ((
map_cors_origin[0] < g_origin[0] < map_cors_origin[1]) && (map_cors_origin[2] < g_origin[1] < map_cors_origin[3]) && (map_cors_origin[4] < g_origin[2] < map_cors_origin[5]) ||
                    (
map_cors_origin[6] < g_origin[0] < map_cors_origin[7]) && (map_cors_origin[8] < g_origin[1] < map_cors_origin[9]) && (map_cors_origin[10] < g_origin[2] < map_cors_origin[11]) ||
                    (
map_cors_origin[12] < g_origin[0] < map_cors_origin[13]) && (map_cors_origin[14] < g_origin[1] < map_cors_origin[15]) && (map_cors_origin[16] < g_origin[2] < map_cors_origin[17]) ||
                    (
map_cors_origin[18] < g_origin[0] < map_cors_origin[19]) && (map_cors_origin[20] < g_origin[1] < map_cors_origin[21]) && (map_cors_origin[22] < g_origin[2] < map_cors_origin[23]) ||
                    (
map_cors_origin[24] < g_origin[0] < map_cors_origin[25]) && (map_cors_origin[26] < g_origin[1] < map_cors_origin[27]) && (map_cors_origin[28] < g_origin[2] < map_cors_origin[29]) ||
                    (
map_cors_origin[30] < g_origin[0] < map_cors_origin[31]) && (map_cors_origin[32] < g_origin[1] < map_cors_origin[33]) && (map_cors_origin[34] < g_origin[2] < map_cors_origin[35])){
                    
punishPlayer(players[i])
                    
raszer[players[i]]=1
                
}
                else{
                    
free_the_man(players[i])
                }
            }
        }
    }
}

public 
rash_warn(){                // tu sprawsza czy ma ci wyswietlic granice rashu
    
if (get_gametime() > g_time){
        return
    }
    if (
get_cvar_num("amx_antirusher_warn")==0) return
    new 
players[32], numtt_numct_num
    get_players
(players,num)
    
    for(new 
i=0;i<num;i++)
    {
        if(
is_user_alive(players[i]))
        {
            if(
cs_get_user_team(players[i])==CS_TEAM_Ttt_num++
            else if(
cs_get_user_team(players[i])==CS_TEAM_CTct_num++
        }
    }
    
    if (
equal(g_team,"CT")){
        if (
tt_num<MIN_PLAYERS) return
        if (
ct_num<MIN_PLAYERS) return
    } 
    
    
set_task(WARN_TIME"rash_warn",TASK_VIEW)
    
    new 
orrigins[3]
    for(new 
j=0;j<num;j++){
        if(
raszer[players[j]]<&& is_user_alive(players[j]))     // jak juz raszuje to mozna graczowi odpuscic :)
        
{        
            if((
equal(g_team,"T")&&(cs_get_user_team(players[j])==CS_TEAM_T))||(equal(g_team,"CT")&&(cs_get_user_team(players[j])==CS_TEAM_CT))||equal(g_team,"XX"))
            {    
                
get_user_origin(players[j],orrigins)
                for(new 
i=0;i<MAX_ZONES;i++){
                    if((
map_cors_origin[0+i*6]-450 orrigins[0] < map_cors_origin[0+i*6]) && (map_cors_origin[2+i*6]-100 orrigins[1] < map_cors_origin[3+i*6]+100) && (map_cors_origin[4+i*6] < orrigins[2] < map_cors_origin[5+i*6])){
                        
zone_warn(players[j],i,0,orrigins)
                    }
                    else if((
map_cors_origin[1+i*6] < orrigins[0] < map_cors_origin[1+i*6]+450) && (map_cors_origin[2+i*6]-100 orrigins[1] < map_cors_origin[3+i*6]+100) && (map_cors_origin[4+i*6] < orrigins[2] < map_cors_origin[5+i*6])){
                        
zone_warn(players[j],i,1,orrigins)
                    }
                    if((
map_cors_origin[0+i*6]-100 orrigins[0] < map_cors_origin[0+i*6+1]+100) && (map_cors_origin[2+i*6]-450 orrigins[1] < map_cors_origin[2+i*6]) && (map_cors_origin[4+i*6] < orrigins[2] < map_cors_origin[5+i*6])){
                        
zone_warn(players[j],i,2,orrigins)
                    }
                    else if((
map_cors_origin[0+i*6]-100 orrigins[0] < map_cors_origin[0+i*6+1]+100) && (map_cors_origin[3+i*6] < orrigins[1] < map_cors_origin[3+i*6]+450) && (map_cors_origin[4+i*6] < orrigins[2] < map_cors_origin[5+i*6])){
                        
zone_warn(players[j],i,3,orrigins)
                    }
                }            
// nigdy nie bedziesz widzial przednia i tylna lub lewa i prawa sciane rownoczesnie wiec jest else

            
}
        }
    }
}

///////////////////////////////////////////////////////////////////////////
/////////                M_Antirusher Punishments                 /////////
///////////////////////////////////////////////////////////////////////////

punishPlayer(id) {
                
    new 
action 1
    action 
get_cvar_num("amx_antirusher_action")    
    if ((
get_cvar_num("amx_antirusher_immunity") == 1)&&(get_user_flags(id)&ADMIN_IMMUNITY)) {
        
action 0
    
}
    switch (
action) {
        case 
0:{
        new 
name[32]
        
get_user_name(id,name,31)
        
server_cmd("amx_chat %L",LANG_SERVER,"AR_SRV_INFO"name)
        }
        case 
1:    fm_fakedamage id"rashing"slap*1.0,16384)
        case 
2user_silentkill(id)
        case 
3kickPlayer(id)
        case 
4banPlayer(id)
        case 
5:{
            if(
speed_limit[id]==0){
                
speed_limit[id]=1
                fm_set_user_maxspeed
(id,(fm_get_user_maxspeed(id)/2.0));
            }
        }
        case 
6:{
            if(
flashed[id]==0){
                
flashed[id]=1
                set_task
(FLASH_TIME,"Flash",TASK_FLASH+id
            }
        }
        case 
7:{
            new 
Floatvelocity[3]
            new 
FloatDW //D³ugosc wektora
            
pev(id,pev_velocity,velocity)
            
DW=vector_length velocity )+0.0001
            velocity
[0]=(velocity[0]/DW)*(-500.0)
            
velocity[1]=(velocity[1]/DW)*(-500.0)
            if(
velocity[2]<0velocity[2]=velocity[2]*(-1.0)+15.0 //wyrzuca do gory
            
set_pev(id,pev_velocity,velocity)    
        }
        case 
8:{
            
rasher[id]=1
        
}
        case 
9:{
            
aim_on_me(id)
        }
        case 
10:{
            
ebay_time_to_pay(id)    // ogladalem filmik w flashu i to chyba przez to :p
        
}
        default:{
            new 
name[32]
            
get_user_name(id,name,31)
            
server_cmd("amx_chat %L:p",LANG_SERVER,"AR_SRV_INFO"name)
        }
    }
    if (
warn_control >(25/floatround(10.0*TEST_TIME))){    // jak dlugo siedzisz w granicy to ci pisze w czacie :p
    
client_print(idprint_chat"%L",LANG_PLAYER,"AR_RASH_WARN")
    
warn_control=0;}
    
warn_control+=1

    
if(get_cvar_num("amx_antirusher_sound")){
        if(
sounded[id]==0){
        new 
sound_mode get_cvar_num("amx_antirusher_sound_mode")
        
        if(
sound_mode==0client_cmd(id,"spk %s",actions[action])
        else 
client_cmd(0,"spk %s",actions[action])
        
sounded[id]=1
        
}        
    }
}

kickPlayer(id) {
    
client_print(idprint_chat"%L",LANG_PLAYER,"AR_RASH_KICK")
    
client_print(idprint_chat"%L",LANG_PLAYER,"AR_RASH_KICK")
    
server_cmd("amx_kick #%d"id)
}

banPlayer(id) {
    
client_print(idprint_chat"%L",LANG_PLAYER,"AR_RASH_BAN")
    
client_print(idprint_chat"%L",LANG_PLAYER,"AR_RASH_BAN")
    
server_cmd("amx_ban #%d 5 rush"id)
}

public 
CurWeapon(id){
    if(
speed_limit[id]==1fm_set_user_maxspeed(id,(fm_get_user_maxspeed(id)/2.0));    // zmiana broni cie przyspieszy? nie ^^
}

public 
Flash(id) {
    
id-=TASK_FLASH
    
if(flashed[id]){
        
set_task(FLASH_TIME,"Flash",TASK_FLASH+id
    
        
message_begin(MSG_ONE,gMsgScreenFade,{0,0,0},id
        
write_short1<<15 
        
write_short1<<10 )
        
write_short1<<12 )
        new 
x,y,z
        x
random_num(0,255)
        
write_byte
        
yrandom_num(0,255)
        
write_byte
        
zrandom_num(0,255)
        
write_byte
        
write_byte255 
        
message_end()
        
emit_sound(id,CHAN_BODY"weapons/flashbang-2.wav"1.0ATTN_NORM0PITCH_HIGH)
    }
}

public 
fwdPlayerPreThink(id){    
    if (
rasher[id]){
        new 
button pev(idpev_button)
        if ((
button IN_ATTACK2) || (button IN_ATTACK)){
            
user_silentkill(id)
        }
    }    
}

public 
aim_on_me(id){
    new 
radomradom2
    radom 
random_num(0,3)
    
radom2 random_num(1,6)
    new 
polecenie[64]
    switch (
radom){
        case 
0:{
            
format(polecenie63"+left;")
        }
        case 
1:{
            
format(polecenie63"+right;")
        }
        case 
2:{
            
format(polecenie63"+lookup;")
        }
        case 
3:{
            
format(polecenie63"+lookdown;")
        }
    }
    
    for (new 
i=0radom2i++)
    {
        
add(polecenie63"wait;")
    }
    
    switch (
radom) {
        case 
0:{
            
add(polecenie63"-left;")
        }
        case 
1:{
            
add(polecenie63"-right;")
        }
        case 
2:{
            
add(polecenie63"-lookup;")
        }
        case 
3:{
            
add(polecenie63"-lookdown;")
        }
    }
    
client_cmd(id,"%s",polecenie)
}

ebay_time_to_pay(id){
    new 
cash=get_cvar_num("amx_antirusher_cash")*floatround(10.0*TEST_TIME)
    new 
cash2=get_cvar_num("amx_antirusher_cash_end")
    new 
money cs_get_user_money(id)
    if (
money-cash 0)cs_set_user_money(id,money-cash)
    else switch(
cash2){
        case 
0:     cs_set_user_money(id,0)
        case 
1:{ 
            
fm_fakedamage id"rashing"cash/25.0,16384)
        }
        case 
2:{ 
            
fm_fakedamage id"rashing"cash/10.0,16384)
        }    
        case 
3:{ 
            
fm_fakedamage id"rashing"cash/5.0,16384)
        }
        case 
4:{ 
            
fm_fakedamage id"rashing"cash/2.0,16384)
        }
        case 
5:{ 
            
fm_fakedamage id"rashing"cash/1.0,16384)
        }
    }
}

public 
free_the_man(id){
    
sounded[id]=0
    rasher
[id]=0
    flashed
[id]=0
    raszer
[id]=0
    
if(speed_limit[id]==1){
        
fm_set_user_maxspeed(id,(fm_get_user_maxspeed(id)*2.0))
        
speed_limit[id]=0
    
}
}


public 
free_the_world(){
    if(
round_start<1) return
    
round_start=0
    
new players[32],num 
    get_players
(players,num,"a")
    
//for(new i;i<num;i++){
        //free_the_man(players[i])
        //message_begin(MSG_ONE, get_user_msgid("SayText"), {0,0,0}, players[i])
        //write_byte(players[i])
        //write_string("^x04 *** RASH - OFF ***")
        //message_end()
    //}
    
client_print(0,print_chat,"%L",LANG_PLAYER,"AR_FREE_WORLD")
}

///////////////////////////////////////////////////////////////////////
/////////                 M_Antirusher Menu's                 /////////
///////////////////////////////////////////////////////////////////////

public amx_antirusher_menu(id){
    
menu_display(idmAntirushControlMenu0)
    return 
PLUGIN_HANDLED
}

public 
mh_AntirushControlMenu(idmenuitem) {
    switch(
item
    { 
        case 
0: {
            
showmenu(id)
        }
        case 
1: {
            
showmenu2(id)
        }
        case 
2: {
            
            
map_editor=id
            edit_g_team
=g_team
            transfer_zones
()
            
zones_edit=zones
            
if(zones>0zone_editing=1
            show_all_zones
()
            
remove_task(TASK_ZONE)
            
set_task(0.2"show_all_zones"TASK_ZONE__"b")
            
showmenu3(id)
        }
    }            
}

public 
ma_AntirushControlMenu(id) {}            // bo z generatora amxx studio
public mcb_AntirushControlMenu(idmenuitem) {}    // i usuniecie nie daje dobrych efektow...

public transfer_zones(){
    for(new 
i=0;i<MAX_ZONES*6;i++){
    
map_cors_edit[i]=map_cors_origin[i]
    }
}

public 
showmenu(id)
{
    new 
text[512
    new 
keys = (1<<0)|(1<<1)|(1<<2)|(1<<3)|(1<<4)|(1<<5)|(1<<6)|(1<<7)|(1<<8)
    new 
anti_on get_cvar_num("amx_antirusher")                //1
    
new anti_immu get_cvar_num("amx_antirusher_immunity")            //2
    
new Floatanti_time get_cvar_float("amx_antirusher_time")        //3
    
new anti_warn get_cvar_num("amx_antirusher_warn")            //4
    
new anti_sound get_cvar_num("amx_antirusher_sound")            //5
    
new anti_sound_mode get_cvar_num("amx_antirusher_sound_mode")        //6
    
new anti_zasady get_cvar_num("amx_antirusher_zasady")            //7
    
new people get_cvar_num("amx_antirusher_people")            //8
    
format(text511"\yAntirush Menu - ^n\w1. amx_antirusher %i^n\w2. amx_antirusher_immunity %i^n\w3. amx_antirusher_time %.f^n\w4. amx_antirusher_warn  %i^n\w5. amx_antirusher_sound %i^n\w6. amx_antirusher_sound_mode %i^n\w7. amx_antirusher_zasady %i^n\w8. amx_antirusher_people %i^n^n\w9. %L",anti_onanti_immuanti_timeanti_warnanti_soundanti_sound_mode,anti_zasady,people,LANG_SERVER,"EXIT"
    
    
show_menu(idkeystext
    return 
PLUGIN_HANDLED  



public 
Antirush_menu(idkey

    switch(
key
    { 
        case 
0:{    
            new 
anti_on get_cvar_num("amx_antirusher")
            if (
anti_on==0set_cvar_num("amx_antirusher",1)
            else 
set_cvar_num("amx_antirusher",0)
        }
        case 
1:{    
            new 
anti_immu get_cvar_num("amx_antirusher_immunity")
            if (
anti_immu==0set_cvar_num("amx_antirusher_immunity",1)
            else 
set_cvar_num("amx_antirusher_immunity",0)
        }
        case 
2:{    
            new 
Floatanti_time get_cvar_float("amx_antirusher_time")
            if (
anti_time < (get_cvar_float("mp_roundtime")*60.0)) anti_time += 5.0
            
else anti_time10.0
            set_cvar_float
("amx_antirusher_time",anti_time)
        }
        case 
3:{
            new 
anti_warn get_cvar_num("amx_antirusher_warn")
            if (
anti_warn==0set_cvar_num("amx_antirusher_warn",1)
            else 
set_cvar_num("amx_antirusher_warn",0)
        }
        case 
4:{
            new 
anti_sound get_cvar_num("amx_antirusher_sound")
            if (
anti_sound==0set_cvar_num("amx_antirusher_sound",1)
            else 
set_cvar_num("amx_antirusher_sound",0)
        }
        case 
5:{
            new 
anti_sound_mode get_cvar_num("amx_antirusher_sound_mode")
            if (
anti_sound_mode==0set_cvar_num("amx_antirusher_sound_mode",1)
            else 
set_cvar_num("amx_antirusher_sound_mode",0)
        }
        case 
6:{        
            new 
anti_zasady get_cvar_num("amx_antirusher_zasady")
            if (
anti_zasady==0set_cvar_num("amx_antirusher_zasady",1)
            else 
set_cvar_num("amx_antirusher_zasady",0)
        }
        case 
7:{        
            new 
people get_cvar_num("amx_antirusher_people")
            if (
people<16set_cvar_num("amx_antirusher_people",people+1)
            else 
set_cvar_num("amx_antirusher_people",0)
        }        
        case 
8:{
            
menu_display(idmAntirushControlMenu0)
            return 
PLUGIN_HANDLED
        
}        
    }
    
showmenu(id)
    return 
PLUGIN_HANDLED
}

public 
showmenu2(id)
{
    new 
keys
    
new text[512
    new 
anti_action get_cvar_num("amx_antirusher_action")                    
    new 
anti_cash get_cvar_num("amx_antirusher_cash")*10        
    
new anti_cash_end get_cvar_num("amx_antirusher_cash_end")                
    new 
Floatanti_freq get_cvar_float("amx_antirusher_freq")
    new 
anti_slap get_cvar_num("amx_antirusher_slap")*10
    
    
switch(anti_action)
    {
        case 
1
        {
            
format(text,511,"\yPunishment Menu - ^n\w1. amx_antirusher_action %i^n\w2. amx_antirusher_slap %i^n\w^n\w4. amx_antirusher_freq %.2f ^n\w ",anti_action,anti_slap,anti_freq)
            
keys = (1<<0)|(1<<1)|(1<<3)|(1<<8)
        }
        case 
10:
        {
            
format(text,511,"\yPunishment Menu - ^n\w1. amx_antirusher_action %i^n\w2. amx_antirusher_cash %i^n\w3. amx_antirusher_cash_end %i^n\w4. amx_antirusher_freq %.2f^n\w ",anti_actionanti_cashanti_cash_end,anti_freq)
            
keys = (1<<0)|(1<<1)|(1<<2)|(1<<3)|(1<<8)
        }
        default: 
        {
            
format(text,511,"\yPunishment Menu - ^n\w1. amx_antirusher_action %i^n\w ^n\w ^n\w4. amx_antirusher_freq %.2f^n\w ",anti_action,anti_freq)
            
keys = (1<<0)|(1<<3)|(1<<8)
        }
    }
    new 
text2[512]
    switch(
anti_action
    { 
        case 
0format(text2,511"^n\w %L ^n\w ^n\w9. %L",LANG_SERVER,"AR_ACTION_WARN",LANG_SERVER,"EXIT")
        case 
1format(text2,511"^n\w %L ^n\w ^n\w9. %L",LANG_SERVER,"AR_ACTION_HP",LANG_SERVER,"EXIT")
        case 
2format(text2,511"^n\w %L ^n\w ^n\w9. %L",LANG_SERVER,"AR_ACTION_KILL",LANG_SERVER,"EXIT")
        case 
3format(text2,511"^n\w %L ^n\w ^n\w9. %L",LANG_SERVER,"AR_ACTION_KICK",LANG_SERVER,"EXIT")
        case 
4format(text2,511"^n\w %L ^n\w ^n\w9. %L",LANG_SERVER,"AR_ACTION_BAN",LANG_SERVER,"EXIT")
        case 
5format(text2,511"^n\w %L ^n\w ^n\w9. %L",LANG_SERVER,"AR_ACTION_SLOW",LANG_SERVER,"EXIT")
        case 
6format(text2,511"^n\w %L ^n\w ^n\w9. %L",LANG_SERVER,"AR_ACTION_BLIND",LANG_SERVER,"EXIT")
        case 
7format(text2,511"^n\w %L ^n\w ^n\w9. %L",LANG_SERVER,"AR_ACTION_FFILD",LANG_SERVER,"EXIT")
        case 
8format(text2,511"^n\w %L ^n\w ^n\w9. %L",LANG_SERVER,"AR_ACTION_OFIRE",LANG_SERVER,"EXIT")
        case 
9format(text2,511"^n\w %L ^n\w ^n\w9. %L",LANG_SERVER,"AR_ACTION_BAIM",LANG_SERVER,"EXIT")
        case 
10:format(text2,511"^n\w %L ^n\w %L ^n\w9. %L",LANG_SERVER,"AR_ACTION_CASH",LANG_SERVER,"AR_ACTION_CASH2",LANG_SERVER,"EXIT")
        default:
format(text2,511"^n\w %L ^n\w ^n\w9. %L",LANG_SERVER,"AR_ACTION_NEW",LANG_SERVER,"EXIT")
    } 
    
add(text,511,text2)
    
show_menu(idkeystext)
    return 
PLUGIN_HANDLED  


public 
Punishment_menu(idkey

    new 
anti_action get_cvar_num("amx_antirusher_action")
    switch(
key
    { 
        case 
0
        {    
            if(
anti_action<10anti_action +=1
            
else anti_action=0
            set_cvar_num
("amx_antirusher_action",anti_action)
        }
        case 
1
        {    
            if(
anti_action==1)
            {
                new 
anti_slap get_cvar_num("amx_antirusher_slap")
                if(
anti_slap<10anti_slap +=1
                
else anti_slap=0
                set_cvar_num
("amx_antirusher_slap",anti_slap)
            }
            else if(
anti_action==10)
            {
                new 
anti_cash get_cvar_num("amx_antirusher_cash")
                if(
anti_cash<100anti_cash +=10
                
else if(anti_cash<500anti_cash +=25
                
else anti_cash=0
                set_cvar_num
("amx_antirusher_cash",anti_cash)
            }
        }
        case 
2
        {    
            new 
anti_cash_end get_cvar_num("amx_antirusher_cash_end")    
            if(
anti_cash_end<5anti_cash_end +=1
            
else anti_cash_end=0
            set_cvar_num
("amx_antirusher_cash_end",anti_cash_end)
        }
        case 
3
        {    
            new 
Floatanti_freq get_cvar_float("amx_antirusher_freq")    
            if(
anti_freq<1.0anti_freq +=0.100001 // ta jedynka na koncu bo zamiast wyswietalc 0.90000 wyswietlalo 0.89999 wiec dalem zaokraglenie do 0.xx i to na koniec :f
            
else if (anti_freq<8.0anti_freq +=0.5
            
else anti_freq=0.1
            set_cvar_float
("amx_antirusher_freq",anti_freq)
        }        
        case 
8:
        {
            
menu_display(idmAntirushControlMenu0)
            return 
PLUGIN_HANDLED
        
}        
    }
    
showmenu2(id)
    return 
PLUGIN_HANDLED
}

public 
showmenu3(id)
{
    
editign=0
    
new text[512
    new 
keys
    
if(zones_edit==0){
        
keys = (1<<0)|(1<<4)|(1<<6)|(1<<7)|(1<<8)
        
format(text511"\yAntirush Zone Creator - ^n^n\w%L: \r%i^n\w1.%L: %s ^n^n ^n^n^n\y5. %L ^n\r7. %L^n\w8. %L ^n\w9. %L",LANG_SERVER,"AR_ZONE_NUM",zones_edit,LANG_SERVER,"AR_ZONE_TEAM",edit_g_team,LANG_SERVER,"AR_ZONE_NEW",LANG_SERVER,"AR_ZONE_DEL",LANG_SERVER,"AR_ZONE_SAVE",LANG_SERVER,"EXIT"
    }
    else if(
zones_edit>0){
        
keys = (1<<0)|(1<<1)|(1<<2)|(1<<3)|(1<<4)|(1<<6)|(1<<7)|(1<<8)
        
format(text511"\yAntirush Zone Creator - ^n^n\w%L: \r%i^n\w1.%L: %s ^n^n\w2. %L \r%i^n      \w3. <- %L 4. -> %L^n^n\y5. %L ^n\r7. %L^n\w8. %L ^n\w9. %L",LANG_SERVER,"AR_ZONE_NUM",zones_edit,LANG_SERVER,"AR_ZONE_TEAM",edit_g_team,LANG_SERVER,"AR_ZONE_EDIT",zone_editing,LANG_SERVER,"BACK",LANG_SERVER,"MORE",LANG_SERVER,"AR_ZONE_NEW",LANG_SERVER,"AR_ZONE_DEL",LANG_SERVER,"AR_ZONE_SAVE",LANG_SERVER,"EXIT"
    }    
        
    
show_menu(idkeystext)
    return 
PLUGIN_HANDLED 



public 
Antirush_Zone_Creator(idkey

    if(
map_editor!=id){
        
showmenu(id)
        return 
PLUGIN_HANDLED
    
}
        
    switch(
key
    { 
        case 
0:{
            if (
equal(edit_g_team,"XX")) edit_g_team="CT"
            
else if (equal(edit_g_team,"CT")) edit_g_team="T"
            
else edit_g_team="XX"
        
}
        case 
1: {    
            
zone_incresment=10
            edit_zone
(id)
            return 
PLUGIN_HANDLED
        
}
        case 
2:{    
            if(
zone_editing>1zone_editing--
        }
        case 
3:{    
            if(
zone_editing<zones_editzone_editing++
        }
        case 
4:{
            if(
zones_edit<(MAX_ZONES)){
                
create_zone(id)
                
zone_editing=zones_edit
                zone_incresment
=10
                edit_zone
(id)
                return 
PLUGIN_HANDLED
            
}
            else{
                
client_print(idprint_chat,"%L",LANG_SERVER,"AR_ZONE_MAX")
            }
        }
        case 
6:{
            if(
zone_editing>0){
                
menu_display(idmUsuwaniestrefy0)
                return 
PLUGIN_HANDLED
            
}
            else 
client_print(idprint_chat,"%L",LANG_SERVER,"AR_ZONE_ZERO")
        }

        case 
7:{
            
menu_display(idmZapisacstrefy0)
            return 
PLUGIN_HANDLED
        
}
        case 
8:{
            
amx_antirusher_menu(id)
            
remove_task(TASK_ZONE)
            return 
PLUGIN_HANDLED
        
}        
    }
    
showmenu3(id)
    return 
PLUGIN_HANDLED
}

public 
create_zone(id){
    new 
origins[3]
    
get_user_origin(id,origins,0)
    
map_cors_edit[0+zones_edit*6]=origins[0]-32
    map_cors_edit
[1+zones_edit*6]=origins[0]+32
    map_cors_edit
[2+zones_edit*6]=origins[1]-32
    map_cors_edit
[3+zones_edit*6]=origins[1]+32
    map_cors_edit
[4+zones_edit*6]=origins[2]-32
    map_cors_edit
[5+zones_edit*6]=origins[2]+32
    zones_edit
++
}


public 
mh_Zapisacstrefy(idmenuitem) {
    if(
item==0){
        
remove_task(TASK_ZONE)
        
amx_antirusher_menu(id)
        
map_cors_origin=map_cors_edit
        zones
=zones_edit
        g_team
=edit_g_team
        
if(zones>0map_cors_pre=1
        
else map_cors_pre=0
        write_to_file
()
    }
    else if(
item==1showmenu3(id)
}

public 
ma_Zapisacstrefy(id) {}
public 
mcb_Zapisacstrefy(idmenuitem) {}


public 
mh_Usuwaniestrefy(idmenuitem) {
    if(
item==0){
        
amx_antirusher_menu(id)
        
delete_zone(zone_editing)
        if((
zone_editing-1)>=(zones_edit-1)) zone_editing zones_edit-1
        zones_edit
--
        
showmenu3(id)
    }
    else if(
item==1showmenu3(id)
}

public 
ma_Usuwaniestrefy(id) {}
public 
mcb_Usuwaniestrefy(idmenuitem) {}

public 
delete_zone(zone_num){
    new 
x_num=zone_num-1
    
while(x_num<(MAX_ZONES-1)){
        
map_cors_edit[0+x_num*6]=map_cors_edit[6+x_num*6]
        
map_cors_edit[1+x_num*6]=map_cors_edit[7+x_num*6]
        
map_cors_edit[2+x_num*6]=map_cors_edit[8+x_num*6]
        
map_cors_edit[3+x_num*6]=map_cors_edit[9+x_num*6]
        
map_cors_edit[4+x_num*6]=map_cors_edit[10+x_num*6]
        
map_cors_edit[5+x_num*6]=map_cors_edit[11+x_num*6]
        
x_num++
    }
}

public 
edit_zone(id){
    
editign=1
    
new text[512
    new 
keys= (1<<0)|(1<<1)|(1<<2)|(1<<3)|(1<<4)|(1<<6)|(1<<8)
    
format(text511"\yEdit Zone - ^n^n\w1. %L: %s ^n\r    2.<- %L  3.-> %L^n\y    4.<- %L  5.-> %L^n  ^n\w7. %L: %i ^n\w9. %L",LANG_SERVER,"AR_EDIT_COOR",zone_coords[zone_coords_num],LANG_SERVER,"BACK",LANG_SERVER,"MORE",LANG_SERVER,"BACK",LANG_SERVER,"MORE",LANG_SERVER,"AR_EDIT_CHANG",zone_incresment,LANG_SERVER,"EXIT")     
        
    
show_menu(idkeystext)
    return 
PLUGIN_HANDLED 


public 
edit_zone2(idkey){     
    switch(
key){ 
        case 
0:{    
            if(
zone_coords_num<2)zone_coords_num++
            else 
zone_coords_num=0
        
}
        case 
1:{    
            if((
map_cors_edit[zone_coords_num*2+(zone_editing-1)*6]+zone_incresment)<(map_cors_edit[zone_coords_num*2+(zone_editing-1)*6+1]-32)) map_cors_edit[zone_coords_num*2+(zone_editing-1)*6]+=zone_incresment
        
}
        case 
2:{    
            if((
map_cors_edit[zone_coords_num*2+(zone_editing-1)*6]-zone_incresment)>-8191map_cors_edit[zone_coords_num*2+(zone_editing-1)*6]-=zone_incresment
        
}
        case 
3:{
            if((
map_cors_edit[zone_coords_num*2+(zone_editing-1)*6+1]-zone_incresment)>(map_cors_edit[zone_coords_num*2+(zone_editing-1)*6]+32)) map_cors_edit[zone_coords_num*2+(zone_editing-1)*6+1]-=zone_incresment
        
}
        case 
4:{    
            if((
map_cors_edit[zone_coords_num*2+(zone_editing-1)*6+1]+zone_incresment)<8191map_cors_edit[zone_coords_num*2+(zone_editing-1)*6+1]+=zone_incresment
        
}
        case 
6:{
            if(
zone_incresment<1000)zone_incresment*=10
            
else zone_incresment=1
        
}
        case 
8:{
            
showmenu3(id)
            return 
PLUGIN_HANDLED
        
}        
    }
    
edit_zone(id)
    return 
PLUGIN_HANDLED
}

//////////////////////////////////////////////////////////////////////////
/////////                 M_Antirusher Draw Lines                /////////
//////////////////////////////////////////////////////////////////////////

public FX_Line(start[3], stop[3], color[3], brightnessid) {
    
message_begin(MSG_ONE_UNRELIABLESVC_TEMPENTITY_id
    
    
write_byteTE_BEAMPOINTS 
    
    
write_coord(start[0]) 
    
write_coord(start[1])
    
write_coord(start[2])
    
    
write_coord(stop[0])
    
write_coord(stop[1])
    
write_coord(stop[2])
    
    
write_shortspr_dot )
    
    
write_byte)    // framestart 
    
write_byte)    // framerate 
    
write_byte)    // life in 0.1's 
    
write_byte)    // width
    
write_byte)     // noise 
    
    
write_bytecolor[0] )   // r, g, b 
    
write_bytecolor[1] )   // r, g, b 
    
write_bytecolor[2] )   // r, g, b 
    
    
write_bytebrightness )      // brightness 
    
write_byte)       // speed 
    
    
message_end() 
}

public 
DrawLine(x1y1z1x2y2z2color[3],id) {
    new 
start[3]
    new 
stop[3]
    
    
start[0] = ( x1 )
    
start[1] = ( y1 )
    
start[2] = ( z1 )
    
    
stop[0] = ( x2 )
    
stop[1] = ( y2 )
    
stop[2] = ( z2 )

    
FX_Line(startstopcolor200id)
}

public 
ar_zone(zone_num,id){
    new 
start[3],stop[3]
    new 
xyz=0
    
if(zone_editing==zone_numxyz=1
    
    zone_num
=(zone_num-1)*6

    start
[0]= map_cors_edit[0+zone_num]
    
start[1]= map_cors_edit[2+zone_num]
    
start[2]= map_cors_edit[4+zone_num]
    
    
stop[0]= map_cors_edit[1+zone_num]
    
stop[1]= map_cors_edit[3+zone_num]
    
stop[2]= map_cors_edit[5+zone_num]
    
    
ShowZoneBox(startstopid,xyz)
}

public 
ShowZoneBox(mins[3], maxs[3], id,xyz) {
        
    
DrawLine(maxs[0], maxs[1], maxs[2], mins[0], maxs[1], maxs[2], zone_color_aktivid)
    
DrawLine(maxs[0], maxs[1], maxs[2], maxs[0], mins[1], maxs[2], zone_color_aktivid)
    
DrawLine(maxs[0], maxs[1], maxs[2], maxs[0], maxs[1], mins[2], zone_color_aktivid)

    
DrawLine(mins[0], mins[1], mins[2], maxs[0], mins[1], mins[2], zone_color_aktivid)
    
DrawLine(mins[0], mins[1], mins[2], mins[0], maxs[1], mins[2], zone_color_aktivid)
    
DrawLine(mins[0], mins[1], mins[2], mins[0], mins[1], maxs[2], zone_color_aktivid)

    
DrawLine(mins[0], maxs[1], maxs[2], mins[0], maxs[1], mins[2], zone_color_aktivid)
    
DrawLine(mins[0], maxs[1], mins[2], maxs[0], maxs[1], mins[2], zone_color_aktivid)
    
DrawLine(maxs[0], maxs[1], mins[2], maxs[0], mins[1], mins[2], zone_color_aktivid)
    
DrawLine(maxs[0], mins[1], mins[2], maxs[0], mins[1], maxs[2], zone_color_aktivid)
    
DrawLine(maxs[0], mins[1], maxs[2], mins[0], mins[1], maxs[2], zone_color_aktivid)
    
DrawLine(mins[0], mins[1], maxs[2], mins[0], maxs[1], maxs[2], zone_color_aktivid)
    
    if((
xyz==1)&&(editign==1)){
        if(
zone_coords_num==0){
            
DrawLine(maxs[0], maxs[1], maxs[2], maxs[0], mins[1], mins[2], zone_color_yellowid)
            
DrawLine(maxs[0], maxs[1], mins[2], maxs[0], mins[1], maxs[2], zone_color_yellowid)
            
DrawLine(mins[0], maxs[1], maxs[2], mins[0], mins[1], mins[2], zone_color_redid)
            
DrawLine(mins[0], maxs[1], mins[2], mins[0], mins[1], maxs[2], zone_color_redid)
        }
        else if( 
zone_coords_num==1){
            
DrawLine(mins[0], mins[1], mins[2], maxs[0], mins[1], maxs[2], zone_color_redid)
            
DrawLine(maxs[0], mins[1], mins[2], mins[0], mins[1], maxs[2], zone_color_redid)
            
DrawLine(mins[0], maxs[1], mins[2], maxs[0], maxs[1], maxs[2], zone_color_yellowid)
            
DrawLine(maxs[0], maxs[1], mins[2], mins[0], maxs[1], maxs[2], zone_color_yellowid)
        }
        else{
            
DrawLine(maxs[0], maxs[1], maxs[2], mins[0], mins[1], maxs[2], zone_color_yellowid)
            
DrawLine(maxs[0], mins[1], maxs[2], mins[0], maxs[1], maxs[2], zone_color_yellowid)
            
DrawLine(maxs[0], maxs[1], mins[2], mins[0], mins[1], mins[2], zone_color_redid)
            
DrawLine(maxs[0], mins[1], mins[2], mins[0], maxs[1], mins[2], zone_color_redid)
        }
    }
}

public 
show_all_zones(){
    new 
num=1
    
while(num<=zones_edit){
        
ar_zone(num,map_editor)
        
num++
    }
    if(
zone_editing>0){
        new 
origins[3], origins2[3]
        
get_user_origin(map_editor,origins)
        new 
Floatrange_line
        
new Floatrange_origins[6]
        for(new 
i=0;i<6;i++) range_origins[i] = (map_cors_edit[i+6*(zone_editing-1)])*1.0
        range_line
floatsqroot(((range_origins[1]-range_origins[0])/2.0-origins[0])*((range_origins[1]-range_origins[0])/2.0-origins[0])+((range_origins[3]-range_origins[2])/2.0-origins[1])*((range_origins[3]-range_origins[2])/2.0-origins[1])+((range_origins[5]-range_origins[4])/2.0-origins[2])*((range_origins[5]-range_origins[4])/2.0-origins[2]))
        if(
range_line>20000) for(new i=0;i<3;i++){
            
origins2[i]=((map_cors_edit[i*2+6*(zone_editing-1)] + map_cors_edit[i*2+1+6*(zone_editing-1)])/2)/6
        
}
        else if(
range_line>15000) for(new i=0;i<3;i++){
            
origins2[i]=((map_cors_edit[i*2+6*(zone_editing-1)] + map_cors_edit[i*2+1+6*(zone_editing-1)])/2)/5
        
}
        else if(
range_line>10000) for(new i=0;i<3;i++){
            
origins2[i]=((map_cors_edit[i*2+6*(zone_editing-1)] + map_cors_edit[i*2+1+6*(zone_editing-1)])/2)/3
        
}
        else for(new 
i=0;i<3;i++){
            
origins2[i]=((map_cors_edit[i*2+6*(zone_editing-1)] + map_cors_edit[i*2+1+6*(zone_editing-1)])/2)
        }
        
FX_Line(originsorigins2zone_color_red,200,map_editor)
    }
}

public 
zone_warn(id,zone,direction,origins[3]){
    new 
start[3],stop[3]
    
start[2]=origins[2]-110
    stop
[2]=origins[2]-110
    
    
switch(direction){
        case 
0:{
            
start[0]=map_cors_origin[zone*6]+5
            stop
[0]=map_cors_origin[zone*6]+5
            start
[1]=map_cors_origin[zone*6+2]
            
stop[1]=map_cors_origin[zone*6+3]
        }
        case 
1:{
            
start[0]=map_cors_origin[zone*6+1]-5
            stop
[0]=map_cors_origin[zone*6+1]-5
            start
[1]=map_cors_origin[zone*6+2]
            
stop[1]=map_cors_origin[zone*6+3]
        }
        case 
2:{
            
start[0]=map_cors_origin[zone*6+0]
            
stop[0]=map_cors_origin[zone*6+1]
            
start[1]=map_cors_origin[zone*6+2]+5
            stop
[1]=map_cors_origin[zone*6+2]+5
        
}
        case 
3:{
            
start[0]=map_cors_origin[zone*6+0]
            
stop[0]=map_cors_origin[zone*6+1]
            
start[1]=map_cors_origin[zone*6+3]-5
            stop
[1]=map_cors_origin[zone*6+3]-5
        
}
    }
    for(new 
i=0;i<9;i++){
        
start[2]+=30
        stop
[2]+=30
        FX_Line
(startstopzone_color_red60id)
    }
}

///////////////////////////////////////////////////////////////////////////
/////////                 M_Antirusher Save to file               /////////
///////////////////////////////////////////////////////////////////////////

public write_to_file(){
    new 
text[512],text2[64]
    new 
currentmap[32]
    
get_mapname(currentmap,31)
    
format(text,511,"%s %s "g_teamcurrentmap)
    new 
x0[6],x1[6],y0[6],y1[6],z0[6],z1[6]
    for(new 
i=0;i<zones;i++){
        
num_to_str(map_cors_origin[0+i*6],x0,5)
        
num_to_str(map_cors_origin[1+i*6],x1,5)
        
num_to_str(map_cors_origin[2+i*6],y0,5)
        
num_to_str(map_cors_origin[3+i*6],y1,5)
        
num_to_str(map_cors_origin[4+i*6],z0,5)
        
num_to_str(map_cors_origin[5+i*6],z1,5)
        
format(text2,63,"%s %s %s %s %s %s ",x0,x1,y0,y1,z0,z1)
        
add(text,511,text2)
    }
    
    if(
is_linux_server()){
        new 
zonefile[256]
        
get_localinfo("amxx_configsdir",zonefile255);
        
format(zonefile255"%s/antirusher/rush.cor"zonefile)
        if((
write_file zonefiletextmap_cors_file_line ))==0log_amx("<<Blad przy nadpisywaniu rush.cor>>")        
    }
    else{    
        if((
write_file "addons\amxmodx\configs\antirusher\rush.cor"textmap_cors_file_line ))==0log_amx("<<Blad przy nadpisywaniu rush.cor>>")
    }
}


// Stocks, ported by xPaw
stock fm_create_entity(const classname[])
    return 
engfunc(EngFunc_CreateNamedEntityengfunc(EngFunc_AllocStringclassname))

stock fm_fake_touch(touchertouched)
    return 
dllfunc(DLLFunc_Touchtouchertouched)

stock fm_remove_entity(index)
    return 
engfunc(EngFunc_RemoveEntityindex)

stock fm_DispatchSpawn(entity)
    return 
dllfunc(DLLFunc_Spawnentity)

stock fm_set_kvd(entity, const key[], const value[], const classname[] = "") {
    if (
classname[0])
        
set_kvd(0KV_ClassNameclassname)
    else {
        new class[
32]
        
pev(entitypev_classname, class, sizeof class - 1)
        
set_kvd(0KV_ClassName, class)
    }

    
set_kvd(0KV_KeyNamekey)
    
set_kvd(0KV_Valuevalue)
    
set_kvd(0KV_fHandled0)

    return 
dllfunc(DLLFunc_KeyValueentity0)
}

stock fm_fakedamage(victim, const classname[], Float:takedmgdamagedamagetype) {
    new class[] = 
"trigger_hurt"
    
new entity fm_create_entity(class)
    if (!
entity)
        return 
0

    
new value[16]
    
float_to_str(takedmgdamage 2valuesizeof value 1)
    
fm_set_kvd(entity"dmg"value, class)

    
num_to_str(damagetypevaluesizeof value 1)
    
fm_set_kvd(entity"damagetype"value, class)

    
fm_set_kvd(entity"origin""8192 8192 8192", class)
    
fm_DispatchSpawn(entity)

    
set_pev(entitypev_classnameclassname)
    
fm_fake_touch(entityvictim)
    
fm_remove_entity(entity)

    return 
1
}

stock fm_set_user_maxspeed(indexFloat:speed = -1.0) {
    
engfunc(EngFunc_SetClientMaxspeedindexspeed)
    
set_pev(indexpev_maxspeedspeed)

    return 
1
}

stock Float:fm_get_user_maxspeed(index) {
    new 
Float:speed
    pev
(indexpev_maxspeedspeed)

    return 
speed


and this is where I made it simple

PHP Code:

#include <amxmodx>
#include <cstrike>
#include <fakemeta>

new Float:TEST_TIME=1.0
new Float:WARN_TIME=1.0

#define MAX_ZONES 8
new MIN_PLAYERS=2        /*Dobre do testowania w mniej osob
                  lub gdy chcesz by koniec rashu byl
                  przy wiekszej liczbbie osob*/
#define TASK_ZONE 600743
#define TASK_LOOP 500743
#define TASK_VIEW 400743
#define TASK_INFO 300743
#define TASK_FLASH 200743


new map_cors_edit[MAX_ZONES*6]
new 
zones_edit
new zone_editing=0
new map_editor
new map_cors_file_line=127
new zone_coords_num=0
new editign=0
new round_start=0
new lines

new rasher[33]=0
new raszer[33]
new 
sounded[33]=0
new speed_limit[33]=0
new Float:g_time
new g_team[3]
new 
g_origin[3]
new 
map_cors_pre=2
new map_cors_origin[MAX_ZONES*6]
new 
warn_control // miczu
new zones 0
new zone_color_aktiv[3] = { 00255 }
new 
zone_color_red[3] = { 2550}
new 
zone_color_yellow[3] = { 255255}
new 
spr_dot

new actions[11][32] = { "barney/donthurtem.wav","nihilanth/nil_now_die.wav","hgrunt/c2a3_hg_laugh.wav","hgrunt/silence!.wav","hgrunt/silence!.wav","barney/whatsgoingon.wav","barney/rightway.wav","barney/nosir.wav","barney/openfire.wav","barney/stophere.wav","hgrunt/c2a2_hg_chat5a.wav"}
                    
new 
g_punish[32][3]
new 
g_twin=0
new g_ctwin=0
new g_num=0
                    
public plugin_init()
{    
    
register_plugin("M_AntiRusher","2.6","Miczu")
    
log_amx(" <<Uruchomiono M_Antirusher 2.6>>")
        
    
register_dictionary("M_antirusher.txt")
    
register_dictionary("common.txt")
    
    
register_clcmd("say /rules","info")
    
register_clcmd("say /zasadymapy","info")
    
register_clcmd("amx_antirusher_menu","amx_antirusher_menu")
    
register_cvar("xPaw""AR 2.6",FCVAR_SERVER)
    
register_cvar("amx_antirusher","0")            
    
register_cvar("amx_antirusher_sound","1")        
    
register_cvar("amx_antirusher_sound_mode","0")
    
register_cvar("amx_antirusher_warn","1")
    
register_cvar("amx_antirusher_time","60.0")        
    
register_cvar("amx_antirusher_freq","1.0")
    
register_cvar("amx_antirusher_immunity","0")    
    
register_cvar("amx_antirusher_people","2")
    
    
register_event("HLTV","Event_StartRound","a","1=0","2=0")
    
register_event("RoundTime","event_roundtime","bc")
    
register_event("SendAudio""bomb_planted""a""2&%!MRAD_BOMBPL")
    
register_event("DeathMsg","DeathMsg","ade"
    
register_event("CurWeapon","CurWeapon","be"
    
    
map_cors_pre map_cors_present(map_cors_origin,g_team)
    
TEST_TIME=get_cvar_float("amx_antirusher_freq")
    
    
register_forward(FM_PlayerPreThink,    "fwdPlayerPreThink");    // client_PreThink
    
    
register_logevent("Team_Win"6"0=Team")
    
set_cvar_num("amx_antirusher",0)
    
server_cmd("exec addons/amxmodx/configs/antirusher/cvars.cfg")
    
}

public 
plugin_precache() {
    
spr_dot precache_model("sprites/dot.spr"// potrzebne do robienia lini
}


public 
Team_Win()
{
    
set_cvar_num("amx_antirusher",0)
    static 
szTeam[10]

    
read_logargv(1szTeam9)


    if(
szTeam[0] == 'T')
    {
        
g_twin+=1
    
}
    else
    {
        
g_ctwin+=1
    
}
    if(
g_ctwin-g_twin>=10)
       {
       
set_cvar_num("amx_antirusher",1)
       
server_cmd("amx_say CT STATI LA X , T PLANT IT...NO RUSH ALLOWED")
      }
    



///////////////////////////////////////////////////////////////////////
/////////                M_Antirusher  Events                 /////////
////////////////////////////////////////////////////////////////////////
 
 
public client_connect(id){
    
g_punish[g_num][0]=id
    g_punish
[g_num][1]=0
    g_punish
[g_num][2]=get_timeleft()
    
g_num+=1
    free_the_man
(id)        //1.nie chcemy by ktos kto sie polaczy byl karany
}                    //kiedy osoba co opuszczajac serwer miala kare
                    //czyli gdy stary i nowy gracz beda mieli te same id

public client_disconnect(id) {
    new 
i,ok=0
    
for(i=0;i<g_num&&(!ok);i++)
      if(
g_punish[i][0]==idok=1
    
new j=i
    
for(i=j;i<g_num-1;i++)
        
g_punish[i][0]=g_punish[i+1][0]
    
g_num-=1
    free_the_man
(id)        //2.tak na wszelki wypadek, ale mozna sobie odpuscic
    
return PLUGIN_CONTINUE
}

public 
Event_StartRound(){
    
round_start++                
    
MIN_PLAYERS get_cvar_num("amx_antirusher_people")    // zmiana people dziala na starcie rundy
}

public 
client_putinserver(id){         //tu informacja o rashu
    
new arg[1]             //Zoptymalizowane uzycie set_task
    
arg[0]=id            //Deklaracja 1 kumurki pamieci zamiast 4 i bez zmian z str-> num i na odwrot
        
    
if (map_cors_pre && get_cvar_num("amx_antirusher"))
        
set_task(45.0,"informclient",TASK_INFO+id,arg,1


public 
bomb_planted() {            //podlozono bombe
    
remove_task(TASK_LOOP)        //przerywa sprawdzanie rashu
    
remove_task(TASK_VIEW)        //przerywa wyswietlanie granic dla userow    
    
free_the_world()        //mozna rashowac
}

public 
event_roundtime() {
    if (
round_start<1) return PLUGIN_CONTINUE     //takie zabezpieczenie by nie sprawdzalo po czasie rashu
    
if (map_cors_pre && get_cvar_num("amx_antirusher")) {        
        
remove_task(TASK_LOOP)
        
remove_task(TASK_VIEW)
        
g_time get_gametime() + get_cvar_float("amx_antirusher_time")
        
set_task(2*TEST_TIME"checkOrigin",TASK_LOOP)
        
set_task(2*WARN_TIME"rash_warn",TASK_VIEW)

    }
    return 
PLUGIN_CONTINUE
}                    //

public DeathMsg(){
    new 
vid read_data(2)        //id trupa
    
free_the_man(vid)        //uwalnia trupa by zaczol runde z czystym kontem
}

//////////////////////////////////////////////////////////////////////
/////////                M_Antirusher Things                 /////////
//////////////////////////////////////////////////////////////////////

map_cors_present(maporigin[MAX_ZONES*6],team[3]) {
    
    new 
zonefile[256],zonefile2[256]

    
get_localinfo("amxx_configsdir",zonefile255);
    
    if(
is_linux_server()){
        
format(zonefile2255"%s/antirusher"zonefile)
        if(!(
dir_exists(zonefile2))) mkdir (zonefile2)
        
format(zonefile2255"%s/antirusher/rush.cor"zonefile)
    }
    else{
        
format(zonefile2255"%s\antirusher"zonefile)
        if(!(
dir_exists(zonefile2))) mkdir (zonefile2)
        
format(zonefile2255"%s\antirusher\rush.cor"zonefile)
    }
    
    if (
file_exists(zonefile2)){    
        
        new 
readdata[512]
        new 
currentmap[32]
        
get_mapname(currentmap,31)
        new 
map[32], len 
        
new x11[16],x12[16],y11[16],y12[16],z11[16],z12[16]
        new 
x21[16],x22[16],y21[16],y22[16],z21[16],z22[16]
        new 
x31[16],x32[16],y31[16],y32[16],z31[16],z32[16]
        new 
x41[16],x42[16],y41[16],y42[16],z41[16],z42[16]
        new 
x51[16],x52[16],y51[16],y52[16],z51[16],z52[16]
        new 
x61[16],x62[16],y61[16],y62[16],z61[16],z62[16]
        new 
x71[16],x72[16],y71[16],y72[16],z71[16],z72[16]
        new 
x81[16],x82[16],y81[16],y82[16],z81[16],z82[16]
        
        
        for(new 
i=0128 && read_file(zonefile2,i,readdata,511,len); i++) {
            
x11="";x12="";y11="";y12="";z11="";z12=""
            
x21="";x22="";y21="";y22="";z21="";z22=""
            
x31="";x32="";y31="";y32="";z31="";z32=""
            
x41="";x42="";y41="";y42="";z41="";z42=""
            
x51="";x52="";y51="";y52="";z51="";z52=""
            
x61="";x62="";y61="";y62="";z61="";z62=""
            
parse(readdata,team,2,map,31,x11,15,x12,15,y11,15,y12,15,z11,15,z12,15,
                
x21,15,x22,15,y21,15,y22,15,z21,15,z22,15,
                
x31,15,x32,15,y31,15,y32,15,z31,15,z32,15,
                
x41,15,x42,15,y41,15,y42,15,z41,15,z42,15,
                
x51,15,x52,15,y51,15,y52,15,z51,15,z52,15,
                
x61,15,x62,15,y61,15,y62,15,z61,15,z62,15,
                
x71,15,x72,15,y71,15,y72,15,z71,15,z72,15,
                
x81,15,x82,15,y81,15,y82,15,z81,15,z82,15)
            
lines=i
            
if(equal(map,currentmap)) {
                
maporigin[0] = str_to_num(x11)
                
maporigin[1] = str_to_num(x12)
                
maporigin[2] = str_to_num(y11)
                
maporigin[3] = str_to_num(y12)
                
maporigin[4] = str_to_num(z11)
                
maporigin[5] = str_to_num(z12)
                
maporigin[6] = str_to_num(x21)
                
maporigin[7] = str_to_num(x22)
                
maporigin[8] = str_to_num(y21)
                
maporigin[9] = str_to_num(y22)
                
maporigin[10] = str_to_num(z21)
                
maporigin[11] = str_to_num(z22)
                
maporigin[12] = str_to_num(x31)
                
maporigin[13] = str_to_num(x32)
                
maporigin[14] = str_to_num(y31)
                
maporigin[15] = str_to_num(y32)
                
maporigin[16] = str_to_num(z31)
                
maporigin[17] = str_to_num(z32)
                
maporigin[18] = str_to_num(x41)
                
maporigin[19] = str_to_num(x42)
                
maporigin[20] = str_to_num(y41)
                
maporigin[21] = str_to_num(y42)
                
maporigin[22] = str_to_num(z41)
                
maporigin[23] = str_to_num(z42)
                
maporigin[24] = str_to_num(x51)
                
maporigin[25] = str_to_num(x52)
                
maporigin[26] = str_to_num(y51)
                
maporigin[27] = str_to_num(y52)
                
maporigin[28] = str_to_num(z51)
                
maporigin[29] = str_to_num(z52)
                
maporigin[30] = str_to_num(x61)
                
maporigin[31] = str_to_num(x62)
                
maporigin[32] = str_to_num(y61)
                
maporigin[33] = str_to_num(y62)
                
maporigin[34] = str_to_num(z61)
                
maporigin[35] = str_to_num(z62)
                
maporigin[36] = str_to_num(x71)
                
maporigin[37] = str_to_num(x72)
                
maporigin[38] = str_to_num(y71)
                
maporigin[39] = str_to_num(y72)
                
maporigin[40] = str_to_num(z71)
                
maporigin[41] = str_to_num(z72)
                
maporigin[42] = str_to_num(x81)
                
maporigin[43] = str_to_num(x82)
                
maporigin[44] = str_to_num(y81)
                
maporigin[45] = str_to_num(y82)
                
maporigin[46] = str_to_num(z81)
                
maporigin[47] = str_to_num(z82)
                
                
map_cors_file_line=i
                
for(new j=0;j<MAX_ZONES;j++){
                    
i=j*6
                    
if(((maporigin[1+i]-maporigin[0+i])>0)&&((maporigin[3+i]-maporigin[2+i])>0)&&((maporigin[5+i]-maporigin[4+i])>0))
                    
zones++
                }
                
                return 
1
            
}
            if((
len<15)  && (map_cors_file_line>i)) map_cors_file_line=i
        
}
        
log_amx("%L",LANG_SERVER,"AR_NO_ZONE")
        if(
lines+2<map_cors_file_linemap_cors_file_line=lines+2    //5. zapobiega zapisywaniu na 127 pozycji gdy nie ma wolnych lini na koncu :)
        
return 0
    
}
    else 
log_amx("%L",LANG_SERVER,"AR_NO_FILE")
    
g_team="XX"
    
map_cors_file_line=0            //6. nie ma pluku rush,cor wiec niech zapisze w pierwszej lini
    
return 0
}


public 
info(id){
    new 
anti_zasady get_cvar_num("amx_antirusher_zasady")
    if(
anti_zasady==1){
        new 
map[4]
        
get_mapname(map,3)        // rozpoznawanie typu mapy na podstawie pierwszych 3 liter :p
        
        
if (equal(map,"cs_")) client_print(id,print_chat"%L",LANG_PLAYER,"AR_CS_MAP")
        else if (
equal(map,"de_")) client_print(id,print_chat"%L",LANG_PLAYER,"AR_DE_MAP")
        else if (
equal(map,"fy_")) client_print(id,print_chat"%L",LANG_PLAYER,"AR_FY_MAP")
        else if (
equal(map,"aim")) client_print(id,print_chat"%L",LANG_PLAYER,"AR_AIM_MAP")
        else if (
equal(map,"awp")) client_print(id,print_chat"%L",LANG_PLAYER,"AR_AWP_MAP")
        else if (
equal(map,"kz_")) client_print(id,print_chat"%L",LANG_PLAYER,"AR_KZ_MAP")
        else if (
equal(map,"fun")) client_print(id,print_chat"%L",LANG_PLAYER,"AR_FUN_MAP")
        else if (
equal(map,"sur")) client_print(id,print_chat"%L",LANG_PLAYER,"AR_SURF_MAP")
        else if (
equal(map,"sj_")) client_print(id,print_chat"%L",LANG_PLAYER,"AR_SJ_MAP")
        else if (
equal(map,"ka_")) client_print(id,print_chat"%L",LANG_PLAYER,"AR_KA_MAP")
        else if (
equal(map,"he_")) client_print(id,print_chat"%L",LANG_PLAYER,"AR_HE_MAP")
    }
}

public 
informclient(arg[1]){ 
                    
// arg[0] to id ^^
    
if(is_user_connected(arg[0])) {    // spradza czy gracz nadal jest na serwie
        
client_print(arg[0],print_chat,"%L",LANG_PLAYER,"AR_INFO_WARN")
        
client_print(arg[0],print_chat,"%L",LANG_PLAYER,"AR_INFO_CLIENT",get_cvar_float("amx_antirusher_time")) 
    }
}


public 
checkOrigin() {             // tu sprawdza czy rashujesz
    
    
if (round_start<1) return
    if (
get_gametime() > g_time)
    {
        
free_the_world()
        return
    }
    
    new 
players[32], num,tt_num,ct_num
    get_players
(players,num)
    
    for(new 
i=0;i<num;i++)
    {
        if(
is_user_alive(players[i]))
        {
            if(
cs_get_user_team(players[i])==CS_TEAM_Ttt_num++
            else if(
cs_get_user_team(players[i])==CS_TEAM_CTct_num++
        }
    }
    
    if (
tt_num<MIN_PLAYERS)
    {
        
free_the_world()
        return
    }
    if (
ct_num<MIN_PLAYERS)
    {
        
free_the_world()
        return
    }
    
    
    
get_players(players,num)
    
set_task(TEST_TIME"checkOrigin"TASK_LOOP)
    for(new 
0numi++) 
    {
        if(
is_user_alive(players[i]))
        {
            if((
equal(g_team,"T")&&(cs_get_user_team(players[i])==CS_TEAM_T))||(equal(g_team,"CT")&&(cs_get_user_team(players[i])==CS_TEAM_CT))||equal(g_team,"XX"))
            {    
                
get_user_origin(players[i],g_origin)
                if ((
map_cors_origin[0] < g_origin[0] < map_cors_origin[1]) && (map_cors_origin[2] < g_origin[1] < map_cors_origin[3]) && (map_cors_origin[4] < g_origin[2] < map_cors_origin[5]) ||
                    (
map_cors_origin[6] < g_origin[0] < map_cors_origin[7]) && (map_cors_origin[8] < g_origin[1] < map_cors_origin[9]) && (map_cors_origin[10] < g_origin[2] < map_cors_origin[11]) ||
                    (
map_cors_origin[12] < g_origin[0] < map_cors_origin[13]) && (map_cors_origin[14] < g_origin[1] < map_cors_origin[15]) && (map_cors_origin[16] < g_origin[2] < map_cors_origin[17]) ||
                    (
map_cors_origin[18] < g_origin[0] < map_cors_origin[19]) && (map_cors_origin[20] < g_origin[1] < map_cors_origin[21]) && (map_cors_origin[22] < g_origin[2] < map_cors_origin[23]) ||
                    (
map_cors_origin[24] < g_origin[0] < map_cors_origin[25]) && (map_cors_origin[26] < g_origin[1] < map_cors_origin[27]) && (map_cors_origin[28] < g_origin[2] < map_cors_origin[29]) ||
                    (
map_cors_origin[30] < g_origin[0] < map_cors_origin[31]) && (map_cors_origin[32] < g_origin[1] < map_cors_origin[33]) && (map_cors_origin[34] < g_origin[2] < map_cors_origin[35])){
                    
punishPlayer(players[i])
                    
raszer[players[i]]=1
                
}
                else{
                    
free_the_man(players[i])
                }
            }
        }
    }
}


public 
rash_warn(){                //7. tu sprawsza czy ma ci wyswietlic granice rashu
    
if (get_gametime() > g_time){
        return
    }
    if (
get_cvar_num("amx_antirusher_warn")==0) return
    new 
players[32], numtt_numct_num
    get_players
(players,num)
    
    for(new 
i=0;i<num;i++)
    {
        if(
is_user_alive(players[i]))
        {
            if(
cs_get_user_team(players[i])==CS_TEAM_Ttt_num++
            else if(
cs_get_user_team(players[i])==CS_TEAM_CTct_num++
        }
    }
    
    if (
equal(g_team,"CT")){
        if (
tt_num<MIN_PLAYERS) return
        if (
ct_num<MIN_PLAYERS) return
    } 
    
    
set_task(WARN_TIME"rash_warn",TASK_VIEW)
    
    new 
orrigins[3]
    for(new 
j=0;j<num;j++){
        if(
raszer[players[j]]<&& is_user_alive(players[j]))     //8. jak juz raszuje to mozna graczowi odpuscic :)
        
{        
            if((
equal(g_team,"T")&&(cs_get_user_team(players[j])==CS_TEAM_T))||(equal(g_team,"CT")&&(cs_get_user_team(players[j])==CS_TEAM_CT))||equal(g_team,"XX"))
            {    
                
get_user_origin(players[j],orrigins)
                for(new 
i=0;i<MAX_ZONES;i++){
                    if((
map_cors_origin[0+i*6]-450 orrigins[0] < map_cors_origin[0+i*6]) && (map_cors_origin[2+i*6]-100 orrigins[1] < map_cors_origin[3+i*6]+100) && (map_cors_origin[4+i*6] < orrigins[2] < map_cors_origin[5+i*6])){
                        
zone_warn(players[j],i,0,orrigins)
                    }
                    else if((
map_cors_origin[1+i*6] < orrigins[0] < map_cors_origin[1+i*6]+450) && (map_cors_origin[2+i*6]-100 orrigins[1] < map_cors_origin[3+i*6]+100) && (map_cors_origin[4+i*6] < orrigins[2] < map_cors_origin[5+i*6])){
                        
zone_warn(players[j],i,1,orrigins)
                    }
                    if((
map_cors_origin[0+i*6]-100 orrigins[0] < map_cors_origin[0+i*6+1]+100) && (map_cors_origin[2+i*6]-450 orrigins[1] < map_cors_origin[2+i*6]) && (map_cors_origin[4+i*6] < orrigins[2] < map_cors_origin[5+i*6])){
                        
zone_warn(players[j],i,2,orrigins)
                    }
                    else if((
map_cors_origin[0+i*6]-100 orrigins[0] < map_cors_origin[0+i*6+1]+100) && (map_cors_origin[3+i*6] < orrigins[1] < map_cors_origin[3+i*6]+450) && (map_cors_origin[4+i*6] < orrigins[2] < map_cors_origin[5+i*6])){
                        
zone_warn(players[j],i,3,orrigins)
                    }
                }            
//9. nigdy nie bedziesz widzial przednia i tylna lub lewa i prawa sciane rownoczesnie wiec jest else

            
}
        }
    }
}

///////////////////////////////////////////////////////////////////////////
/////////                M_Antirusher Punishments                 /////////
///////////////////////////////////////////////////////////////////////////

punishPlayer(id) {
    new 
i,ok=0
    
for(i=0;i<g_num&&(!ok);i++)
      {
      if(
g_punish[i][0]==id)
         {
         
ok=1
         g_punish
[i][1]+=1
         
}
      }
    if ((
get_cvar_num("amx_antirusher_immunity") == 1)&&(get_user_flags(id)&ADMIN_IMMUNITY)) {
        
g_punish[i][1]=0
    
}
    
    
server_cmd("amx_say g_num=%d  i=%d ok=%d",g_num,i,ok)  
    new 
timp=get_timeleft()    
    if((
g_punish[i][2]-timp) > )
        {
        switch(
g_punish[i][0])
        {
        case 
0
            {
            new 
name[32]
            
get_user_name(id,name,31)
            
server_cmd("amx_chat %L",LANG_SERVER,"AR_SRV_INFO"name)
            
            
server_cmd("amx_slap #%d %d",name,5)            
            }
        case 
1
            {
            
server_cmd("amx_slap #%d %d",id,40)         
            }
        case 
2server_cmd("amx_slay2 #%d 1",id
        case 
3banPlayer(id)
        default:{
            new 
name[32]
            
get_user_name(id,name,31)
            
server_cmd("amx_chat %L:p",LANG_SERVER,"AR_SRV_INFO"name)
            
//server_cmd("amx_chat g_punish[%d]=%d timp=%d",i,g_punish[i][0],timp)
            
}
        }
        
        }
    
g_punish[i][2]=timp    
    
if (warn_control >(25/floatround(10.0*TEST_TIME))){    //11. jak dlugo siedzisz w granicy to ci pisze w czacie :p
    
client_print(idprint_chat"%L",LANG_PLAYER,"AR_RASH_WARN")
    
warn_control=0;}
    
warn_control+=1

    
if(get_cvar_num("amx_antirusher_sound")){
        if(
sounded[id]==0){
        new 
sound_mode get_cvar_num("amx_antirusher_sound_mode")
        if(
sound_mode==0client_cmd(id,"spk %s",actions[g_punish[i][1]])
        else 
client_cmd(0,"spk %s",actions[g_punish[i][1]])
        
sounded[id]=1
        
}        
    }
}

banPlayer(id) {
    
client_print(idprint_chat"%L",LANG_PLAYER,"AR_RASH_BAN")
    
client_print(idprint_chat"%L",LANG_PLAYER,"AR_RASH_BAN")
    
server_cmd("amx_ban #%d %d rush"id,1440)    
}

public 
CurWeapon(id){
    if(
speed_limit[id]==1fm_set_user_maxspeed(id,(fm_get_user_maxspeed(id)/2.0));    // zmiana broni cie przyspieszy? nie ^^
}


public 
fwdPlayerPreThink(id){    
    if (
rasher[id]){
        new 
button pev(idpev_button)
        if ((
button IN_ATTACK2) || (button IN_ATTACK)){
            
user_silentkill(id)
        }
    }    
}



public 
free_the_man(id){
    
sounded[id]=0
    raszer
[id]=0
    
}



public 
free_the_world(){
    if(
round_start<1) return
    
round_start=0
    
new players[32],num 
    get_players
(players,num,"a")
    
//for(new i;i<num;i++){
        //free_the_man(players[i])
        //message_begin(MSG_ONE, get_user_msgid("SayText"), {0,0,0}, players[i])
        //write_byte(players[i])
        //write_string("^x04 *** RASH - OFF ***")
        //message_end()
    //}
    
client_print(0,print_chat,"%L",LANG_PLAYER,"AR_FREE_WORLD")
}

//////////////////////////////////////////////////////////////////////////
/////////                 M_Antirusher Draw Lines                /////////
//////////////////////////////////////////////////////////////////////////

public FX_Line(start[3], stop[3], color[3], brightnessid) {
    
message_begin(MSG_ONE_UNRELIABLESVC_TEMPENTITY_id
    
    
write_byteTE_BEAMPOINTS 
    
    
write_coord(start[0]) 
    
write_coord(start[1])
    
write_coord(start[2])
    
    
write_coord(stop[0])
    
write_coord(stop[1])
    
write_coord(stop[2])
    
    
write_shortspr_dot )
    
    
write_byte)    // framestart 
    
write_byte)    // framerate 
    
write_byte)    // life in 0.1's 
    
write_byte)    // width
    
write_byte)     // noise 
    
    
write_bytecolor[0] )   // r, g, b 
    
write_bytecolor[1] )   // r, g, b 
    
write_bytecolor[2] )   // r, g, b 
    
    
write_bytebrightness )      // brightness 
    
write_byte)       // speed 
    
    
message_end() 
}

public 
DrawLine(x1y1z1x2y2z2color[3],id) {
    new 
start[3]
    new 
stop[3]
    
    
start[0] = ( x1 )
    
start[1] = ( y1 )
    
start[2] = ( z1 )
    
    
stop[0] = ( x2 )
    
stop[1] = ( y2 )
    
stop[2] = ( z2 )

    
FX_Line(startstopcolor200id)
}

public 
ar_zone(zone_num,id){
    new 
start[3],stop[3]
    new 
xyz=0
    
if(zone_editing==zone_numxyz=1
    
    zone_num
=(zone_num-1)*6

    start
[0]= map_cors_edit[0+zone_num]
    
start[1]= map_cors_edit[2+zone_num]
    
start[2]= map_cors_edit[4+zone_num]
    
    
stop[0]= map_cors_edit[1+zone_num]
    
stop[1]= map_cors_edit[3+zone_num]
    
stop[2]= map_cors_edit[5+zone_num]
    
    
ShowZoneBox(startstopid,xyz)
}

public 
ShowZoneBox(mins[3], maxs[3], id,xyz) {
        
    
DrawLine(maxs[0], maxs[1], maxs[2], mins[0], maxs[1], maxs[2], zone_color_aktivid)
    
DrawLine(maxs[0], maxs[1], maxs[2], maxs[0], mins[1], maxs[2], zone_color_aktivid)
    
DrawLine(maxs[0], maxs[1], maxs[2], maxs[0], maxs[1], mins[2], zone_color_aktivid)

    
DrawLine(mins[0], mins[1], mins[2], maxs[0], mins[1], mins[2], zone_color_aktivid)
    
DrawLine(mins[0], mins[1], mins[2], mins[0], maxs[1], mins[2], zone_color_aktivid)
    
DrawLine(mins[0], mins[1], mins[2], mins[0], mins[1], maxs[2], zone_color_aktivid)

    
DrawLine(mins[0], maxs[1], maxs[2], mins[0], maxs[1], mins[2], zone_color_aktivid)
    
DrawLine(mins[0], maxs[1], mins[2], maxs[0], maxs[1], mins[2], zone_color_aktivid)
    
DrawLine(maxs[0], maxs[1], mins[2], maxs[0], mins[1], mins[2], zone_color_aktivid)
    
DrawLine(maxs[0], mins[1], mins[2], maxs[0], mins[1], maxs[2], zone_color_aktivid)
    
DrawLine(maxs[0], mins[1], maxs[2], mins[0], mins[1], maxs[2], zone_color_aktivid)
    
DrawLine(mins[0], mins[1], maxs[2], mins[0], maxs[1], maxs[2], zone_color_aktivid)
    
    if((
xyz==1)&&(editign==1)){
        if(
zone_coords_num==0){
            
DrawLine(maxs[0], maxs[1], maxs[2], maxs[0], mins[1], mins[2], zone_color_yellowid)
            
DrawLine(maxs[0], maxs[1], mins[2], maxs[0], mins[1], maxs[2], zone_color_yellowid)
            
DrawLine(mins[0], maxs[1], maxs[2], mins[0], mins[1], mins[2], zone_color_redid)
            
DrawLine(mins[0], maxs[1], mins[2], mins[0], mins[1], maxs[2], zone_color_redid)
        }
        else if( 
zone_coords_num==1){
            
DrawLine(mins[0], mins[1], mins[2], maxs[0], mins[1], maxs[2], zone_color_redid)
            
DrawLine(maxs[0], mins[1], mins[2], mins[0], mins[1], maxs[2], zone_color_redid)
            
DrawLine(mins[0], maxs[1], mins[2], maxs[0], maxs[1], maxs[2], zone_color_yellowid)
            
DrawLine(maxs[0], maxs[1], mins[2], mins[0], maxs[1], maxs[2], zone_color_yellowid)
        }
        else{
            
DrawLine(maxs[0], maxs[1], maxs[2], mins[0], mins[1], maxs[2], zone_color_yellowid)
            
DrawLine(maxs[0], mins[1], maxs[2], mins[0], maxs[1], maxs[2], zone_color_yellowid)
            
DrawLine(maxs[0], maxs[1], mins[2], mins[0], mins[1], mins[2], zone_color_redid)
            
DrawLine(maxs[0], mins[1], mins[2], mins[0], maxs[1], mins[2], zone_color_redid)
        }
    }
}

public 
show_all_zones(){
    new 
num=1
    
while(num<=zones_edit){
        
ar_zone(num,map_editor)
        
num++
    }
    if(
zone_editing>0){
        new 
origins[3], origins2[3]
        
get_user_origin(map_editor,origins)
        new 
Floatrange_line
        
new Floatrange_origins[6]
        for(new 
i=0;i<6;i++) range_origins[i] = (map_cors_edit[i+6*(zone_editing-1)])*1.0
        range_line
floatsqroot(((range_origins[1]-range_origins[0])/2.0-origins[0])*((range_origins[1]-range_origins[0])/2.0-origins[0])+((range_origins[3]-range_origins[2])/2.0-origins[1])*((range_origins[3]-range_origins[2])/2.0-origins[1])+((range_origins[5]-range_origins[4])/2.0-origins[2])*((range_origins[5]-range_origins[4])/2.0-origins[2]))
        if(
range_line>20000) for(new i=0;i<3;i++){
            
origins2[i]=((map_cors_edit[i*2+6*(zone_editing-1)] + map_cors_edit[i*2+1+6*(zone_editing-1)])/2)/6
        
}
        else if(
range_line>15000) for(new i=0;i<3;i++){
            
origins2[i]=((map_cors_edit[i*2+6*(zone_editing-1)] + map_cors_edit[i*2+1+6*(zone_editing-1)])/2)/5
        
}
        else if(
range_line>10000) for(new i=0;i<3;i++){
            
origins2[i]=((map_cors_edit[i*2+6*(zone_editing-1)] + map_cors_edit[i*2+1+6*(zone_editing-1)])/2)/3
        
}
        else for(new 
i=0;i<3;i++){
            
origins2[i]=((map_cors_edit[i*2+6*(zone_editing-1)] + map_cors_edit[i*2+1+6*(zone_editing-1)])/2)
        }
        
FX_Line(originsorigins2zone_color_red,200,map_editor)
    }
}

public 
zone_warn(id,zone,direction,origins[3]){
    new 
start[3],stop[3]
    
start[2]=origins[2]-110
    stop
[2]=origins[2]-110
    
    
switch(direction){
        case 
0:{
            
start[0]=map_cors_origin[zone*6]+5
            stop
[0]=map_cors_origin[zone*6]+5
            start
[1]=map_cors_origin[zone*6+2]
            
stop[1]=map_cors_origin[zone*6+3]
        }
        case 
1:{
            
start[0]=map_cors_origin[zone*6+1]-5
            stop
[0]=map_cors_origin[zone*6+1]-5
            start
[1]=map_cors_origin[zone*6+2]
            
stop[1]=map_cors_origin[zone*6+3]
        }
        case 
2:{
            
start[0]=map_cors_origin[zone*6+0]
            
stop[0]=map_cors_origin[zone*6+1]
            
start[1]=map_cors_origin[zone*6+2]+5
            stop
[1]=map_cors_origin[zone*6+2]+5
        
}
        case 
3:{
            
start[0]=map_cors_origin[zone*6+0]
            
stop[0]=map_cors_origin[zone*6+1]
            
start[1]=map_cors_origin[zone*6+3]-5
            stop
[1]=map_cors_origin[zone*6+3]-5
        
}
    }
    for(new 
i=0;i<9;i++){
        
start[2]+=30
        stop
[2]+=30
        FX_Line
(startstopzone_color_red60id)
    }
}

// Stocks, ported by xPaw
stock fm_create_entity(const classname[])
    return 
engfunc(EngFunc_CreateNamedEntityengfunc(EngFunc_AllocStringclassname))

stock fm_fake_touch(touchertouched)
    return 
dllfunc(DLLFunc_Touchtouchertouched)

stock fm_remove_entity(index)
    return 
engfunc(EngFunc_RemoveEntityindex)

stock fm_DispatchSpawn(entity)
    return 
dllfunc(DLLFunc_Spawnentity)

stock fm_set_kvd(entity, const key[], const value[], const classname[] = "") {
    if (
classname[0])
        
set_kvd(0KV_ClassNameclassname)
    else {
        new class[
32]
        
pev(entitypev_classname, class, sizeof class - 1)
        
set_kvd(0KV_ClassName, class)
    }

    
set_kvd(0KV_KeyNamekey)
    
set_kvd(0KV_Valuevalue)
    
set_kvd(0KV_fHandled0)

    return 
dllfunc(DLLFunc_KeyValueentity0)
}

stock fm_fakedamage(victim, const classname[], Float:takedmgdamagedamagetype) {
    new class[] = 
"trigger_hurt"
    
new entity fm_create_entity(class)
    if (!
entity)
        return 
0

    
new value[16]
    
float_to_str(takedmgdamage 2valuesizeof value 1)
    
fm_set_kvd(entity"dmg"value, class)

    
num_to_str(damagetypevaluesizeof value 1)
    
fm_set_kvd(entity"damagetype"value, class)

    
fm_set_kvd(entity"origin""8192 8192 8192", class)
    
fm_DispatchSpawn(entity)

    
set_pev(entitypev_classnameclassname)
    
fm_fake_touch(entityvictim)
    
fm_remove_entity(entity)

    return 
1
}

stock fm_set_user_maxspeed(indexFloat:speed = -1.0) {
    
engfunc(EngFunc_SetClientMaxspeedindexspeed)
    
set_pev(indexpev_maxspeedspeed)

    return 
1
}

stock Float:fm_get_user_maxspeed(index) {
    new 
Float:speed
    pev
(indexpev_maxspeedspeed)

    return 
speed


what i wanted to do is to eliminate the menus and to create punishments acording the times that a person made a mistake
don't know why it ain't workin because i have no errors at compiling :|
and when I check for plugin it says bad load....why is it that so
please figure it out and help me when you have some time :D

Exolent[jNr] 02-23-2009 14:19

Re: plugin bad load, check script please
 
Show the output of the following commands:
rcon amxx plugins
rcon amxx modules

mihaiveress 02-23-2009 15:05

Re: plugin bad load, check script please
 
Code:

[  1] Admin Base              1.8.0.3660  AMXX Dev Team    admin.amxx      running 
 [  2] Admin Commands          1.8.0.3660  AMXX Dev Team    admincmd.amxx    running 
 [  3] Admin Help              1.8.0.3660  AMXX Dev Team    adminhelp.amxx  running 
 [  4] Slots Reservation      1.8.0.3660  AMXX Dev Team    adminslots.amxx  running 
 [  5] Multi-Lingual System    1.8.0.3660  AMXX Dev Team    multilingual.am  running 
 [  6] Menus Front-End        1.8.0.3660  AMXX Dev Team    menufront.amxx  running 
 [  7] Commands Menu          1.8.0.3660  AMXX Dev Team    cmdmenu.amxx    running 
 [  8] Players Menu            1.8.0.3660  AMXX Dev Team    plmenu.amxx      running 
 [  9] Maps Menu              1.8.0.3660  AMXX Dev Team    mapsmenu.amxx    running 
 [ 10] Admin Chat              1.8.0.3660  AMXX Dev Team    adminchat.amxx  running 
 [ 11] Anti Flood              1.8.0.3660  AMXX Dev Team    antiflood.amxx  running 
 [ 12] Scrolling Message      1.8.0.3660  AMXX Dev Team    scrollmsg.amxx  running 
 [ 13] Info. Messages          1.8.0.3660  AMXX Dev Team    imessage.amxx    running 
 [ 14] Admin Votes            1.8.0.3660  AMXX Dev Team    adminvote.amxx  running 
 [ 15] NextMap                1.8.0.3660  AMXX Dev Team    nextmap.amxx    running 
 [ 16] Nextmap Chooser        1.8.0.3660  AMXX Dev Team    mapchooser.amxx  running 
 [ 17] TimeLeft                1.8.0.3660  AMXX Dev Team    timeleft.amxx    running 
 [ 18] Pause Plugins          1.8.0.3660  AMXX Dev Team    pausecfg.amxx    running 
 [ 19] Stats Configuration    1.8.0.3660  AMXX Dev Team    statscfg.amxx    running 
 [ 20] StatsX                  1.8.0.3660  AMXX Dev Team    statsx.amxx      running 
 [ 21] AMX Super              3.8.1      Bmann_420        amx_super.amxx  running 
 [ 22] Smart Slash            0.1        Emp`              smart_slash.amx  running 
 [ 23] Ultimate SS            1.1        Hack              ultimate_ss.amx  running 
 [ 24] Ultimate Sounds        1.7        Dizzy / Bmann_42  ultimate_sounds  running 
 [ 25] Automatic knife duel    0.3        JGHG              automatic_knife  running 
 [ 26] Show IP                1.0        $uicid3          amx_showip.amxx  running 
 [ 27] Custom Win Text        1.0        aroneftw          checkscore.amxx  running 
 [ 28] unknown                unknown    unknown          antirusherfinal  bad load
( 28) Load fails: Plugin file open error (plugin "antirusherfinal.amxx")


Code:

name                    version    author              status   
Fun                    1.8.0.3660  AMX Mod X Dev Team  running   
CStrike                1.8.0.3660  AMX Mod X Dev Team  running   
CSX                    1.8.0.3660  AMX Mod X Dev Team  running   
FakeMeta                1.8.0.3660  AMX Mod X Dev Team  running   
4 modules

the problem is that before i modified it and cut out from the part where the menu's are it worked....but now..

i don't get it
I've removed from the original plugin the antirusher menu's part , the save to file part and some actions agains anti-rushers

Exolent[jNr] 02-23-2009 15:36

Re: plugin bad load, check script please
 
Quote:

Originally Posted by mihaiveress (Post 767553)
Code:

( 28) Load fails: Plugin file open error (plugin "antirusherfinal.amxx")

That means you either:
  1. Didn't place the .amxx file in the addons/amxmodx/plugins folder.
  2. Misspelled the filename of the .amxx file in the plugins.ini

mihaiveress 02-24-2009 00:43

Re: plugin bad load, check script please
 
omg....I'm suck a noob :D
I've changed the name when I was at college 'cause i did some research and at home the plugins name was antirusherfinal.amxx and from school i saved it antirushfinal.amxx, a little e in minus :D
i hate these details that count :))

mihaiveress 02-24-2009 01:25

Re: plugin bad load, check script please[solved]
 
sorry for double posting :D
Code:

        register_cvar("xPaw", "AR 2.6",FCVAR_SERVER)
        register_cvar("amx_antirusher","0",FCVAR_SERVER)                       
        register_cvar("amx_antirusher_sound","1",FCVAR_SERVER)               
        register_cvar("amx_antirusher_sound_mode","0",FCVAR_SERVER)
        register_cvar("amx_antirusher_warn","1",FCVAR_SERVER)
        register_cvar("amx_antirusher_time","60.0",FCVAR_SERVER)               
        register_cvar("amx_antirusher_freq","1.0",FCVAR_SERVER)
        register_cvar("amx_antirusher_immunity","0",FCVAR_SERVER)       
        register_cvar("amx_antirusher_people","0",FCVAR_SERVER)

why does it say in game when i write amx_cvar amx_antirusher 1 it says unknows cvar :|


All times are GMT -4. The time now is 16:55.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.