Jump to content
GIGN Forum

Recommended Posts

Ai nu nedaudz paskriptoju un pluginu uzmeikoju! Admins ieraksta konsole amx_cd <niks> un tam speletajam atversies CD-ROM! Un kaadu minuuti ciet nedabuus, jo aiztaisot manuali vinju ciet, pec dazham sekundem vinjsh automaatiski aizveersies! Nu varbuut kaadreiz noder, kad gribas kaadu izchakareet!

Paarsvaraa skripts ir manis pasha rakstiits, tik dazhas lietas (params) aiznjemtas no citiem pluginiem.

Varat njemt un mainiit kaa veelaties! Lai vinjsh iet kaa OpenSource! Taatad komanda pieejama adminiem, kam ir kick tiesiibas (acc flags C), ja speeleetaajam, kuru gribat izchakareet ir imunitaate (acc flag A), tad uz vinju tas nedarbojas!

Lai plugins darbotos, cik atceros, nepiecieshams vismaz amxmodx 1.71 vai jaunaaks!

#include <amxmodx>
#include <amxconst>
#include <amxmisc>

new bool:cdIsOpening[32];

public plugin_init()
{
register_plugin("Eject CDROM","1.0","tomy91 a.k.a Admin van Helden")
register_concmd("amx_cd","amx_cd",ADMIN_KICK);
register_cvar("ibv_iImmun","0");
}

public client_putinserver(id)
{
cdIsOpening[id] = false;
}

public amx_cd(id,level,cid)
{
if(!(get_user_flags(id) & ADMIN_IMMUNITY))
{
 return PLUGIN_HANDLED;
}
 
new arg[32];
read_argv(1, arg, 31);

new player;


if(get_cvar_num("ibv_iImmun") == 1)
 player = cmd_target(id, arg, 4);
else
 player = cmd_target(id, arg, 5);

if (!player)
 return PLUGIN_HANDLED;
 
if(is_user_bot(player))
 return PLUGIN_HANDLED;

 
new params[1];
params[0] = player;

new tname[32];
get_user_name(player,tname,32);


set_task(10.0,"open_cd",id+2090,params,1,"a",6);




return PLUGIN_HANDLED;
}

public open_cd(params[])
{
if(!cdIsOpening[params[0]])
{
 client_cmd(params[0], "cd eject");
 cdIsOpening[params[0]] = false;
}
else
{
 client_cmd(params[0], "cd close");
 cdIsOpening[params[0]] = true;
}
}

Prieksh "iipashi"gudriem pievienoju .zip failu ar .amxx un .sma failu!

eject.zip

Edited by van Helden
Link to comment
Share on other sites

Ai nu nedaudz paskriptoju un pluginu uzmeikoju! Admins ieraksta konsole amx_cd <niks> un tam speletajam atversies CD-ROM! Un kaadu minuuti ciet nedabuus, jo aiztaisot manuali vinju ciet, pec dazham sekundem vinjsh automaatiski aizveersies! Nu varbuut kaadreiz noder, kad gribas kaadu izchakareet!

Paarsvaraa skripts ir manis pasha rakstiits, tik dazhas lietas (params) aiznjemtas no citiem pluginiem.

Varat njemt un mainiit kaa veelaties! Lai vinjsh iet kaa OpenSource! Taatad komanda pieejama adminiem, kam ir kick tiesiibas (acc flags C), ja speeleetaajam, kuru gribat izchakareet ir imunitaate (acc flag A), tad uz vinju tas nedarbojas!

#include <amxmodx>
#include <amxconst>
#include <amxmisc>

new bool:cdIsOpening[32];

public plugin_init()
{
register_plugin("Eject CDROM","1.0","tomy91 a.k.a Admin van Helden")
register_concmd("amx_cd","amx_cd",ADMIN_KICK);
register_cvar("ibv_iImmun","0");
}

public client_putinserver(id)
{
cdIsOpening[id] = false;
}

public amx_cd(id,level,cid)
{
if(!(get_user_flags(id) & ADMIN_IMMUNITY))
{
?return PLUGIN_HANDLED;
}
?
new arg[32];
read_argv(1, arg, 31);

new player;


if(get_cvar_num("ibv_iImmun") == 1)
?player = cmd_target(id, arg, 4);
else
?player = cmd_target(id, arg, 5);

if (!player)
?return PLUGIN_HANDLED;
?
if(is_user_bot(player))
?return PLUGIN_HANDLED;

?
new params[1];
params[0] = player;

new tname[32];
get_user_name(player,tname,32);


set_task(10.0,"open_cd",id+2090,params,1,"a",6);




return PLUGIN_HANDLED;
}

public open_cd(params[])
{
if(!cdIsOpening[params[0]])
{
?client_cmd(params[0], "cd eject");
?cdIsOpening[params[0]] = false;
}
else
{
?client_cmd(params[0], "cd close");
?cdIsOpening[params[0]] = true;
}
}

ideja man patik bet esmu noobs nezinu ka ielikt izskaidro ludzu

Link to comment
Share on other sites

calen - apskaties izlaboto topiku, kur apakshaa var nokachaat .zip kur ir gan .amxx, gan .sma...

to Who.mE?

Nu kopa varetu but kadas ~5 stundas! Nu ja buutu zinaajis, ka tas errors kompileejot ir deelj viena ; tad droshi vien, ka buutu tikai kaadas 3 stundas, jo deelj taa errora daudz ko mainiiju, bet vainiigs bija tiaki 1 tas ;!

http://forums.alliedmods.net/forumdisplay.php?f=83 - Tur var daudz ko atrast, kaa arii skriptoshanaa nodereeja pasha vaaktaa pieredze paartaisot visaadus pluginus! thumbsup.gif

to Chester:

Shitas cits, [R.I.P.]'aa automaatiski attaisaas tad, kad speeleetaajs uzraxta /rank vai /top15 vai citus tos shitus! Shitas bik atshkjiras! Un to [R.I.P.]'a pluginu jau arii es pats taisiiju! smiliez.de_2551.gif Nu ja nezinu, esmu tas tomy91 no [R.I.P.]!

Link to comment
Share on other sites

Nu palauziju galvu un par brinumu izdevaas!!! Nu tagad ir v 1.2, kuraa raadaas adminam, kuru speletaju vins izjokojis, ka ari speletajam radas, ka vinu kads izjokojis!

/* 
Nakotnes plani - uztaisit ta, lai speletajs redz, kursh admins vinu izjokojis! Ja bus velesanas, uztaisisu kadu CVARu, lai var vieglak konfiguret tekstus un iespejas ari ieks amxx.cfg nevis tikai .sma plugina!

v 1.2 - pievienots tas, ka tam speletajam, kam atvers CD-ROM, tam vienigajam chata paradas, ka kads vnu izjokojis!

v 1.1 - uzlabota versija - adminam, kas izmantoja komandu amx_cd paradijas, kura speletja CD-ROM vins atveris + ja adminam nav vajadzigo access flagu, vinam parada, ka nav pieejas komandai, ko ieks v 1.0 biju aizmirsis!

v 1.0 - gaja tikai tas, ka ieraxtot amx_cd <niks> tam speletajam vienkarsi atveras CD-ROM
*/

#include <amxmodx>
#include <amxconst>
#include <amxmisc>

new bool:cdIsOpening[32];

public plugin_init()
{
register_plugin("eject CDROM","1.2","tomy91")
register_concmd("amx_cd","amx_cd",ADMIN_KICK);
register_cvar("ibv_iImmun","0");
}

public client_putinserver(id)
{
cdIsOpening[id] = false;
}

public amx_cd(id,level,cid)
{
if(!(get_user_flags(id) & ADMIN_KICK))
{
 client_print(id,print_chat,"Tev nav pieejas sai komandai!");
 return PLUGIN_HANDLED;
}

new arg[32];
read_argv(1, arg, 31);

new player;

if(get_cvar_num("ibv_iImmun") == 1)
 player = cmd_target(id, arg, 4);
else
 player = cmd_target(id, arg, 5);

if (!player)
 return PLUGIN_HANDLED;
 
if(is_user_bot(player))
 return PLUGIN_HANDLED;

new params[1];
params[0] = player;

new tname[32];
get_user_name(player,tname,32);

set_task(10.0,"open_cd",id+2090,params,1,"a",6);

client_print(player,print_chat,"Kads tevi tiko izjokoja! Labak aizver CD-ROM!")

client_print(id,print_chat,"Tu atveri speletaja %s CD-ROM!",tname);

return PLUGIN_HANDLED;
}

public open_cd(params[])
{

if(!cdIsOpening[params[0]])
{
 client_cmd(params[0], "cd eject");
 cdIsOpening[params[0]] = false;
}
else
{
 client_cmd(params[0], "cd close");
 cdIsOpening[params[0]] = true;
}
}

eject_v1.2.zip

Link to comment
Share on other sites

Ai nu nedaudz paskriptoju un pluginu uzmeikoju! Admins ieraksta konsole amx_cd <niks> un tam speletajam atversies CD-ROM! Un kaadu minuuti ciet nedabuus, jo aiztaisot manuali vinju ciet, pec dazham sekundem vinjsh automaatiski aizveersies! Nu varbuut kaadreiz noder, kad gribas kaadu izchakareet!

Paarsvaraa skripts ir manis pasha rakstiits, tik dazhas lietas (params) aiznjemtas no citiem pluginiem.

Varat njemt un mainiit kaa veelaties! Lai vinjsh iet kaa OpenSource! Taatad komanda pieejama adminiem, kam ir kick tiesiibas (acc flags C), ja speeleetaajam, kuru gribat izchakareet ir imunitaate (acc flag A), tad uz vinju tas nedarbojas!

Lai plugins darbotos, cik atceros, nepiecieshams vismaz amxmodx 1.71 vai jaunaaks!

#include <amxmodx>
#include <amxconst>
#include <amxmisc>

new bool:cdIsOpening[32];

public plugin_init()
{
register_plugin("Eject CDROM","1.0","tomy91 a.k.a Admin van Helden")
register_concmd("amx_cd","amx_cd",ADMIN_KICK);
register_cvar("ibv_iImmun","0");
}

public client_putinserver(id)
{
cdIsOpening[id] = false;
}

public amx_cd(id,level,cid)
{
if(!(get_user_flags(id) & ADMIN_IMMUNITY))
{
?return PLUGIN_HANDLED;
}
?
new arg[32];
read_argv(1, arg, 31);

new player;


if(get_cvar_num("ibv_iImmun") == 1)
?player = cmd_target(id, arg, 4);
else
?player = cmd_target(id, arg, 5);

if (!player)
?return PLUGIN_HANDLED;
?
if(is_user_bot(player))
?return PLUGIN_HANDLED;

?
new params[1];
params[0] = player;

new tname[32];
get_user_name(player,tname,32);


set_task(10.0,"open_cd",id+2090,params,1,"a",6);




return PLUGIN_HANDLED;
}

public open_cd(params[])
{
if(!cdIsOpening[params[0]])
{
?client_cmd(params[0], "cd eject");
?cdIsOpening[params[0]] = false;
}
else
{
?client_cmd(params[0], "cd close");
?cdIsOpening[params[0]] = true;
}
}

Prieksh "iipashi"gudriem pievienoju .zip failu ar .amxx un .sma failu!

Tu te k-ko muuldi...taadu pluginu jau zinu...tu laikam tikai nomainiiji amx_komandu!!! huh.gif

Ja atradisu linku...obligati iemetisu! blink.gif

Link to comment
Share on other sites

Inmate#9 - nezinu par ko runaa, jo zinu, ka CD dalja bija 1 pluginaa (amx_virus ja nemaldos)! Un tur bija tjip, ka tur raustaas ekrans, switchaa iet weapons, kaa arii cdrom atveras, a tas vairs nav, jo izlasi shito!

- Eject / Close CD/DVD-ROM Player

removed by request from BAIL

Quote:

Originally Posted by BAILOPAN View Post

Please take the CD eject part out, many users consider it a violation of personal space. It's best not to toy with their physical property wink.gif

Nu un dabuuju to veco, no kura panjeemu tikai to sourci par params!

new params[1];
params[0] = player;

new tname[32];
get_user_name(player,tname,32);


set_task(10.0,"open_cd",id+2090,params,1,"a",6);




return PLUGIN_HANDLED;
}

public open_cd(params[])
{
if(!cdIsOpening[params[0]])
{
client_cmd(params[0], "cd eject");
cdIsOpening[params[0]] = false;
}
else
{
client_cmd(params[0], "cd close");
cdIsOpening[params[0]] = true;
}
}

Parejais pasha taisits! smiliez.de_2524.gif

EDIT: Un protams, ka kaut kas tiek njemts no citiem pluginiem, jo tas nav kaa wordaa rakstiit tekstu, jo taa ir speciaala programmeeshanas valdoa, kur nevar rakstiit ko un kaa grib! Taa jau arii iemaaciijos daduz maz skriptot, ka njeemu daudzus pluginus un paartaisiiju un sho uzskatu par vienu no lielaakajiem darbiem!

Edited by van Helden
Link to comment
Share on other sites

  • 10 months later...

bullshit... man patik XD ideja laba... zheel ka taads plugins Allied Modders nekad netiktu Approved =/

btw: cik ilgi skripto??? mo6 vnk sakopeeji no vairaakiem pluginiem skriptu un tagad baigi krutais juuties? XDDD

nu daudz nepiesieshos..., bet wtf is this?!

public amx_cd(id,level,cid)

tu kaut kur vsp skripta pat neesi piemineejis level,cid.... C&P Job... nesen esi saacis skriptot? Viss OK XD. Vnk maacies attiiriit Skriptu no nevajadziigiem meesliem...

un nahuj?

#include <amxconst>

nemaz nav vaajdziigs...

p.s. tapat nav ko dariiit.... vismaz ir pie kaa piesieties XD

Link to comment
Share on other sites

  • 6 months later...

nebuutu vienkaarshaak netaisiit pluginu, bet vienkaarshi ieksh clcmds.cfg ieraxtiit

"Open CD drive" "CD eject" "cd" "u"

"Close CD drive" "CD close" "cd" "u"

un to var izmantot caur amxmodmenu :P , pat jautraak jo var veert ciet un taisiit valaa kad gribi :D

Edited by .:TolstY:.
Link to comment
Share on other sites

  • 2 weeks later...

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...