Results 1 to 5 of 5

Thread: LMG Rulz

  1. #1

    LMG Rulz

    Hay Folks, I am actually searching for a LMG Limit Script for max. 6 per Teamside:

    I Wrote following Script

    # !lmgs / !lmgx / !setlmg INFO MESSAGES

    #!lmgs tells you the current count for your team and lmg player names
    On Say;Text !lmgs;
    PlayerSay LMG limit: Reserve slot with LMG kill, until non-LMG/handgun/knife kill.
    If %server_sl_total[%ptk%]% == 0;PlayerSay %pt% 0/%server_lmglimit% LMGs on team %pt%
    If %server_sl_total[%ptk%]% > 0;PlayerSay %pt% LMG[1/%server_lmglimit%] is %server_sl_lmgname[%ptk%][1]%
    If %server_sl_total[%ptk%]% > 1;PlayerSay %pt% LMG[2/%server_lmglimit%] is %server_sl_lmgname[%ptk%][2]%
    If %server_sl_total[%ptk%]% > 2;PlayerSay %pt% LMG[3/%server_lmglimit%] is %server_sl_lmgname[%ptk%][3]%
    If %server_sl_total[%ptk%]% > 3;PlayerSay %pt% LMG[4/%server_lmglimit%] is %server_sl_lmgname[%ptk%][4]%
    If %server_sl_total[%ptk%]% > 4;PlayerSay %pt% LMG[5/%server_lmglimit%] is %server_sl_lmgname[%ptk%][5]%

    #!lmgx just gives the lmg counts for both teams
    On Say;Text !lmgx;
    PlayerSay LMGs: Team 1: %server_sl_total[1]%/%server_lmglimit%, Team 2: %server_sl_total[2]%/%server_lmglimit%

    #!setlmg <name-substring> is admin-only command to allocate a lmg slot to player. E.g. "!setlmg bam"
    On Say;Admin;Text !setlmg;TargetPlayer;Set %server_sl_setlmg[%t%]% 1;PlayerSay %t% guaranteed a LMG slot until round end
    This Script is edited in ProCon-Rulez but does not work.


    Would be very Happy if i could get help
    Last edited by PapaCharlie9; 11-12-2014 at 15:51.

  2. #2
    Did now:

    # DEBUG
    On Kill;Log %p% killed %v% with %d% %wk%
    On Spawn;Log %p% spawned on %ptk%

    # SET THE MAX # OF LMG HERE:
    On Kill;ServerFirst;Set %server_LMGlimit% 2
    On Say;ServerFirst;Set %server_LMGlimit% 2

    # LMG LOG MESSAGES
    On Spawn;If %server_sl_LMG[%p%]% == 1;Log LMG %pt% %p% re-spawned. %server_sl_total[%ptk%]% LMG on team %ptk%
    On Kill;If %server_sl_LMG[%v%]% == 1;Log LMG %vtk% %v% killed. %server_sl_total[%vtk%]% LMG on team %vtk%

    # LMG KILL CHECKS either over limit (so kill), existing LMG (do nothing), new LMG (reserve slot)
    On Kill;Weapon U_LMG_HE;
    If %server_sl_total[%ptk%]% >= %server_LMGlimit%;If %server_sl_setLMG[%p%]% == 0;if %server_sl_LMG[%p%]% == 0;TeamSay %p% killed by LMG LIMIT for %pt%;Log LMG Limit max %server_LMGlimit% LMG each team !!! (now Kill %p%);Kill
    If %server_sl_LMG[%p%]% == 1;Log %ptk% %p% still LMG, %server_sl_total[%ptk%]% LMG on team %ptk%
    If %server_sl_LMG[%p%]% == 0;Incr %server_sl_total[%ptk%]%;Set %server_sl_LMG[%p%]% 1;Set %server_sl_x% %server_sl_total[%ptk%]%;Set %server_sl_LMGname[%ptk%][%server_sl_x%]% %p%;PlayerSay %p% has LMG-Slot on %pt% %server_sl_total[%ptk%]%/%server_LMGlimit%;Log %ptk% %p% is new LMG, %server_sl_total[%ptk%]%/%server_LMGlimit% LMG on team %ptk%

    # LMG KILL CHECKS either over limit (so kill), existing LMG (do nothing), new LMG (reserve slot)
    On Kill;Weapon U_Scout;Not Weapon U_LMG_HE;
    If %server_sl_total[%ptk%]% >= %server_LMGlimit%;If %server_sl_setLMG[%p%]% == 0;if %server_sl_LMG[%p%]% == 0;TeamSay %p% killed by LMG LIMIT for %pt%;Log LMG Limit max %server_LMGlimit% LMG each team !!! (now Kill %p%);Kill
    If %server_sl_LMG[%p%]% == 1;Log %ptk% %p% still LMG, %server_sl_total[%ptk%]% LMG on team %ptk%
    If %server_sl_LMG[%p%]% == 0;Incr %server_sl_total[%ptk%]%;Set %server_sl_LMG[%p%]% 1;Set %server_sl_x% %server_sl_total[%ptk%]%;Set %server_sl_LMGname[%ptk%][%server_sl_x%]% %p%;PlayerSay %p% has LMG-Slot on %pt% %server_sl_total[%ptk%]%/%server_LMGlimit%;Log %ptk% %p% is new LMG, %server_sl_total[%ptk%]%/%server_LMGlimit% LMG on team %ptk%

    # FREE UP SHOTGUN SLOT IF SHOTGUN HAS NON-SHOTGUN KILL OR SHOTGUN LEAVES
    On Kill;Not Weapon U_LMG_HE;Not Damage Handgun;Not Weapon U_Scout;Not Weapon Melee;If %server_sl_shotgun[%p%]% == 1;Set %server_sl_shotgun[%p%]% 0;Decr %server_sl_total[%ptk%]%;TeamSay %pt% %p% gave up SHOTGUN slot (used %w%);Log Ex-shotgun %p% used %d% %wk%, %server_sl_total[%ptk%]% shotguns on team %ptk%
    On Leave;If %server_sl_LMG[%p%]% == 1;Set %server_sl_LMG[%p%]% 0;Decr %server_sl_total[%ptk%]%;TeamSay %pt% %p% gave up LMG-Slot (left server);Log LMG %pt% %p% left server. %server_sl_total[%ptk%]% LMG on team %ptk%

    # !LMG / !LMGx / !setLMG INFO MESSAGES



    #!LMG tells you the current count for your team and sniper player names
    On Say;Text !LMG;
    PlayerSay LMG limit: Reserve slot with LMG kill, until non-LMG/handgun/knife kill.
    If %server_sl_total[%ptk%]% == 0;PlayerSay %pt% 0/%server_LMGlimit% LMG on team %pt%
    If %server_sl_total[%ptk%]% > 0;PlayerSay %pt% LMG[1/%server_LMGlimit%] is %server_sl_LMGname[%ptk%][1]%
    If %server_sl_total[%ptk%]% > 1;PlayerSay %pt% LMG[2/%server_LMGlimit%] is %server_sl_LMGname[%ptk%][2]%
    If %server_sl_total[%ptk%]% > 2;PlayerSay %pt% LMG[3/%server_LMGlimit%] is %server_sl_LMGname[%ptk%][3]%
    If %server_sl_total[%ptk%]% > 3;PlayerSay %pt% LMG[4/%server_LMGlimit%] is %server_sl_LMGname[%ptk%][4]%
    If %server_sl_total[%ptk%]% > 4;PlayerSay %pt% LMG[5/%server_LMGlimit%] is %server_sl_LMGname[%ptk%][5]%

    #!shotgunx just gives the LMG counts for both teams
    On Say;Text !LMGx;
    PlayerSay LMG: Team 1: %server_sl_total[1]%/%server_LMGlimit%, Team 2: %server_sl_total[2]%/%server_LMGlimit%

    #!setLMG <name-substring> is admin-only command to allocate a LMG slot to player. E.g. "!setsniper bam"
    On Say;Admin;Text !setLMG;TargetPlayer;Set %server_sl_LMG[%t%]% 1;PlayerSay %t% guaranteed a LMG-Slot until round end

  3. #3
    still does not work, need help....

  4. #4
    Post at the wrong section, post here instead
    Trans-Am
    Where Pink OWNS everything

    Discipline won wars. Fury won fights

  5. #5
    Many wrong in this code dude.I write a code correct to you sooner.What map you use? Have you more
    weapon you will forbidden or have limit? Blaze

    Test this code if this works??Have change this Little now correct



    ##### LMG limit #####

    # SET THE MAX # OF LMGS HERE:
    On Kill;ServerFirst;Set %server_lmglimit% 4
    On Say;ServerFirst;Set %server_lmglimit% 4

    # LMG LOG MESSAGES
    On Spawn;If %server_sl_lmg[%p%]% == 4
    On Kill;If %server_sl_lmg[%v%]% == 4

    # LMG KILL CHECKS either over limit (so kill), existing lmg (do nothing), new lmg (reserve slot)
    On Kill;Damage LMG;
    If %server_sl_total[%ptk%]% >= %server_lmglimit%;if %server_sl_lmg[%p%]% == 0;PlayerSay %p% killed by LMG LIMIT. Max %server_lmglimit% lmgs;Kill
    If %server_sl_lmg[%p%]% == 1
    If %server_sl_lmg[%p%]% == 0;Incr %server_sl_total[%ptk%]%;Set %server_sl_lmg[%p%]% 1;Set %server_sl_x% %server_sl_total[%ptk%]%;Set %server_sl_lmgname[%ptk%][%server_sl_x%]% %p%;PlayerSay %p% got a LMG slot


    # FREE UP LMG SLOT IF LMG HAS NON-LMG KILL OR LMG LEAVES
    On Kill;Not Damage LMG;Not Damage Handgun;Not Damage Melee;Not Damage Explosive;If %server_sl_lmg[%p%]% == 1;Set %server_sl_lmg[%p%]% 0;Decr %server_sl_total[%ptk%]%;PlayerSay %p% gave up the LMGS slot!
    On Leave;If %server_sl_lmg[%p%]% == 1;Set %server_sl_lmg[%p%]% 0;Decr %server_sl_total[%ptk%]%

    # lmgs / lmgx INFO MESSAGES
    On Say;Text lmg;
    PlayerSay Lmg limit: %server_sl_total[%ptk%]%/%server_lmgslimit%. Reserve slot with lmgs kill, lose it with non-lmg/handgun kill.
    If %server_sl_total[%ptk%]% == 0;PlayerSay 0/%server_lmglimit% LMGS on team %pt%
    If %server_sl_total[%ptk%]% > 0;PlayerSay %pt% LMG[1/%server_lmglimit%] is %server_sl_lmgname[%ptk%][1]%
    If %server_sl_total[%ptk%]% > 1;PlayerSay %pt% LMG[2/%server_lmglimit%] is %server_sl_lmgname[%ptk%][2]%
    If %server_sl_total[%ptk%]% > 2;PlayerSay %pt% LMG[3/%server_lmglimit%] is %server_sl_lmgname[%ptk%][3]%
    If %server_sl_total[%ptk%]% > 3;PlayerSay %pt% LMG[4/%server_lmglimit%] is %server_sl_lmgname[%ptk%][4]%

    On Say;Text !lmgx;
    PlayerSay LMGS: Team 1: %server_sl_total[1]%/%server_lmglimit%, Team 2: %server_sl_total[2]%/%server_lmglimit%

    Cod is tested and works fineReally nice code
    Last edited by Blaze0075; 15-12-2014 at 14:47.

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •