Results 1 to 7 of 7
  1. #1

    Insane Limits - AdKats log command

    PC9,

    I'm looking to have Insane Limits log TKs. Here's what I have so far:

    Evaluation: OnTeamKill
    First_check: Code

    Code:
    Hashtable command = new Hashtable();
    command.Add("caller_identity", "InsaneLimits");
    command.Add("response_requested", false);
    command.Add("command_type", "player_log");
    command.Add("source_name", "TKLog");
    command.Add("target_name", player.Name);
    command.Add("target_guid", player.EAGuid);
    command.Add("record_message", "TK: " + victim.Name  + kill.Weapon);
    plugin.CallOtherPlugin("AdKats", "IssueCommand", command);
    I want there to be a space between victim.Name and kill.Weapon. How would I go about doing that?

  2. #2
    command.Add("record_message", "TK: " + victim.Name + " " + kill.Weapon);

    Would suggest

    command.Add("record_message", "TK'd " + victim.Name + " with " + kill.Weapon);

    or better


    command.Add("record_message", "TK'd " + victim.Name + " with " + plugin.FriendlyWeaponName(kill.Weapon));
    ____

  3. #3
    Thanks!

    I should really brush up on my Insane Limits syntax. Been in bash script/MySQL lala land too long.

    command.Add("record_message", "TK'd " + victim.Name + " with " + plugin.FriendlyWeaponName(kill.Weapon));

    Returns:

    TK'd ds2tel with PRoConEvents.KillReason
    Last edited by Jamesonp; 10-09-2014 at 09:51.

  4. #4
    Strange...it should remove the weapon code formatting and make it readable. If that doesn't work just use kill.Weapon like i have in the second example. I'll find out why that last one isn't working properly.
    ____

  5. #5
    Quote Originally Posted by Jamesonp View Post
    Thanks!

    I should really brush up on my Insane Limits syntax. Been in bash script/MySQL lala land too long.

    command.Add("record_message", "TK'd " + victim.Name + " with " + plugin.FriendlyWeaponName(kill.Weapon));

    Returns:

    TK'd ds2tel with PRoConEvents.KillReason
    Quote Originally Posted by ColColonCleaner View Post
    Strange...it should remove the weapon code formatting and make it readable. If that doesn't work just use kill.Weapon like i have in the second example. I'll find out why that last one isn't working properly.
    Code:
    command.Add("record_message", "TK'd " + victim.Name + " with " + plugin.FriendlyWeaponName(kill.Weapon).Name);
    I made the same mistake when I first tried using the Friendly Weapon Names, couldn't understand why it wouldn't work, however the .Name at the end is what you need as it doesn't know which of the values from the KillReasonInterface you require (eg .Name, .VehicleName, .VehicleDetail etc...) so you have to tell it that you want the name of the weapon used for the kill.

    @Jamesonp I believe this should work for you:

    Code:
    Hashtable command = new Hashtable();
    command.Add("caller_identity", "InsaneLimits");
    command.Add("response_requested", false);
    command.Add("command_type", "player_log");
    command.Add("source_name", "TKLog");
    command.Add("target_name", player.Name);
    command.Add("target_guid", player.EAGuid);
    command.Add("record_message", "TK'd " + victim.Name + " with " + plugin.FriendlyWeaponName(kill.Weapon).Name);
    plugin.CallOtherPlugin("AdKats", "IssueCommand", command);
    Last edited by markrlomas; 10-09-2014 at 23:56.

  6. #6
    Thanks mark, knew it must be something simple we overlooked, i'll remember that.
    ____

  7. #7
    Thanks! I'll give it a whirl.

    Edit:

    It works. Thanks again

 

 

Posting Permissions

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