orice scriu un chat cu / sa nu apara

Discutii legate de instalarea, configurarea si modificarea unui server de Counter-Strike.

Moderators: Moderatori ajutatori, Moderatori, Echipa eXtreamCS.com

Post Reply
csbogdancs
Membru, skill +1
Membru, skill +1
Posts: 125
Joined: 03 Jan 2014, 15:25
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Has thanked: 19 times
Contact:

28 Jan 2014, 03:38

1.deci stiti ca este pluginul acela cand scrii /admin /rs sau un ex /pdgagaq sa nu apara ceau scris ca ai /
link si cum se numeste pluginu pls

2.la mapa dearhrun_bhopz_v2 stiti ca sunt scarile alea la inceput la mine tr sa urc treapta cu treapta dar pe alte servere direct.... ceva o comanda cv??

3. cum modific sa bag mesaje in chat uitati amxx
| Afiseaza codul
// AMX Mod X Configuration File
echo Executing AMX Mod X Configuration File

// Default access for all non admin players (see users.ini for access details)
//
// Default value: "z"
amx_default_access "z"

// Name of setinfo which should store a password on a client (you should change this)
// Note: Always prefix the field with an underscore (aka: "_")
// (Example: setinfo _pw "password")
//
// Default value: "_pw"
amx_password_field "_pw"

// Mode of logging to a server
// 0 - disable logging, players won't be checked (and access won't be set)
// 1 - normal mode which obey flags set in accounts
// 2 - kick all players not on list
//
// Default value: 1
amx_mode 1

// Show admins activity
// 0 - disabled
// 1 - show without admin name
// 2 - show with name
//
// Default value: 2
amx_show_activity 2

// Frequency in seconds and text of scrolling message
//
// Default value: "Welcome to %hostname% -- This server is using AMX Mod X" 600
amx_scrollmsg "Welcome to %hostname% -- This server is using AMX Mod X" 600

// Center typed colored messages (last parameter is a color in RRRGGGBBB format)
//
// Default values: "Welcome to %hostname%" "000255100"
//                 "Welcome! " "000100255"
amx_imessage "This server is made by Not.responding" "000255100"


// Frequency in seconds of colored messages
//
// Default value: 180
amx_freq_imessage 180

// Ban times for the main ban menu (amx_banmenu)
// Use 0 for permanent ban
// Default values: 0 5 10 15 30 45 60
amx_plmenu_bantimes 0 5 10 15 30 45 60

// Slap damage amounts for the main slap menu (amx_slapmenu)
// Slay is automaticall inserted as the first option
// Default values: 0 1 5
amx_plmenu_slapdmg 0 1 5

// Set in seconds how fast players can chat (chat-flood protection)
//
// Default value: 0.75
amx_flood_time 0.75

// Amount of slots to reserve.
//
// Default value: 0
amx_reservation 0

// If you set this to 1, you can hide slots on your server.
// If server "full" of public slots and slots hidden, you must manually connect with connect console command
//
// Default value: 0
amx_hideslots 0

// Displaying of time remaining
// a - display white text on bottom
// b - use voice
// c - don't add "remaining" (only in voice)
// d - don't add "hours/minutes/seconds" (only in voice)
// e - show/speak if current time is less than this set in parameter
//
// Default value: "ab 1200" "ab 600" "ab 300" "ab 180" "ab 60" "bcde 11"
amx_time_display "ab 1200" "ab 600" "ab 300" "ab 180" "ab 60" "bcde 11"

// Announce "say thetime" and "say timeleft" with voice, set to 0 to disable.
//
// Default value: 1
amx_time_voice 1

// Minimum delay in seconds between two voting sessions
//
// Default value: 10
amx_vote_delay 10

// How long voting session goes on
//
// Default value: 10
amx_vote_time 10

// Display who votes for what option, set to 0 to disable, 1 to enable.
//
// Default value: 1
amx_vote_answers 1

// Some ratios for voting success

// Default value: 0.40
amx_votekick_ratio 0.40

// Default value: 0.40
amx_voteban_ratio 0.40

// Default value: 0.40
amx_votemap_ratio 0.40

// Default value: 0.02
amx_vote_ratio 0.02

// Max. time to which map can be extended
//
// Default value: 90
amx_extendmap_max 90

// Step for each extending
//
// Default value: 15
amx_extendmap_step 15

// If you set this to 0, clients cannot chose their language, instead they use
// whatever language the server is configured to use.
//
// Default value: 1
amx_client_languages 1

// Plugin Debug mode
// 0 - No debugging (garbage line numbers)
// 1 - Plugins with "debug" option in plugins.ini are put into debug mode
// 2 - All plugins are put in debug mode
// Note - debug mode will affect JIT performance
//
// Default value: 1
amx_debug 1

// Plugin MultiLingual Debug
// To debug a language put its 2 letter code between quotes ("en", "de", etc)
// "" means disabled
//
// Default value: ""
amx_mldebug ""

//
// Beginning of Counter-Strike package specific configurations.
//

// Rank mode
// 0 - by nick
// 1 - by authid 
// 2 - by ip
//
// Default value: 1
csstats_rank 1

// Max size of the stats file
//
// Default value: 3500
csstats_maxsize 3500

// Whether or not to rank bots with csstats - set to 1 to rank bots, 0 otherwise.
//
// Default value: 0
csstats_rankbots 0

// Duration of HUD-statistics
//
// Default value: 12.0
amx_statsx_duration 12.0

// HUD-statistics display limit relative round freeze end
// Negative time will clear the HUD-statstics before the round freeze time has ended
//
// Default value: -2.0
amx_statsx_freeze -2.0



Turn on/off the plugin
deathrun_toggle 1/0 <default: 1>

Turn on/off the spray blocker
deathrun_spray 1/0 <default: 1>

Turn on/off the radio commands blocker
deathrun_radio 1/0 <default: 1>

Turn on/off giving USP for CT's
deathrun_giveusp 1/0 <default: 1>

Turn on/off removing buyzone
deathrun_removebz 1/0 <default: 1>

Turn on/off remove money and timer from hud
deathrun_hidehud 1/0 <default: 1>

Turn on/off blocking money, if yes, player always will have 0$
deathrun_blockmoney 1/0 <default: 1>

Block or enable 'kill' command for CTs (1 - blocked, 0 - enabled)
deathrun_blockkill 1/0 <default: 1>

Turn on/off the semiclip
deathrun_semiclip 1 <default: 1>

Turn on/off the life system, if set to 2, terrorist for winning team will get also 1 life point.
deathrun_lifesystem 2/1/0 <default: 1>

If 1 then gamename will be changed to 'Deathrun v3.0'
deathrun_gamename 1/0 <default: 1>

Turn on/off block no fall damage for terrorists
deathrun_terrnfd 1/0 <default: 1>




//////USE BUTTON ONCE.


amx_buttons_default 1
Default count of uses


amx_buttons_team 1
Who plugin analyze
0 - anyone(plugin disabled?)
1 - Te
2 - Ct
3 - Te+Ct


amx_buttons_freerun 1
Enabled FreeRun mode? 0|1


amx_freerun_votetime 5
Vote time


amx_freerun_limit_mode 0
Type of limit
0 - enabled after 'amx_freerun_limit' rounds
1 - enabled after 'amx_freerun_limit' minutes


amx_freerun_limit 5
Size of Limit, depend on type

amx_freerun_info 120
interval of information, value lower than 0 will remove chat info


amx_freerun_tt_privilege 1
Terrorist`s privilege
if he use /free FreeRun will start without vote, can he? 0|1

amx_restore_buttons 1
on start round make buttons enabled to use (when used in last round very late) 0|1



bh_enabled 1
Enable/disable the plugin.

bh_autojump 1
Enable/disable no skill required bunny hopping. (Just hold jump to bunny hop!)

bh_showusage 1


sv_allchat 2 1|2|0>
1 - Dependent on sv_alltalk
2 - Always active
0 - Disabled

ac_namecolor 1 |1|2>
ac_msgcolor 0 |2|0>
0 - Team color
1 - Green
2 - White

ac_hidestatus 1 |1>
0 = Show dead/spec status.
1 = Hide status.

ac_teamchat 1 |1>
0 = Dead and living can't team chat.
1 = Dead and living can team chat.

amx_speclist 1 Disable/Enable plugin
amx_speclist_immunity 0 If 1, admins with immunity flag("a") will not show up on the spec list

amx_gamename "DR Knife-Mod"


amx_rang_chat 3


tjm_join_team 2    <0|1|2|3|4> - 0 = oprit, 1 = T, 2 = CT, 3 = SPEC, 4 = Random CT sau T
tjm_switch_team 0     <0|1> - 0-oprit/1-pornit - forteaza jucatorul sa isi schimbe echipa cand deschide meniul
tjm_class_t 5     <1|2|3|4|5> - 1 = Phoenix Connexion, 2 = Elite Crew, 3 = Arctic Avengers, 4 = Guerilla Warfare, 5 = Random
tjm_class_ct 5     <1|2|3|4|5> - 1 = Seal Team, 2 = GSG-9, 3 = SAS, 4 = GIGN, 5 = Random
tjm_block_change 1     <0|1> - 0-permite schimbarea echipelor, 1-blocheaza

hpk_max 200 - jucatorii care depasesc aceasta valoarea sunt dati afara
hpk_time 15 - frecventa (in secunde) de verificare a unui jucator
hpk_tests 8 - numarul minim de teste pe care le face pluginul inainte de a da afara pe un jucator

tf_health_system 1
tf_teams 3
tf_bonus 5

amx_pentru_mod 1


amx_autogag_time "10" // minutele pentru gag cand ia autogag
amx_gag_minute_limit "300" // limita maxima pentru gag minute
amx_gag_minute_in_seconds "60" // minute in secunde
amx_gag_tagname "1" // pune taguri la gag
amx_admingag "0" // poti da si la admini gag daca e egal cu 1, daca e 0 nu poti
amx_maxwords "200" // lista maxima de cuvinte in gag_words.ini
amx_gagtag "*" // tag-ul din chat
si plugin.ini
| Afiseaza codul
; AMX Mod X plugins

; Admin Base - Always one has to be activated
admin.amxx		; admin base (required for any admin-related)
;admin_sql.amxx		; admin base - SQL version (comment admin.amxx)

; Basic
admincmd.amxx		; basic admin console commands
adminhelp.amxx		; help command for admin console commands
adminslots.amxx		; slot reservation
multilingual.amxx	; Multi-Lingual management

; Menus
menufront.amxx		; front-end for admin menus
cmdmenu.amxx		; command menu (speech, settings)
plmenu.amxx		; players menu (kick, ban, client cmds.)
;telemenu.amxx		; teleport menu (Fun Module required!)
mapsmenu.amxx		; maps menu (vote, changelevel)
pluginmenu.amxx		; Menus for commands/cvars organized by plugin

; Chat / Messages
adminchat.amxx		; console chat commands
antiflood.amxx		; prevent clients from chat-flooding the server
scrollmsg.amxx		; displays a scrolling message
;imessage.amxx		; displays information messages
adminvote.amxx		; vote commands

; Map related
nextmap.amxx		; displays next map in mapcycle
mapchooser.amxx		; allows to vote for next map
timeleft.amxx		; displays time left on map

; Configuration
pausecfg.amxx		; allows to pause and unpause some plugins
statscfg.amxx		; allows to manage stats plugins via menu and commands

; Counter-Strike
;restmenu.amxx		; restrict weapons menu
statsx.amxx		; stats on death or round end (CSX Module required!)
;miscstats.amxx		; bunch of events announcement for Counter-Strike
;stats_logging.amxx	; weapons stats logging (CSX Module required!)

; Enable to use AMX Mod plugins
;amxmod_compat.amxx	; AMX Mod backwards compatibility layer

; Custom - Add 3rd party plugins here

team_join.amxx   ; Te baga la echipa CT la conectare.
DRM_trigger_hurt_fix.amxx  ; Pentru pluginul de baza deathrun .
deathrunmanager.amxx ; Pluginul de baza deathrun.
use_button_once.amxx ; Terro poate sa apese o singura data pe buton .
bunnyhop.amxx ; BunnyHop automat pe server
knife_mod.amxx ; Meniu de cutite .
deathrun_duel.amxx ; Ultimul jucator in viata are optiunea de a juca un duel cu teroristul.
allchat.amxx  ; Toti vorbesc intre ei + adminii scriu verde .
amx_slayteam.amxx ; amx_slayteam @CT / @T / @ALL - Da slay la toti.
connect_exec.amxx ; Plugin binduri .
speclist.amxx ; Iti arata cine se uita pe tine sus in colt ( dreapta ) .
ultimele_harti.amxx ; Tastezi in chat /harti si vezi ultimele 5 harti jucate pe server.
SayRestart.amxx ; Tastezi in chat /restart si dai restart la joc .
transfer_life.amxx ; Iti transferi viata altui jucator ( /life NUME )
abcdefghijklmnopqrstu ; Amx_gag avansat .
gamenamechanger.amxx ; Schimbarea numelui de la GameName .
LoadingMenu.amxx ; Iti adauga serverul in meniu (sub quit)
amx_destroy.amxx ; Plugin pentru codati
mesaje2.amxx ; Mesaje colorate in chat.
who2.amxx ; Plugin vezi adminii online .
resetscore.amxx ; Tastezi /rs /reset /resetscore pentru a-ti reseta scorul .
steam_slot.amxx ; Toti cu steam pot primi slot dupa 30 de minute jucate.
admin_player_transfer2.amxx ; Transferi jucatorii direct din chat ( /spec NUME /ct NUME /t NUME )
ieseterrointract.amxx ; Atunci cand iese terro de la joc baga automat un counter in locul lui .
Special_Admin_Gag.amxx
afkkicker.amxx
speedometer.amxx
Last edited by Mădălin on 29 Jan 2014, 00:32, edited 1 time in total.
Reason: Data viitoare foloseşte codul SURSĂ!
RoyalServer
User avatar
FireFox
Membru, skill +3
Membru, skill +3
Posts: 1207
Joined: 23 Jul 2009, 18:03
Detinator Steam: Nu
Detinator server CS: Surf2.MnX.Ro
Reputatie: Membru Club eXtreamCS: 2 luni
Nume anterior: CaTaL!N
Fost Moderator ajutator
Has thanked: 67 times
Been thanked: 104 times

28 Jan 2014, 13:56

REGULI GENERALE : Afișează regulile forumului
1. Utilizati corect limba romana (folositi cuvinte intregi, virgula, punctul si cratima). NU FOLOSITI limbaj de chat!
2. Raspundeti concret! Fara offtopic, fara mesaje scurte, inutile sau deja postate!
* offtopic = reprezinta devierea de la subiectul care se discuta
3. Folosirea cuvintelor sau inregistrarea cu nume obscene/jignitoare duce la restrictionarea accesului, stergerea contului, etc.
4. Este interzis orice atac la persoana. Discutati ideea, nu persoana !
5. Restrictii reclame :
a) Reclama este permisa in subiecte atat timp cat ele au legatura cu idea care se discuta.
b) In semnatura este permisa o singura reclama SIMPLA de tip TEXT cu dimensiunea fontului setat pe NORMAL
c) Reclama nu este permisa in campurile personale gen: Locatie, CS Status.
d) Nu aveti voie sa deschideti topicuri cu referire exacta la un site in scopul obtinerii de vizite, se considera reclama !
6. Nu folositi imagini in semnatura mai mari decat 500x120. Puteti folosi mai multe imagini care, toate sa nu depaseasca marimea impusa !
7. Folositi CAUTAREA si apoi intrebati pentru ceva daca nu exista pe forum! Numele topicurilor create trebuie sa reflecte continutul subiectului pe care se discuta. Nu vor fi permise topicuri de genul: help, ajutor pls, cum fac, etc
8. Este permisa continuarea unei discutii vechi de pe forum, chiar daca aceasta a fost deschisa cu cativa ani in urma. NU se permite insa dublu-post, triplu-post sau UP-uri.
* dublu-post / triplu - post = adaugarea unor mesaje unul dupa altul intr-o discutie a forumului de catre aceeasi persoana
* UP = adaugarea unor mesaje unul dupa altul cu scopul de a scoate in evidenta discutia respectiva
9. Orice fel de continut cu caracter erotic va fi sters, iar daca este necesar se vor aplica avertismente.
10. Nu este permisa promovarea firmelor de hosting in afara de http://www.eXtreamHost.com , fie ca este vorba de o reclama directa sau indirecta.
11. Nu este permisa postarea de continut ilegal: warez, carding (bine cunoscutele "metode" de furat domenii etc.) si alte practici "neortodoxe", se vor aplica avertismente sau ban, dupa caz si antecedente.

SANCTIONAM DRASTIC INCALCAREA ACESTOR REGULI SI ORICE ABUZ !


WARNINGS/Avertismente
3 Avertismente = BAN pe forum pentru o anumita perioada de timp, in functie de gravitatea regulilor incalcate!
1 Avertisment = 15 de zile

Mesaje private
Abuzul in orice fel de folosirea mesajelor private va duce la sanctionare. In concluzie, vi se va lua dreptul de a mai trimite mesaje.
Reclamatiile cat si penalizarile se regasesc aici: discutii-forum/reclamatii-mesaje-private-t335539.html

Suplimentar
1. In semnatura nu sunt permise linkuri catre jocuri (site-uri) gen bitefight, monstergame, etc.
2. La profilul Detinator server CS se permite reclama catre un server de Counter-Strike.
3. Orice insulta adusa asupra unui administrator se penalizeaza cu ban permanent. Orice insulta adusa asupra unui moderator se penalizeaza (in functie de gravitatea situatiei) de la avertisment pana la ban permanent.
4. Nu se permite ridicarea subiectelor cu mesaje gen "UP!" unul dupa altul, indiferent de timpul dintre raspunsuri.


Atentionari
1. Nu se permite schimbarea numelui pe forum
2. Nu aveti voie cu mai mult de 1 cont / persoana (vi se sterg toate mesajele si contul de utilizator de pe forum drept penalizare) - cei care abuzeaza si isi fac mai multe conturi, risca sa primeasca ban permanent

 

Model postare servere :Afiseaza modelul
Va rugam respectati urmatorul model de postare al serverului, completand campurile cu datele corecte:

Titlul va contine: NUMELE / ADRESA IP a serverului si in paranteze patrate Non.Steam / Steam / Steam & Non.Steam
Adresa poate fi de tip: NUME / IP
Port: portul acestuia
Jucatori: 18 / 22 / 24 (sau cat aveti setat)
Tipul poate fi: Non.Stop (merge 24/24 ore) sau PartTime (functioneaza doar ziua sau intre anumite ore ale zilei/noptii)
Modul poate fi: Normal / ZombieMod / SourceMod / Metamod:Source

Anticheat: Protejat / Neprotejat
Tara: RO / US / DE (sau orice alte INITIALE ale tarii respective)

EXEMPLU:
Titlu (sau numele topicului): ExTrEaM [Steam & Non.Steam]
Continut:
    Adresa: extream.idle.ro (acesta este doar un exemplu!)
    Port: 27015
    Jucatori: 18
    Tip: Non.Stop
    Mod: Normal
    Anticheat: Neprotejat
    Tara: RO

----------- Sfarsit exemplu ---------------------

* Nu va lasati adresa la SITE / FORUM in model pentru ca se considera reclama si primiti avertisment sau topicul dvs. ajunge la cos!
* Titlurile vor fi colorate cu rosu ca in exemplul de deasupra !
* Cine NU respecta modelul prezentat i se va STERGE topicul !!
* NU aveti voie sa adaugati comentarii de genul: serverul meu este cel mai tare..etc. pentru ca iarasi vi se va sterge topicul ! Insa puteti lasa alte informatii diverse (un ID Yahoo, un mail, etc.)
Model postare addonsuri : Afiseaza modelul
Acesta este un tip standard pentru postarea unui addons

A. Continut

- Nu mai stergeti folderul scripting din amxmodx pe motiv ca nu avem nevoie sau ca face lag !
- Nu includeti in addons mai multe pluginuri care fac acelasi lucru, gen hpk.
- Nu includeti in addons pluginul show_ip la care orice jucator are acces la comanda amx_ipban.
- Nu includeti in addons pluginuri care nu stiti ce fac.
- Nu personalizati addons-ul cu reclame catre alte site-uri/forum-uri,etc...
- Postati intotdeauna .sma-ul pluginurilor incluse.

B. Postare

Titlul: Va contine tipul addons-ului ( amxmodx/amxmod/adminmod/war3ft/superhero/csdm/etc..)
- Va rog nu folositi in numele topic-ului caractere ! Gen : "-->> addons by me <--"
- Deoarece am observat cateva confuzii, cand postati un addons, nu scrieti in interiorul postului "titlu : addons,blablabla"


Descriere:

Ce contine addons-ul. Adica ce mod, ce versiune, ce alte facilitati are in plus (booster,hlguard,webmod,statsme,etc.)
* Puteti folosi urmatorii termeni :

* Normal - addons standard.
* Normal+ - addons standard dar cu cateva lucruri modificate.
* War3ft - addons cu puteri war3ft.
* UWC3 - addons cu puteri war3ft diverse.
* Respawn/CSDM - addons care te reinvie imediat dupa ce mori.
* Soccerjam - addons cu fifa/cs instalat.
* Zombie - addons in care jucatorii trebuie 'infectati' de un zombie.
* DeathRun - addons in care jucatorii trebuie sa treaca de obstacole
* Hide N'Seek - addons in
* Divers - addons Neinclus in aceste tipuri (daca credeti ca mai trebuie adaugat un alt tip trimiteti-mi mesaj pe privat !)

Autor: Cine a facut addonsul respectiv
Versiune: 1.x 2.x
Descarcare:

Code:
[url=Linkul_catre_addons]Link![/url]


Pluginuri: aici veti scrie ce pluginuri are addons-ul postat (fara cele de baza) si ce fac acestea !
plugin1.amxx - ce face pluginul respectiv
plugin2.amxx - ce face pluginul respectiv
plugin3.amxx - ce face pluginul respectiv

ATENTIE !
- Daca vreti sa postati un addons care nu este facut de dvs.,folositi intai cautarea pentru a va asigura ca addons-ul respectiv nu este deja postat de altcineva !
- De asemenea,daca incercati sa ne pacaliti cu un addons copiat si punandu-va pe dvs ca si autor,topicul va fi mutat la Cos si riscati sa primiti warn !
- NU postati tot link-ul catre addons ! Ci folositi ]URL :
Code:
[url=linkul_catre_addons]cuvant[/url]


C. Raspuns/Reply
1.Cei care posteaza addons-ul !
Daca vi se zice "gj,misto addons" nu raspundeti cu "merci,alte pareri",etc...

2.Cei care raspund !
Nu faceti reply-uri de gen-ul "gj","bravo","misto addons","gg tare",etc...

3.Copiere !
Daca vi se pare ca un addons postat este copiat, nu faceti replay cu "copiat,praf","addons-ul este copiat","nu tu l-ai facut".etc.. ci veniti cu o dovada daca vreti sa fiti bagati in seama! Daca aduceti acuzatii false riscati sa primiti warn ! De asemenea, nu aduceti cuvinte vulgare la adresa autorului, veti primi fara nici o ezitare warn sau chiar ban !
[regulia][/regulia]
csbogdancs
Membru, skill +1
Membru, skill +1
Posts: 125
Joined: 03 Jan 2014, 15:25
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Has thanked: 19 times
Contact:

28 Jan 2014, 14:11

nu merge niciunu numa 3 merge ..
Cosmin
Fost moderator
Fost moderator
Posts: 9362
Joined: 06 Jul 2013, 22:08
Detinator Steam: Da
Detinator server CS: Nu
Reputatie: Fost eXtream Mod
Fost Scripter eXtreamCS
Nume anterior: scosmynnnn
Has thanked: 492 times
Been thanked: 547 times

28 Jan 2014, 19:42

Pai ai 2 variante:
1.In plugin_init cauti comanda pe care vrei sa o ascunzi,sa nu se mai vada in chat si faci asa:
register_clcmd("say /vipmenu","clcmdShop", -1)
->>
register_clcmd("/vipmenu","clcmdShop", -1)

Deci numai pui acel 'say'

2.Aici cauti comanda in init gen' register_clcmd("say /vipmenu","clcmdShop" -1) , cauti publicul de la aceasta comanda(publicul este acela hasurat cu negru) si adaugi la finalul lui return 1
csbogdancs
Membru, skill +1
Membru, skill +1
Posts: 125
Joined: 03 Jan 2014, 15:25
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Has thanked: 19 times
Contact:

29 Jan 2014, 18:28

scosmynnnn wrote:Pai ai 2 variante:
1.In plugin_init cauti comanda pe care vrei sa o ascunzi,sa nu se mai vada in chat si faci asa:
register_clcmd("say /vipmenu","clcmdShop", -1)
->>
register_clcmd("/vipmenu","clcmdShop", -1)

Deci numai pui acel 'say'

2.Aici cauti comanda in init gen' register_clcmd("say /vipmenu","clcmdShop" -1) , cauti publicul de la aceasta comanda(publicul este acela hasurat cu negru) si adaugi la finalul lui return 1
si unde sar gasi plugin_init??
Cosmin
Fost moderator
Fost moderator
Posts: 9362
Joined: 06 Jul 2013, 22:08
Detinator Steam: Da
Detinator server CS: Nu
Reputatie: Fost eXtream Mod
Fost Scripter eXtreamCS
Nume anterior: scosmynnnn
Has thanked: 492 times
Been thanked: 547 times

29 Jan 2014, 23:17

in fisierul .sma
csbogdancs
Membru, skill +1
Membru, skill +1
Posts: 125
Joined: 03 Jan 2014, 15:25
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Has thanked: 19 times
Contact:

31 Jan 2014, 10:01

thx cosmy

l-am gasit dar ... tot nu merge
| Afiseaza codul
/* AMX Mod X
*   Plugin Cvar and Command Menu
*
* by the AMX Mod X Development Team
*
* This file is part of AMX Mod X.
*
*
*  This program is free software; you can redistribute it and/or modify it
*  under the terms of the GNU General Public License as published by the
*  Free Software Foundation; either version 2 of the License, or (at
*  your option) any later version.
*
*  This program is distributed in the hope that it will be useful, but
*  WITHOUT ANY WARRANTY; without even the implied warranty of
*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
*  General Public License for more details.
*
*  You should have received a copy of the GNU General Public License
*  along with this program; if not, write to the Free Software Foundation, 
*  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*  In addition, as a special exception, the author gives permission to
*  link the code of this program with the Half-Life Game Engine ("HL
*  Engine") and Modified Game Libraries ("MODs") developed by Valve, 
*  L.L.C ("Valve"). You must obey the GNU General Public License in all
*  respects for all of the code used other than the HL Engine and MODs
*  from Valve. If you modify this file, you may extend this exception
*  to your version of the file, but you are not obligated to do so. If
*  you do not wish to do so, delete this exception statement from your
*  version.
*/

#include <amxmodx>
#include <amxmisc>



new DisabledCallback;
new EnabledCallback;

// pcvar that the client is currently modifying
new CurrentCvar[33];

// Name of the cvar being modified
new CurrentCvarName[33][32];

// Plugin ID that the client is modifying
new CurrentPlid[33];

// Page that the client is currently on
new CurrentPage[33];

// Menu function ID that the client is in
new CurrentMenuFunction[33] = { -1,... };

new CurrentCommand[33][32];
new cvarmenu_cmdid;
new cmdmenu_cmdid;

new ExplicitPlugin[33];

public plugin_init()
{
	register_plugin("Plugin Menu",AMXX_VERSION_STR,"AMXX Dev Team");
	
	register_dictionary("common.txt");
	register_dictionary("pausecfg.txt"); // Needed for PAUSE_COULDNT_FIND
	
	cvarmenu_cmdid=register_clcmd("amx_plugincvarmenu", "CvarMenuCommand", ADMIN_CVAR, " - displays the plugin cvar menu");
	cmdmenu_cmdid=register_clcmd("amx_plugincmdmenu", "CommandMenuCommand", ADMIN_MENU, " - displays the plugin command menu");
	
	register_clcmd("amx_changecvar","CommandChangeCvar");
	register_clcmd("amx_executecmd","CommandExecuteCommand");
	register_clcmd("/knife","clcmdknifemod", -1)
                register_clcmd("/admin","clcmdultimate_who", -1)
                register_clcmd("/","clcmd", -1)

	// Register global menu callbacks.
	DisabledCallback=menu_makecallback("AlwaysDisableCallback");
	EnabledCallback=menu_makecallback("AlwaysEnableCallback");
}

// Add these menus to the amxmodmenu
public plugin_cfg()
{
	set_task(0.1, "addToMenuFront");
}
public addToMenuFront()
{
	new PluginFileName[64];
	
	get_plugin(-1, PluginFileName, charsmax(PluginFileName));
	new cvarflags;
	new cmdflags;
	new garbage[1];
	new cmd[32];

	get_concmd(cmdmenu_cmdid, cmd, charsmax(cmd), cmdflags, garbage, charsmax(garbage), -1);

	if (strcmp(cmd, "amx_plugincmdmenu") != 0)
	{
		// this should never happen, but just incase!
		cmdflags = ADMIN_MENU;
	}
	get_concmd(cvarmenu_cmdid, cmd, charsmax(cmd), cvarflags, garbage, charsmax(garbage), -1);

	if (strcmp(cmd, "amx_plugincvarmenu") != 0)
	{
		// this should never happen, but just incase!
		cvarflags = ADMIN_CVAR;
	}

	AddMenuItem("Plugin Cvars", "amx_plugincvarmenu", cvarflags, PluginFileName);
	AddMenuItem("Plugin Commands", "amx_plugincmdmenu", cmdflags, PluginFileName);
}

// Reset all fields for each client as they connect.
public client_connect(id)
{
	CurrentCvar[id]=0;
	CurrentPlid[id]=0;
	CurrentMenuFunction[id]=-1;
	CurrentCvarName[id][0]=0;
	CurrentCommand[id][0]=0;
	ExplicitPlugin[id]=-1;
	
}

/**
 * Creates a plugin list menu.
 *
 * @param MenuText		The text to display as the title.
 * @param Handler		The function to call when an item is selected.
 * @param Command		The function to pass to the handler.  It will be passed as "PLID Command".
 * @param Callback		Function to call for each plugin to be listed.  Displays a number next to it (how many cvars, etc.)
 */
stock DisplayPluginMenu(id,const MenuText[], const Handler[], const Command[], const Callback[])
{
	new Menu=menu_create(MenuText,Handler);
	
	
	new PluginState[32];
	new PluginName[64];
	new func=get_func_id(Callback);
	new tally;
	new PluginCmd[64];
	new MenuText[64];
	for (new i=0, max=get_pluginsnum();
		 i<max;
		 i++)
	{
		if (callfunc_begin_i(func,-1)==1)
		{
			callfunc_push_int(i); // push the plid
			if ((tally=callfunc_end())>0)
			{
				get_plugin(i,"",0,PluginName,sizeof(PluginName)-1,"",0,"",0,PluginState,sizeof(PluginState)-1);
						
				// Command syntax is: "# Function", # being plugin ID, function being public function to call.
				formatex(PluginCmd,sizeof(PluginCmd)-1,"%d %s",i,Command);
				formatex(MenuText,sizeof(MenuText)-1,"%s - %d",PluginName,tally);
				// If the plugin is running, add this as an activated menu item.
				if (strcmp(PluginState,"running",true)==0 ||
					strcmp(PluginState,"debug",  true)==0)
				{
					menu_additem(Menu,MenuText,PluginCmd,EnabledCallback);
				}
				else
				{
					menu_additem(Menu,MenuText,"",_,DisabledCallback);
				}
			}
		}
	}

	menu_setprop(Menu,MPROP_NUMBER_COLOR,"\y");
	menu_setprop(Menu,MPROP_EXIT,MEXIT_ALL);
	menu_display(id,Menu,0);

}

/**
 * Byrefs the plugin id of a target plugin (passed by argv(1)), but only if it's valid.
 *
 * @param id			id of the display messages to upon failure.
 * @param plid			Variable to byref the plugin id.
 * @return				True on successful lookup, false on failure.
 */
stock bool:GetPlidForValidPlugins(id, &plid)
{
	// If arguments have been passed, then we were given
	// a specific plugin to examine.
	if (read_argc()>1)
	{ 
		// Yes, we were provided a plugin.
		new TargetPlugin[64];
		read_argv(1,TargetPlugin,sizeof(TargetPlugin)-1);
		
		new BufferName[64];
		new BufferFile[64];
		new BufferState[64];
		// Scan for the plugin ID.
		for (new i=0, max=get_pluginsnum();
			 i<max;
			 i++)
		{
			get_plugin(i,BufferFile,sizeof(BufferFile)-1,BufferName,sizeof(BufferName)-1,"",0,"",0,BufferState,sizeof(BufferState)-1);
			
			if (strcmp(BufferFile,TargetPlugin,true) != 0||
				strcmp(BufferName,TargetPlugin,true) != 0)
			{
				// We have a match.
				
				// Check the status of the plugin.  If it's anything other than "running" or "debug" fail.
				if (strcmp(BufferState,"running") != 0 &&
					strcmp(BufferState,"debug")   != 0)
				{
					// TODO: ML This
					console_print(id,"Plugin ^"%s^" is not running.",BufferFile);
					// Return a failed state.
					return false;
				}
				plid=i;
				break;
			}
		}
		
		// If the plugin was not found, then tell them there was an error.
		if (plid==-1)
		{
			console_print(id, "%L", id, "PAUSE_COULDNT_FIND", TargetPlugin);
			
			// return a failure state
			return false;
		}
	}
	
	return true;
}

/**
 * Returns the number of cvars available for a plugin by plid. (Callback for the plugin menu.)
 *
 * @return 				number of cvars in the plugin.
 */
public GetNumberOfCvarsForPlid(plid)
{
	new count=0;
	new CvarPlid;
	for (new i=0, max=get_plugins_cvarsnum();
		 i<max;
		 i++)
	{
		get_plugins_cvar(i, "", 0,_, CvarPlid, _);
		
		if (CvarPlid==plid)
		{
			count++;
		}
	}
	
	return count;
}
/**
 * Returns the number of commands available for a plugin by plid. (Callback for the plugin menu.)
 *
 * @return				Number of valid commands in the plugin.
 */
public GetNumberOfCmdsForPlid(plid)
{
	new count=0;
	
	for (new i=0, max=get_concmdsnum(-1,-1);
		 i<max;
		 i++)
	{
		if (get_concmd_plid(i,-1,-1)==plid)
		{
			count++;
		}
	}
	
	return count;
}

/**
 * Whether or not the client has access to modify this cvar.
 *
 * @param id			The admin id.
 * @param Cvar			The name of the cvar to be checked.
 * @return				True if the client has access, false otherwise.
 */
stock bool:CanIModifyCvar(id, const Cvar[])
{
	new UserFlags=get_user_flags(id);
	// If the user has rcon access don't bother checking anything.
	if (UserFlags & ADMIN_RCON)
	{
		return true;
	}
	
	// If the cvar is "sv_password" (somehow), then check access.
	if (equali(Cvar,"sv_password") && UserFlags & ADMIN_PASSWORD)
	{
		return true;
	}
	
	// Check to see if the cvar is flagged as protected.
	if (get_cvar_flags(Cvar) & FCVAR_PROTECTED)
	{
		// non-rcon user trying to modify a protected cvar.
		return false;
	}
	
	// All known checks done, they can change this cvar if they
	// were able to open the menu.
	return true;
}

/**
 * Simple function to ensure that a menu item is always disabled.
 *
 * All parameters are dummy, nothing is used.
 */
public AlwaysDisableCallback(playerid, menuid, itemid)
{
	return ITEM_DISABLED;
}
/**
 * Simple function to ensure that a menu item is always enabled.
 *
 * All parameters are dummy, nothing is used.
 */
public AlwaysEnableCallback(playerid, menuid, itemid)
{
	return ITEM_ENABLED;
}
/**
 * Handler for the plugin menu.
 *
 * @param id		The client selecting an item.
 * @param menu		The menu handle.
 * @param item		The item number that was selected.
 */
public PluginMenuSelection(id, menu, item)
{
	if (item==MENU_EXIT)
	{
		menu_destroy(menu);
	}
	if (item<0)
	{
		return PLUGIN_HANDLED;
	}
	
	new Command[64];
	new Dummy[1];
	
	// All of the commands set for each item is the public
	// function that we want to call after the item is selected.
	// The parameters are: function(idPlayer,itemnumber)
	// Note the menu is destroyed BEFORE the command
	// gets executed.
	// The command retrieved is in the format: "PLID Command"
	menu_item_getinfo(menu, item, Dummy[0], Command, sizeof(Command)-1,Dummy,0,Dummy[0]);
	
	
	new plid=str_to_num(Command);
	new Function[32];
	
	for (new i=0;i<sizeof(Command)-1;i++)
	{
		if (Command==' ')
		{
			// we're at the break. move up one space.
			i++;
			copy(Function,sizeof(Function)-1,Command);
			break;
		}
	}
	
	menu_destroy(menu);
	
	new funcid=get_func_id(Function);
	if (funcid != -1 && callfunc_begin_i(funcid)==1)
	{
		CurrentPage[id]=0;
		CurrentPlid[id]=plid;
		CurrentMenuFunction[id]=funcid;
		callfunc_push_int(id);
		callfunc_push_int(plid);
		callfunc_push_int(0);
		callfunc_end();
		
	}
	return PLUGIN_HANDLED;
}

/**
 * The command to change a cvar has been called.
 *
 * @param id		The client who is changing the cvar.
 */
public CommandChangeCvar(id)
{
	// All access checks are done before this command is called.
	// So if the client has no pcvar pointer in his array slot
	// then just ignore the command.
	if (CurrentCvar[id]==0)
	{
		return PLUGIN_CONTINUE;
	}
	
	new Args[256];
	
	read_args(Args,sizeof(Args)-1);
	
	remove_quotes(Args);
	
	if (equali(Args,"!cancel",7))
	{
		// The client didn't want to change this cvar.
		client_print(id,print_chat,"[AMXX] Cvar not changed.");
	}
	else
	{
		// Changed to set_cvar_* for 1.76 tests
		
		new pointer=CurrentCvar[id];
		set_pcvar_string(CurrentCvar[id],Args);
		
		client_print(id,print_chat,"[AMXX] Cvar ^"%s^" changed to ^"%s^"",CurrentCvarName[id],Args);
		
		// Copy of admincmd's global output.
		
		new Name[32];
		new AuthID[40];
		
		get_user_name(id,Name,sizeof(Name)-1);
		get_user_authid(id,AuthID,sizeof(AuthID)-1);
		
		log_amx("Cmd: ^"%s<%d><%s><>^" set cvar (name ^"%s^") (value ^"%s^")", Name, get_user_userid(id), AuthID, CurrentCvarName[id], Args);
	
	
		new cvar_val[64];
		new maxpl = get_maxplayers();
		for (new i = 1; i <= maxpl; i++)
		{
			if (is_user_connected(i) && !is_user_bot(i))
			{
				if (get_pcvar_flags(pointer) & FCVAR_PROTECTED || equali(Args, "rcon_password"))
				{
					formatex(cvar_val, charsmax(cvar_val), "*** %L ***", i, "PROTECTED");
				}
				else
				{
					copy(cvar_val, charsmax(cvar_val), Args);
				}
				show_activity_id(i, id, Name, "%L", i, "SET_CVAR_TO", "", CurrentCvarName[id], cvar_val);
			}
		}
		console_print(id, "[AMXX] %L", id, "CVAR_CHANGED", CurrentCvarName[id], Args);
		
	}
	
	// Now redraw the menu for the client
	if (CurrentMenuFunction[id]!=-1 && callfunc_begin_i(CurrentMenuFunction[id])==1)
	{
		callfunc_push_int(id);
		callfunc_push_int(CurrentPlid[id]);
		callfunc_push_int(CurrentPage[id]);
		callfunc_end();
	}
	
	return PLUGIN_HANDLED;
}

/**
 * Process a selection from the cvar menu.
 *
 * @param id		The client who chose an item.
 * @param menu		The menu handle.
 * @param item		The item that has been selected.
 */
public CvarMenuSelection(id, menu, item)
{
	
	if (item==MENU_EXIT)
	{
		menu_destroy(menu);
		
		if (ExplicitPlugin[id]==-1)
		{
			client_cmd(id,"amx_plugincvarmenu");
		}
		return PLUGIN_HANDLED;
	}
	else if (item==MENU_BACK)
	{
		--CurrentPage[id];
		client_print(id,print_chat,"MENU_BACK");
		return PLUGIN_HANDLED;
	}
	else if (item==MENU_MORE)
	{
		++CurrentPage[id];
		client_print(id,print_chat,"MENU_MORE");
		return PLUGIN_HANDLED;
	}
	else
	{
		new CvarName[64];
		new Command[32];
		new Dummy[1];
		// pcvar pointer is stored in command, extract the name of the cvar from the name field.
		menu_item_getinfo(menu, item, Dummy[0], Command, sizeof(Command)-1,CvarName,sizeof(CvarName)-1,Dummy[0]);
		
		CurrentCvar[id]=str_to_num(Command);
		
		if (CurrentCvar[id]==0) // This should never happen, but just incase..
		{
			client_print(id,print_chat,"[AMXX] There was an error extracting the cvar pointer. (Name=^"%s^")",CvarName);
			return PLUGIN_HANDLED;
		}
		// TODO: ML this
		
		// Scan up "CvarName" and stop at the first space
		for (new i=0;i<sizeof(CvarName)-1;i++)
		{
			if (CvarName==' ')
			{
				CvarName='^0';
				break;
			}
		}
		copy(CurrentCvarName[id],sizeof(CurrentCvarName[])-1,CvarName);
		client_print(id,print_chat,"[AMXX] Type in the new value for %s, or !cancel to cancel.",CvarName);
		client_cmd(id,"messagemode amx_changecvar");
		
		menu_destroy(menu);
		return PLUGIN_HANDLED;
	}
	
	return 0;
}
/**
 * Displays the cvar menu to a client.
 *
 * @param id		id of the client.
 * @param plid		Plugin ID to display cvars from.
 * @param page		Page of the menu to start at.
 */
public DisplayCvarMenu(id, plid, page)
{
	new PluginName[32];
	new MenuTitle[64];
	get_plugin(plid,"",0,PluginName,sizeof(PluginName)-1,"",0,"",0,"",0);
	
	formatex(MenuTitle,sizeof(MenuTitle)-1,"%s Cvars:",PluginName);
	
	new Menu=menu_create(MenuTitle,"CvarMenuSelection");
	
	new Cvar[64];
	new CvarPlid;
	new CvarText[64];
	new CvarData[32];
	new CvarPtr;
	
	for (new i=0, max=get_plugins_cvarsnum();
		 i<max;
		 i++)
	{
		get_plugins_cvar(i, Cvar, sizeof(Cvar),_, CvarPlid, CvarPtr);
		
		if (CvarPlid==plid)
		{
			if (CanIModifyCvar(id,Cvar))
			{
				get_pcvar_string(CvarPtr,CvarData,sizeof(CvarData)-1);
				formatex(CvarText,sizeof(CvarText)-1,"%s - %s",Cvar,CvarData);
				
				// Now store the pcvar data in Cvar
				num_to_str(CvarPtr,Cvar,sizeof(Cvar)-1);
				menu_additem(Menu,CvarText,Cvar,_,EnabledCallback);
			}
			else
			{
				menu_additem(Menu,Cvar,"",_,DisabledCallback);
			}
			
		}
	}
	
	menu_setprop(Menu,MPROP_EXIT,MEXIT_ALL);
	menu_setprop(Menu,MPROP_NUMBER_COLOR,"\y");
	menu_display(id,Menu,page);

}
/**
 * Process the "amx_plugincvarmenu" command.
 *
 * @param id		id of the client that is calling the command.
 * @param level		Access level required by the command.
 * @param cid		Command ID.
 */
public CvarMenuCommand(id, level, cid)
{
	if (!cmd_access(id,level,cid,0))
	{
		return PLUGIN_HANDLED;
	}
	
	// This is which plugin to display.  -1 means display all plugins in a list.
	new plid=-1;
	
	if (GetPlidForValidPlugins(id,plid)!=true)
	{
		// If GetPlidForValidPlugins returns false then it failed to find the plugin.
		return PLUGIN_HANDLED;
	}
	
	// Check if we were passed a specific plugin to display or not.
	if (plid==-1)
	{
		ExplicitPlugin[id]=-1;
		// We need to display a list of the plugins, instead of a specific plugin.
		DisplayPluginMenu(id,"Plugin Cvar Menu:", "PluginMenuSelection","DisplayCvarMenu","GetNumberOfCvarsForPlid");
	}
	else
	{
		ExplicitPlugin[id]=plid;
		CurrentPlid[id]=plid;
		CurrentPage[id]=0;
		DisplayCvarMenu(id,plid,0);
	}
	return PLUGIN_HANDLED;
}
/**
 * Handler for the menu that displays a single command ("Execute with no params", etc).
 *
 * @param id		Id of the client.
 * @param menu		Menu handle.
 * @param item		Item that was selected.
 */
public SpecificCommandHandler(id,menu,item)
{
	// Exit was called, return to the previous menu.
	if (item<0)
	{	
		if (CurrentMenuFunction[id]!=-1 && callfunc_begin_i(CurrentMenuFunction[id])==1)
		{
			callfunc_push_int(id);
			callfunc_push_int(CurrentPlid[id]);
			callfunc_push_int(CurrentPage[id]);
			callfunc_end();
		}
		menu_destroy(menu);
		
		return PLUGIN_HANDLED;
	}
	
	new Dummy[1];
	if (item==0)  // "With params"
	{
		menu_item_getinfo(menu, item, Dummy[0], CurrentCommand[id], sizeof(CurrentCommand[])-1,"",0,Dummy[0]);
		if (CurrentCommand[id][0]==0) // This should never happen, but just incase..
		{
			client_print(id,print_chat,"[AMXX] There was an error extracting the command name.");
			return PLUGIN_HANDLED;
		}
		// TODO: ML this
		
		client_print(id,print_chat,"[AMXX] Type in the parameters for %s, or !cancel to cancel.",CurrentCommand[id]);
		client_cmd(id,"messagemode amx_executecmd");
		
		menu_destroy(menu);
		
		return PLUGIN_HANDLED; // Don't return to original menu immediately!
	}
	else if (item==1) // "No params"
	{
		menu_item_getinfo(menu, item, Dummy[0], CurrentCommand[id], sizeof(CurrentCommand[])-1,"",0,Dummy[0]);
		if (CurrentCommand[id][0]==0) // This should never happen, but just incase..
		{
			client_print(id,print_chat,"[AMXX] There was an error extracting the command name.");
			return PLUGIN_HANDLED;
		}
		// TODO: ML this

		// Now redraw the menu for the client BEFORE the command is executed, incase
		// that menu brings up a menu of its own.
		if (CurrentMenuFunction[id]!=-1 && callfunc_begin_i(CurrentMenuFunction[id])==1)
		{
			callfunc_push_int(id);
			callfunc_push_int(CurrentPlid[id]);
			callfunc_push_int(CurrentPage[id]);
			callfunc_end();
		}
		menu_destroy(menu);
		
		client_cmd(id,"%s",CurrentCommand[id]);
		client_print(id,print_chat,"[AMXX] Command ^"%s^" executed with no parameters",CurrentCommand[id]);
		
		return PLUGIN_HANDLED;
	}
	
	// We should never get here, but just incase..
	menu_destroy(menu);
	
	return PLUGIN_HANDLED;
}

/**
 * Generates and displays a menu to the client for a specific command.
 *
 * @param id		The client to display the menu to.
 * @param cid		The command id to display.
 */
stock DisplaySpecificCommand(id,cid)
{
	new CommandName[64];
	new CommandDesc[128];
	new CommandTitle[256];
	new CommandAccess;
	new Menu;
	
	get_concmd(cid,CommandName,sizeof(CommandName)-1,CommandAccess, CommandDesc,sizeof(CommandDesc)-1, -1, -1);
	
	if (CommandDesc[0]!='^0')
	{
		formatex(CommandTitle,sizeof(CommandTitle)-1,"%s^n%s",CommandName,CommandDesc);
		Menu=menu_create(CommandTitle,"SpecificCommandHandler");
	}
	else
	{
		Menu=menu_create(CommandName,"SpecificCommandHandler");
	}
	menu_additem(Menu,"Execute with parameters.",CommandName,_,EnabledCallback);
	menu_additem(Menu,"Execute with no parameters.",CommandName,_,EnabledCallback);
	
	menu_setprop(Menu,MPROP_NUMBER_COLOR,"\y");
	menu_display(id,Menu,0);
}

/**
 * Handles the executed command (via "amx_executecmd").
 *
 * @param id		The id of the client who executed this.
 */
public CommandExecuteCommand(id)
{
	// If they had no command stored, then just ignore it entirely.
	if (CurrentCommand[id][0]=='^0')
	{
		return PLUGIN_CONTINUE;
	}
	
	new Args[256];
	
	read_args(Args,sizeof(Args)-1);
	
	remove_quotes(Args);
	
	if (equali(Args,"!cancel",7))
	{
		// The client didn't want to execute this command.
		client_print(id,print_chat,"[AMXX] Command not executed.");
		
		// Now redraw the menu for the client
		if (CurrentMenuFunction[id]!=-1 && callfunc_begin_i(CurrentMenuFunction[id])==1)
		{
			callfunc_push_int(id);
			callfunc_push_int(CurrentPlid[id]);
			callfunc_push_int(CurrentPage[id]);
			callfunc_end();
		}

	}
	else
	{
		// TODO: ML
		client_print(id,print_chat,"[AMXX] Command ^"%s^" executed with ^"%s^"",CurrentCommand[id],Args);

		// Now redraw the menu for the client
		if (CurrentMenuFunction[id]!=-1 && callfunc_begin_i(CurrentMenuFunction[id])==1)
		{
			callfunc_push_int(id);
			callfunc_push_int(CurrentPlid[id]);
			callfunc_push_int(CurrentPage[id]);
			callfunc_end();
		}
		
		// Execute the command on the client.
		client_cmd(id,"%s %s",CurrentCommand[id],Args);
	}
	
	
	return PLUGIN_HANDLED;
	
}

/**
 * Handle a specific selection from the command menu.
 *
 * @param id		id of the client who made the selection.
 * @param menu		The menu handle.
 * @param item		The item that was selected.
 */
public CommandMenuSelection(id, menu, item)
{
	
	if (item==MENU_EXIT)
	{
		menu_destroy(menu);

		// If the player did not explicitly specify a plugin, return them to the 
		// plugin selection menu.
		
		if (ExplicitPlugin[id]==-1)
		{
			client_cmd(id,"amx_plugincmdmenu");
		}
		return PLUGIN_HANDLED;
	}
	else if (item==MENU_BACK)
	{
		--CurrentPage[id];
		client_print(id,print_chat,"MENU_BACK");
		return PLUGIN_HANDLED;
	}
	else if (item==MENU_MORE)
	{
		++CurrentPage[id];
		client_print(id,print_chat,"MENU_MORE");
		return PLUGIN_HANDLED;
	}
	else
	{
		new Command[32];
		new Dummy[1];
		// pcvar pointer is stored in command, extract the name of the cvar from the name field.
		menu_item_getinfo(menu, item, Dummy[0], Command, sizeof(Command)-1,"",0,Dummy[0]);
		
		menu_destroy(menu);
		
		DisplaySpecificCommand(id,str_to_num(Command));
		return PLUGIN_HANDLED;
	}
	
	return 0;
}
/**
 * This blocks "say" and "say_team" commands. 
 * Other commands that shouldn't be displayed (eg: amxauth<stuff>) should be filtered out already.
 *
 * @param Command	The command that is being checked.
 */
stock bool:IsDisplayableCmd(const Command[])
{
	// Block "say" and "say_team"
	if (equal(Command,"say",3))
	{
		return false;
	}
	
	return true;
}
/**
 * Displays a command list for the specified plugin.
 *
 * @param id		Id of the client that's being displayed to.
 * @param plid		Plugin ID of the plugin that is to be displayed.
 * @param page		The page to start at.
 */
public DisplayCmdMenu(id, plid, page)
{
	new PluginName[32];
	new MenuTitle[64];
	get_plugin(plid,"",0,PluginName,sizeof(PluginName)-1,"",0,"",0,"",0);
	
	formatex(MenuTitle,sizeof(MenuTitle)-1,"%s Commands:",PluginName);
	
	new Menu=menu_create(MenuTitle,"CommandMenuSelection");
	
	new Command[64];
	new CidString[32];
	new CommandAccess;
	new userflags=get_user_flags(id);
	new bool:isadmin=bool:is_user_admin(id);
	
	
	for (new i=0, max=get_concmdsnum(-1,-1);
		 i<max;
		 i++)
	{
		if (get_concmd_plid(i,-1,-1)==plid)
		{
			get_concmd(i,Command,sizeof(Command)-1,CommandAccess, "",0, -1, -1);
			
			if (IsDisplayableCmd(Command))
			{
				if ( userflags & CommandAccess || 
					(CommandAccess==ADMIN_ADMIN && isadmin) ||
					 CommandAccess==ADMIN_USER ||
					 CommandAccess==ADMIN_ALL)
				{
					num_to_str(i,CidString,sizeof(CidString)-1);
					menu_additem(Menu,Command,CidString,0,EnabledCallback);
				}
				else
				{
					menu_additem(Menu,Command,"",0,DisabledCallback);
				}
			}
		}
	}
	menu_setprop(Menu,MPROP_NUMBER_COLOR,"\y");
	menu_display(id,Menu,page);

}
/**
 * Handles the "amx_plugincmdmenu" command.
 *
 * @param id		Id of the client that's being checked.
 * @param level		Access level of the command.
 * @param cid		Command ID of the command that was executed.
 */
public CommandMenuCommand(id, level, cid)
{
	if (!cmd_access(id,level,cid,0))
	{
		return PLUGIN_HANDLED;
	}
	
	// This is which plugin to display.  -1 means display all plugins in a list.
	new plid=-1;
	
	if (GetPlidForValidPlugins(id,plid)!=true)
	{
		// If GetPlidForValidPlugins returns false then it failed to find the plugin.
		return PLUGIN_HANDLED;
	}
	
	// Check if we were passed a specific plugin to display or not.
	if (plid==-1)
	{
		// We need to display a list of the plugins, instead of a specific plugin.
		ExplicitPlugin[id]=-1;
		DisplayPluginMenu(id,"Plugin Command Menu:", "PluginMenuSelection","DisplayCmdMenu","GetNumberOfCmdsForPlid");
	}
	else
	{
		ExplicitPlugin[id]=plid;
		CurrentPlid[id]=plid;
		CurrentPage[id]=0;
		DisplayCmdMenu(id,plid,0);
	}
	return PLUGIN_HANDLED;
}


l-am si compliat si tot nu :|

sau modificatimil voi si datimil plsss
User avatar
Mădălin
Administrator
Administrator
Posts: 5293
Joined: 06 Mar 2013, 21:40
Detinator Steam: Nu
Reputatie: Administrator
Fost manager cs.extream.ro
Web designer
Administratorul anului 2023
Has thanked: 45 times
Been thanked: 310 times
Contact:

01 Feb 2014, 02:21

Nu e eroare.. era din cauza că nu era bine aranjat codul, erau 2 avertismente, dar el putea fi compilat! Mai jos ţi-am lăsat eu, link cu .sma + .amxx.

Download: http://www.girlshare.ro/33230006.7
csbogdancs
Membru, skill +1
Membru, skill +1
Posts: 125
Joined: 03 Jan 2014, 15:25
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Has thanked: 19 times
Contact:

22 Feb 2014, 05:56

madalyn nu merge..
User avatar
SkillartzHD
Membru, skill +3
Membru, skill +3
Posts: 1096
Joined: 08 Feb 2013, 19:43
Detinator Steam: Da
CS Status: HLDS Vulnerability
Detinator server CS: GoldSrc
SteamID: SkillartzHD_hlds
Reputatie: Fost Moderator ajutator
Location: Bucuresti
Has thanked: 14 times
Been thanked: 28 times
Contact:

26 Feb 2014, 01:37

:)) , cauta un alt colorchat
Project by HLDS-Project 2017
Static Emulator : Native | Random Emulator : SettiEmu/AVSMP1/AVSMP0/SteamEmu/oldRevEmu/RevEmu is done
KickASS-HLDS v2 (hlds)
KickASS-HLDS v1 (fakedetector)
HL-ClientSteam exploit (pure hlds)
PLCore exploit (dproto&hlds)
FakeConnect 2.0(reunion&rehlds)
KickASS-HLDS v3 in amxx(hlds&rehlds)
...... time passes and evidence are many
Special thanks to Spanwer and Magister
Skype : spyware.spyware1
Steam : Click

SV_CheckForDuplicateNames V2 download
Post Reply

Return to “Probleme la servere dedicate de Counter-Strike”

  • Information
  • Who is online

    Users browsing this forum: Majestic-12 [Bot] and 86 guests