Results 1 to 5 of 5
  1. #1
    Arasonic's Avatar
    Join Date
    Jun 2010
    Gender
    male
    Posts
    569
    Reputation
    11
    Thanks
    115

    From player to one guy

    As I dont want to bump my own threads, heres a question again:

    So, to do for example an ammo box, i need two things:
    Foreach(player in level.players){
    and
    if(Distance(pos, player.origin) <= 75){
    where pos, is obviously a coord.

    However, if lets say i used 'player iPrintLnBold("Test");
    it would appear 18 times if it was 18 players on the map. How the heck can I change it to only happen for the one guy that buys it?

  2. #2
    Boon Pek's Avatar
    Join Date
    Sep 2010
    Gender
    male
    Posts
    188
    Reputation
    10
    Thanks
    378
    My Mood
    Inspired
    I'm sorry if this problem is already solved - but as I know:

    Code:
    while(1)
    {
    	foreach(player in level.players)
    	{
    		if(distance(pos, player.origin) <= 75)
    		{
    			player giveMaxAmmo( player getCurrentWeapon() );
    			player iPrintlnBold("Current Ammo Refilled!");
    		}
    	}
    	wait 0.45;
    }
    That would work, sorry if your problem has been solved tho :P
    My minecraft launcher!

    A full-featured, actively-developed windows-only Minecraft Launcher! It allows you to download older versions of minecraft.jar through the options menu, multi-username support, RAM allocation support, non-legit logins and more!











  3. #3
    Arasonic's Avatar
    Join Date
    Jun 2010
    Gender
    male
    Posts
    569
    Reputation
    11
    Thanks
    115
    I already got it, but no, that wouldn't work perfectly

  4. #4
    [WhA]4FunPlayin's Avatar
    Join Date
    Sep 2010
    Gender
    male
    Location
    Not here
    Posts
    757
    Reputation
    8
    Thanks
    169
    My Mood
    Lonely
    distance2d()?

  5. #5
    master131's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Location
    Melbourne, Australia
    Posts
    8,802
    Reputation
    3165
    Thanks
    73,326
    My Mood
    Breezy
    Quote Originally Posted by Arasonic View Post
    I already got it, but no, that wouldn't work perfectly
    Of course it would work...
    Donate:
    BTC: 1GEny3y5tsYfw8E8A45upK6PKVAEcUDNv9


    Handy Tools/Hacks:
    Extreme Injector v3.6.1 *NEW* Windows 10 compatible!
    A powerful and advanced injector in a simple GUI.
    Can scramble DLLs on injection making them harder to detect and even make detected hacks work again!

    Minion Since: 13th January 2011
    Moderator Since: 6th May 2011
    Global Moderator Since: 29th April 2012
    Super User/Unknown Since: 23rd July 2013
    'Game Hacking' Team Since: 30th July 2013

    --My Art--
    [Roxas - Pixel Art, WIP]
    [Natsu - Drawn]
    [Natsu - Coloured]


    All drawings are coloured using Photoshop.

    --Gifts--
    [Kyle]