Page 2 of 8 FirstFirst 1234 ... LastLast
Results 11 to 20 of 76
  1. #11
    Plugin Developer
    Join Date
    Jan 2012
    Location
    Saarland
    Posts
    915
    Quote Originally Posted by FLirtY-3D View Post
    i keep getting the message ... after i press @stars after been kill
    ....No weapon stats available yet......
    is there something missing i forgot ?
    This could have different reasons.

    You are talking about BF3, right? Do you use Battlelog Cache, if yes make sure it is working correct. If you don't use it, make sure that you have set use_slow_weapon_stats to true.
    Another reason could be that not every kill can be allocated with service stars since not every weapons have BL stats. Sometimes it could also happen players have no service stars with a weapon yet.
    64 slots mixed Classic mode BF4
    32 slots rush mode BF3

  2. #12
    Member
    Join Date
    Jan 2013
    Location
    United Kingdom
    Posts
    71
    thankyou... thats was the problem....

    is there a way for it just to give the totalkills for the select weapon....
    or does it have to be all kills across all weapons ?
    prefer to lose with honor than win by cheating << http://metabans.com/flirty >>

  3. #13
    Plugin Developer
    Join Date
    Jan 2012
    Location
    Saarland
    Posts
    915
    Quote Originally Posted by FLirtY-3D View Post
    thankyou... thats was the problem....

    is there a way for it just to give the totalkills for the select weapon....
    or does it have to be all kills across all weapons ?

    You could try this one as

    Second Limit

    OnDeath:

    Code:
    if (!player.Data.issetBool("NoYell"))
    	player.Data.setBool("NoYell", true);
    
    if (player.Data.getBool("NoYell")) 
    	return false;
    else {
    	if (killer.Name != null) {
    		BattlelogWeaponStatsInterface WeaponStats = killer.GetBattlelog(kill.Weapon);			
    		if (WeaponStats != null) {
    		double WeaponTotalKills = WeaponStats.Kills; 
    			if (WeaponTotalKills > 0) {
    			double WeaponUsagePercentage = Convert.ToInt32(WeaponTotalKills/killer.Kills*100);
    			double ServiceStars = Convert.ToInt32(WeaponTotalKills/100);
    			plugin.SendPlayerYell(player.Name, plugin.R ("\nKiller: " +killer.Name+ " with " + (plugin.FriendlyWeaponName(kill.Weapon).Name) + "\nWeapon kills: " + WeaponTotalKills + "\n" + WeaponUsagePercentage + "% of all "  + killer.Kills + " kills."), 6);
    			}
    		}
    	}				
    }
    
    return false;
    64 slots mixed Classic mode BF4
    32 slots rush mode BF3

  4. #14
    Member
    Join Date
    Jan 2013
    Location
    United Kingdom
    Posts
    71
    Quote Originally Posted by LumPenPacK View Post
    You could try this one as

    Second Limit

    OnDeath:

    Code:
    if (!player.Data.issetBool("NoYell"))
    	player.Data.setBool("NoYell", true);
    
    if (player.Data.getBool("NoYell")) 
    	return false;
    else {
    	if (killer.Name != null) {
    		BattlelogWeaponStatsInterface WeaponStats = killer.GetBattlelog(kill.Weapon);			
    		if (WeaponStats != null) {
    		double WeaponTotalKills = WeaponStats.Kills; 
    			if (WeaponTotalKills > 0) {
    			double WeaponUsagePercentage = Convert.ToInt32(WeaponTotalKills/killer.Kills*100);
    			double ServiceStars = Convert.ToInt32(WeaponTotalKills/100);
    			plugin.SendPlayerYell(player.Name, plugin.R ("\nKiller: " +killer.Name+ " with " + (plugin.FriendlyWeaponName(kill.Weapon).Name) + "\nWeapon kills: " + WeaponTotalKills + "\n" + WeaponUsagePercentage + "% of all "  + killer.Kills + " kills."), 6);
    			}
    		}
    	}				
    }
    
    return false;
    i was under the impression that code Usage option 2: was for Battlefield 4 ? sorry if i wrong..... this is for a bf3 server should've said earlier..... my bad
    is there no way to just change the end bit on the old code so it shows all kills for the selected weapon... instead of player total kills on all weapons.... as it says kills with all weapons... as you no...
    prefer to lose with honor than win by cheating << http://metabans.com/flirty >>

  5. #15
    Plugin Developer
    Join Date
    Jan 2012
    Location
    Saarland
    Posts
    915
    Sorry, my fault, I modified the wrong code.
    Here's the code for BF3

    Code:
    if (player.Data.issetString("LastKiller")) {
    	String LastKiller = player.Data.getString("LastKiller");
    	String LastDeathWeapon = player.Data.getString("LastDeathWeapon");
    	PlayerInfoInterface LastKillerInterface = plugin.GetPlayer(LastKiller, false);
    	
    	if (LastKillerInterface != null) {
    		BattlelogWeaponStatsInterface WeaponStats = LastKillerInterface.GetBattlelog(LastDeathWeapon);
    			    
    		if (WeaponStats != null) {
    		double WeaponTotalKills = WeaponStats.Kills; 
    			if (WeaponTotalKills > 0) {
    			double WeaponUsagePercentage = Convert.ToInt32(WeaponTotalKills/LastKillerInterface.Kills*100);
    			double ServiceStars = Convert.ToInt32(WeaponTotalKills/100);
    			plugin.SendPlayerMessage(player.Name, plugin.R ("\nKiller: " +LastKiller+ " with " + (plugin.FriendlyWeaponName(LastDeathWeapon).Name) + " || Servive Stars: " + ServiceStars + "\nAll weapon kills " + WeaponStats.Kills ));
    			}
    			else
    			plugin.SendPlayerMessage(player.Name, plugin.R ("No weapon stats available yet."));
    		}
    	}				
    }
    else
    plugin.SendPlayerMessage(player.Name, plugin.R ("Nobody has killed you yet."));
    
    return false;
    This shows: Service Stars and total weapon kills.
    Last edited by LumPenPacK; 28-04-2014 at 20:23.
    64 slots mixed Classic mode BF4
    32 slots rush mode BF3

  6. #16
    Member
    Join Date
    Jan 2013
    Location
    United Kingdom
    Posts
    71
    Quote Originally Posted by LumPenPacK View Post
    Sorry, my fault, I modified the wrong code.
    Here's the code for BF3

    Code:
    if (player.Data.issetString("LastKiller")) {
    	String LastKiller = player.Data.getString("LastKiller");
    	String LastDeathWeapon = player.Data.getString("LastDeathWeapon");
    	PlayerInfoInterface LastKillerInterface = plugin.GetPlayer(LastKiller, false);
    	
    	if (LastKillerInterface != null) {
    		BattlelogWeaponStatsInterface WeaponStats = LastKillerInterface.GetBattlelog(LastDeathWeapon);
    			    
    		if (WeaponStats != null) {
    		double WeaponTotalKills = WeaponStats.Kills; 
    			if (WeaponTotalKills > 0) {
    			double WeaponUsagePercentage = Convert.ToInt32(WeaponTotalKills/LastKillerInterface.Kills*100);
    			double ServiceStars = Convert.ToInt32(WeaponTotalKills/100);
    			plugin.SendPlayerMessage(player.Name, plugin.R ("\nKiller: " +LastKiller+ " with " + (plugin.FriendlyWeaponName(LastDeathWeapon).Name) + " || Servive Stars: " + ServiceStars + "\nAll weapon kills " + WeaponStats.Kills );
    			}
    			else
    			plugin.SendPlayerMessage(player.Name, plugin.R ("No weapon stats available yet."));
    		}
    	}				
    }
    else
    plugin.SendPlayerMessage(player.Name, plugin.R ("Nobody has killed you yet."));
    
    return false;
    This shows: Service Stars and total weapon kills.
    get this messages with the updated code..
    [11:55:43 45] [Insane Limits] Compiling Limit #5 - @stars info - OnAnyChat
    [11:55:43 51] [Insane Limits] ERROR: 1 error compiling Expression
    [11:55:43 51] [Insane Limits] ERROR: (CS1026, line: 55, column: 235): ) expected

    can i keep the WeaponUsagePercentage aswell thankyou mate .....
    prefer to lose with honor than win by cheating << http://metabans.com/flirty >>

  7. #17
    Plugin Developer
    Join Date
    Jan 2012
    Location
    Saarland
    Posts
    915
    typo, try again plz.
    64 slots mixed Classic mode BF4
    32 slots rush mode BF3

  8. #18
    Member
    Join Date
    Jan 2013
    Location
    United Kingdom
    Posts
    71
    sure.... the same code section ?... would like to keep WeaponUsagePercentage in the code two...
    so it shows killer name his weapon name service stars usage precantage and the ammount of kills on that weapon....

    i feel bad taking you from your game.... to do this.... i dont mind if you do it later no rush ....
    Last edited by FLirtY-3D; 28-04-2014 at 20:34.
    prefer to lose with honor than win by cheating << http://metabans.com/flirty >>

  9. #19
    Member
    Join Date
    Jan 2013
    Location
    United Kingdom
    Posts
    71
    Code:
    if (player.Data.issetString("LastKiller")) {
    	String LastKiller = player.Data.getString("LastKiller");
    	String LastDeathWeapon = player.Data.getString("LastDeathWeapon");
    	PlayerInfoInterface LastKillerInterface = plugin.GetPlayer(LastKiller, false);
    	
    	if (LastKillerInterface != null) {
    		BattlelogWeaponStatsInterface WeaponStats = LastKillerInterface.GetBattlelog(LastDeathWeapon);
    			    
    		if (WeaponStats != null) {
    		double WeaponTotalKills = WeaponStats.Kills; 
    			if (WeaponTotalKills > 0) {
    			double WeaponUsagePercentage = Convert.ToInt32(WeaponTotalKills/LastKillerInterface.Kills*100);
    			double ServiceStars = Convert.ToInt32(WeaponTotalKills/100);
    			plugin.SendPlayerMessage(player.Name, plugin.R ("\nKiller: " +LastKiller+ " with " + (plugin.FriendlyWeaponName(LastDeathWeapon).Name) + " || ServSt: " + ServiceStars + "\nUsage percentage: " + WeaponUsagePercentage + "% || Total weapon kills " + WeaponStats.Kills ));
    			}
    			else
    			plugin.SendPlayerMessage(player.Name, plugin.R ("No weapon stats available yet."));
    		}
    	}				
    }
    else
    plugin.SendPlayerMessage(player.Name, plugin.R ("Nobody has killed you yet."));
    
    return false;
    ok i worked it out from what you sent me ... this code is showing
    killername
    weapon used
    srtstars
    usage %
    and total kills on that weapon....

    you been a great big help and amzing work on your server i enjoy it alot as you well no...... should come by ours oneday i warn you tho is madness lol ........
    prefer to lose with honor than win by cheating << http://metabans.com/flirty >>

  10. #20
    Plugin Developer
    Join Date
    Jan 2012
    Location
    Saarland
    Posts
    915
    Quote Originally Posted by FLirtY-3D View Post
    Code:
    if (player.Data.issetString("LastKiller")) {
    	String LastKiller = player.Data.getString("LastKiller");
    	String LastDeathWeapon = player.Data.getString("LastDeathWeapon");
    	PlayerInfoInterface LastKillerInterface = plugin.GetPlayer(LastKiller, false);
    	
    	if (LastKillerInterface != null) {
    		BattlelogWeaponStatsInterface WeaponStats = LastKillerInterface.GetBattlelog(LastDeathWeapon);
    			    
    		if (WeaponStats != null) {
    		double WeaponTotalKills = WeaponStats.Kills; 
    			if (WeaponTotalKills > 0) {
    			double WeaponUsagePercentage = Convert.ToInt32(WeaponTotalKills/LastKillerInterface.Kills*100);
    			double ServiceStars = Convert.ToInt32(WeaponTotalKills/100);
    			plugin.SendPlayerMessage(player.Name, plugin.R ("\nKiller: " +LastKiller+ " with " + (plugin.FriendlyWeaponName(LastDeathWeapon).Name) + " || ServSt: " + ServiceStars + "\nUsage percentage: " + WeaponUsagePercentage + "% || Total weapon kills " + WeaponStats.Kills ));
    			}
    			else
    			plugin.SendPlayerMessage(player.Name, plugin.R ("No weapon stats available yet."));
    		}
    	}				
    }
    else
    plugin.SendPlayerMessage(player.Name, plugin.R ("Nobody has killed you yet."));
    
    return false;
    ok i worked it out from what you sent me ... this code is showing
    killername
    weapon used
    srtstars
    usage %
    and total kills on that weapon....

    you been a great big help and amzing work on your server i enjoy it alot as you well no...... should come by ours oneday i warn you tho is madness lol ........

    You got everything you want now? Nice

    What's your server name? But I think I wouldn't enjoy it without a m16 limit :P
    64 slots mixed Classic mode BF4
    32 slots rush mode BF3

 

 

Posting Permissions

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