Command tells much.....

Doom_Kill3R

  • VC:MP Beta Tester
  • Infinite loops defy infinity by overflowing memory
  • Posts: 1,107
Re: Command tells much.....
« Reply #15, on February 19th, 2016, 05:48 PM »
I'm not putting it there just to avoid it from being called several times since it needs to be called only once. It may also interfere with the loop and may result wrong info.

FarisDon

  • Guest
Re: Command tells much.....
« Reply #16, on February 19th, 2016, 07:24 PM »
Quote from Doom_Kill3R on February 19th, 2016, 05:48 PM
I'm not putting it there just to avoid it from being called several times since it needs to be called only once. It may also interfere with the loop and may result wrong info.
Well, Dhoom Sir; actually the problem is that if we look to the Code, it isn't showing it once; however it is showing to those persons whom, it doesn't even have to show :|

KAKAN

  • Wiki Contributor
  • Posts: 3,346
Re: Command tells much.....
« Reply #17, on February 20th, 2016, 05:41 AM »
Well, I got your problem now, here's the fixed code.
Code: [Select]
else if ( cmd =="bla")
{
local buffer = "";
    foreach( iPlayer in players ) if( GetKills( FindPlayer( iPlayer ) ) == 3 ) buffer = buffer + " " + FindPlayer( iPlayer ).Name;
if( buffer != "" ) ClientMessage("Players with 3 kills: [ " + buffer + " ]", player , 255, 255, 0 );
       else ClientMessage( "No player with 3 kills yet", player, 255, 255, 0 );
}
You can contact me using Discord, at Developers.CPP( check off-board to find the invite link )
Github: https://github.com/theKAKAN

FarisDon

  • Guest
Re: Command tells much.....
« Reply #18, on February 20th, 2016, 07:40 AM »
Quote from KAKAN on February 20th, 2016, 05:41 AM
Well, I got your problem now, here's the fixed code.
Code: [Select]
else if ( cmd =="bla")
{
local buffer = "";
    foreach( iPlayer in players ) if( GetKills( FindPlayer( iPlayer ) ) == 3 ) buffer = buffer + " " + FindPlayer( iPlayer ).Name;
if( buffer != "" ) ClientMessage("Players with 3 kills: [ " + buffer + " ]", player , 255, 255, 0 );
       else ClientMessage( "No player with 3 kills yet", player, 255, 255, 0 );
}
Eh, it's already been fixed ._. i'm just waiting, for #Dhoom to answer why he didn't used the code in the 2nd row instead of 3rd. Anyway, for me I guess we did that cause we have to return something in end after all queries and stuff have been made, like just you did ._.

Doom_Kill3R

  • VC:MP Beta Tester
  • Infinite loops defy infinity by overflowing memory
  • Posts: 1,107
Re: Command tells much.....
« Reply #19, on February 20th, 2016, 08:16 AM »
Its not 'Dhoom'.

Destroyer, script executes in sequence so if you send the message first and store the data later what will happen? Common Sense.

FarisDon

  • Guest
Re: Command tells much.....
« Reply #20, on February 20th, 2016, 07:48 PM »
Quote from Doom_Kill3R on February 20th, 2016, 08:16 AM
Its not 'Dhoom'.

Destroyer, script executes in sequence so if you send the message first and store the data later what will happen? Common Sense.
Uhm, right! Thanks :)