1. GSManager
    1. Funktionen
    2. Unterstützte Spiele
    3. Neuigkeiten
    4. Statistiken
    5. Serverliste
  2. Lexikon
  3. Filebase
  4. Entwicklung
  5. Forum
    1. Dashboard
    2. Unerledigte Themen
  6. Web-Interface
  7. Artikel
  8. Mitglieder
    1. Letzte Aktivitäten
    2. Benutzer online
    3. Team
    4. Mitgliedersuche
  • Anmelden
  • Registrieren
  • Suche
Dieses Thema
  • Alles
  • Dieses Thema
  • Dieses Forum
  • Artikel
  • Seiten
  • Dateien
  • Forum
  • Lexikon
  • Erweiterte Suche
  1. GSManager
  2. Forum
  3. Erweiterungen
  4. Anfragen

Only Plugin

  • Mirko911
  • 24. Januar 2012 um 21:55
Das Projekt GSManager (vormals ManuAdminMod) wurde am 01.01.2020 eingestellt - diese Internetpräsenz bleibt verfügbar, die Software wird aber nicht länger gepflegt. Vielen Dank für eure Unterstützung in den mehr als zehn vergangenen Jahren!
  • Mirko911
    Entwickler
    Reaktionen
    165
    Punkte
    16.820
    Trophäen
    6
    Beiträge
    3.263
    Einträge
    11
    • 24. Januar 2012 um 21:55
    • #1

    Only-Plugin (Version: 1.0.0)
    Add only-rounds to the Server

    [tabmenu]
    [tab='Requirements']
    ManuAdminMod Version 0.11.3 or newer

    [tab='Description']
    With this plugin you can define only rounds. That mean that the players can ONLY use the predefined weapons

    Der Inhalt kann nicht angezeigt werden, da du keine Berechtigung hast, diesen Inhalt zu sehen.

    [tab='Installation Manual']
    Copy the "only_plugin.php" file to your plugins folder

    [tab='Configuration Manual']
    Add this to your config.cfg

    Code
    [only_plugin] 
    enabled = 1 
    kickmessage = "^1ONLY <ALLOWED_WEAPON> ^1MOD is enabled" 
    warnmessage = "^1ONLY <ALLOWED_WEAPON> <WARNINGS>^1MOD is enabled" 
    warnstokick = 2 
    bannermessage = "^3Only Plugin: ^1Only ^2<ALLOWED_WEAPON> ^1are allowed!!!" 
    time = 20 
    //Custom Classes 
    snip = "m40a3,remington700"
    • enabled -> enabled 1 = yes, 0 = no
    • kickmessage -> the message a player will see if he was kicked
    • warnmessage -> the same like kickmessage
    • warnstokick -> max warns for before the player will be kicked (1 improves the mam speed/direct kick)
    • bannermessage ->The message will be displayed all x seconds
    • time -> time between 2 bannermessages in seconds


    You can add some predefined tags for playername, allowed weapons etc to the messages

    Zitat

    List of predefined tags

    • <PLAYER_NAME>
    • <KILLER_WEAPON>
    • <ALLOWED_WEAPON>
    • <WARNINGS>
    • <MAX_WARNINGS>

    Custom classes:

    To add a predefined rule create a new line and edit the name and the weapons:

    • ClassnameWithout# = "Weapon1,weapon2,weapon3" //don't use spaces

    You can extract the weapons from this site:

    füge following commands to the groups.cfg

    • only
    • onlyrules

    Default players shouldn't have the permissions for !only

    [tab='Changelog']
    Version 1: -
    [/tabmenu]

    2 Mal editiert, zuletzt von mirko911 (4. Februar 2012 um 13:17)

  • Lex_xl
    Anfänger
    Punkte
    115
    Beiträge
    22
    • 3. Februar 2012 um 17:23
    • #2

    It plugin have some bugs, unfortunately (in cod6).
    Im correcting some code:

    Spoiler anzeigen


    string 78: $send = str_replace("<ALLOWED_WEAPON>", $msg, $this->mod->getCV("only_plugin" , "bannermessage"));

    string 40: $mod->setDefaultCV("only_plugin", "bannermessage", "^3Only Plugin: ^1ONly ^2<ALLOWED_WEAPON> ^1are allowed!!!");

    string 185: private function only_plugin_findWeapon($search) {
    $weapons = array(
    'm40a3','m21','remington700','dragunov','barrett','cheytac','wa2000',
    'colt45','beretta','deserteaglegold','deserteagle','usp','coltanaconda',
    'ak47','g36c','g3','m14','m4','m16','mp44','famas','scar','tavor','fal','masada','fn2000',
    'mp5','ak74u','p90','uzi','skorpion','mp5k','ump45','kriss',
    'saw','rpd','m60e4','sa80','mg4','aug','m240',
    'm1014','winchester1200','spas12','aa12','striker','ranger','model1887',
    'pp2000','glock','beretta393','tmp',
    'frag','flash','frag_grenade_short','smoke','concussion','riotshield','semtex','throwingknife','c4','claymore','gl',
    'artillery','cobra','rpg','destructible','at4','m79','stinger','javelin'
    );


    1) plugin dont see Custom Classes , like sniper = "m40a3,remington700", but if I writing: !!only #snip plugin read it parameter from yourself code:

    Spoiler anzeigen


    string 40: $mod->setDefaultCV("only_plugin", "#snip", "m40a3,remington700");[/code]


    Im replace by:

    Spoiler anzeigen

    [code]
    string 40: $mod->setDefaultCV("only_plugin", "#sniper", "m40a3,remington700,dragunov,barrett,cheytac,wa2000,m21");


    And it start work!
    But when Im add those code:

    Spoiler anzeigen

    string 41: $mod->setDefaultCV("only_plugin", "#shotgun", "spas12,aa12,striker,ranger,m1014,model1887");


    and when im writing: !only #shotgun , in chat, it wrote: "cant find shotgun weapon class"

    2)in log of adminmod writing: 29:41 [03.02.12 19:33:12] Notice: ONLY-PLUGIN: message was sent: ^1Warning: ^2Only ^3^2^7, ^2^7, ^2^7, ^2Barrett .50cal^7, ^2Intervention^7, ^2WA2000^7, ^2M21 EBR^7, ^2are allowed!!! ,
    but It not see in game (I dont know about private messages for players)
    And mod kicked players, who use restruction weapon.

    Dear mirko911, Can you fix this bugs?
    P.S.
    I dont understand PHP code :cry:

    Einmal editiert, zuletzt von Lex_xl (3. Februar 2012 um 17:29)

  • Mirko911
    Entwickler
    Reaktionen
    165
    Punkte
    16.820
    Trophäen
    6
    Beiträge
    3.263
    Einträge
    11
    • 3. Februar 2012 um 20:37
    • #3

    I write the "List of Weapons" with all CoD4 weapons.

    Custom Classes:
    You have to add the Classes to config.cfg

    Thanks for the misstakes in the file

  • Dieses Thema enthält 8 weitere Beiträge, die nur für registrierte Benutzer sichtbar sind.

Benutzer online in diesem Thema

  • 1 Besucher
  1. Mitarbeiter
  2. Datenschutzerklärung
  3. Nutzungsbedingungen
  4. Impressum
  5. Kontakt
Community-Software: WoltLab Suite™