Page 4 of 12 FirstFirst ... 23456 ... LastLast
Results 46 to 60 of 176
  1. #46
    Lystic's Avatar
    Join Date
    May 2013
    Gender
    male
    Location
    'Murica
    Posts
    498
    Reputation
    31
    Thanks
    4,717
    My Mood
    Bashful
    Here is a simple way to access your current players inventor
    Code:
    Inventory[] getInventory()
    {
         return (Inventory[])(UnityEngine.Object.FindObjectsOfType(Type.GetTypeFromHandle(Type.GetTypeHandle(new Inventory()))));
    }
    then just do

    Code:
    foreach(Inventory inv in getInventory()) 
    {
         // Do stuff
    }

  2. #47
    Blueblood1's Avatar
    Join Date
    Aug 2012
    Gender
    male
    Posts
    711
    Reputation
    132
    Thanks
    7,126
    My Mood
    Mellow
    - Version: All
    - Spawns in 1000 wooden walls, in a line with a spacing of 5f.

    Code:
                    if (GUILayout.Button("Test"))
                    {
                            float adv = 0f;
                            for (int i = 0; i < 1000; i++) 
                            {
                                adv = adv + 1f;
                                SpawnStructures.placeStructure(0x4269, Camera.main.transform.position + ((Vector3)Camera.main.transform.forward * adv), 1, string.Empty);
                            
                            
                            }
                    }

  3. #48
    danglybutz's Avatar
    Join Date
    Nov 2012
    Gender
    male
    Posts
    22
    Reputation
    10
    Thanks
    4
    My Mood
    Aggressive
    Quote Originally Posted by Blueblood1 View Post
    Me First :P

    - Version: All (Unless Unity updates)
    - Spawn on cursor.
    Code:
    Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition);
    RaycastHit hit;
    if (Physics.Raycast(ray, out hit, distance))
    {
                    
    }

    - Version: All (Unless lighting is redone)
    - Improved Full Bright
    Code:
    RenderSettings.ambientLight = new Color(0.95f,0.95f,0.95f);
    base.ligh*****lor = Color.black;
    base.light.intensity = 0f;
    - Spawn Items
    - Version: 2.2.1
    Code:
    SpawnItems.spawnItem(itemId, 1, Camera.main.transform.position);
    distance is invalid.

  4. #49
    Blueblood1's Avatar
    Join Date
    Aug 2012
    Gender
    male
    Posts
    711
    Reputation
    132
    Thanks
    7,126
    My Mood
    Mellow
    You need a float called distance.. so
    Code:
    private float distance = 50f

  5. The Following User Says Thank You to Blueblood1 For This Useful Post:

    danglybutz (08-04-2014)

  6. #50
    danglybutz's Avatar
    Join Date
    Nov 2012
    Gender
    male
    Posts
    22
    Reputation
    10
    Thanks
    4
    My Mood
    Aggressive
    Quote Originally Posted by Blueblood1 View Post
    You need a float called distance.. so
    Code:
    private float distance = 50f
    I swear you are awesome.

    Second person I saw who actually gave real instruction on it, or at least close.

    Thanks!

  7. #51
    danglybutz's Avatar
    Join Date
    Nov 2012
    Gender
    male
    Posts
    22
    Reputation
    10
    Thanks
    4
    My Mood
    Aggressive
    Quote Originally Posted by Blueblood1 View Post
    You need a float called distance.. so
    Code:
    private float distance = 50f
    I know I ask to many questions, but does this seem right?

    if (GUI.Button(new Rect(230, 190, 80, 20), "Test"))
    {
    Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition);
    RaycastHit hit;
    if (Physics.Raycast(ray, out hit, distance))
    {
    SpawnItems.spawnItem(Convert.ToInt32(this.itemspaw n), Convert.ToInt32(this.amount), hit.transform.position);
    }

  8. #52
    Blueblood1's Avatar
    Join Date
    Aug 2012
    Gender
    male
    Posts
    711
    Reputation
    132
    Thanks
    7,126
    My Mood
    Mellow
    You don't need to transform the hit to a position, just use hit.point, so

    Code:
                    if (GUI.Button(new Rect(230, 190, 80, 20), "Test"))
                    {
                        Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition);
                        RaycastHit hit;
                        if (Physics.Raycast(ray, out hit, distance))
                        {
                               SpawnItems.spawnItem(Convert.ToInt32(this.itemspawn), Convert.ToInt32(this.amount), hit.point);
                        }
                    }
    Only problem with this being a button is that, your cursor is over the button when you press it, so it would spawn behind your mouse on the screen, so unless your looking at the ground it wouldn't spawn.

  9. #53
    danglybutz's Avatar
    Join Date
    Nov 2012
    Gender
    male
    Posts
    22
    Reputation
    10
    Thanks
    4
    My Mood
    Aggressive
    Yeah, the code isn't working for me. haha.

  10. #54
    Blueblood1's Avatar
    Join Date
    Aug 2012
    Gender
    male
    Posts
    711
    Reputation
    132
    Thanks
    7,126
    My Mood
    Mellow
    Well where are you getting the itemspawn and amount from?

  11. #55
    jumboperson187's Avatar
    Join Date
    Jun 2014
    Gender
    male
    Posts
    124
    Reputation
    10
    Thanks
    883
    Quote Originally Posted by Blueblood1 View Post
    - Version: All
    - Spawns in 1000 wooden walls, in a line with a spacing of 5f.

    Code:
                    if (GUILayout.Button("Test"))
                    {
                            float adv = 0f;
                            for (int i = 0; i < 1000; i++) 
                            {
                                adv = adv + 1f;
                                SpawnStructures.placeStructure(0x4269, Camera.main.transform.position + ((Vector3)Camera.main.transform.forward * adv), 1, string.Empty);
                            
                            
                            }
                    }
    Work on MP? I would think Nelson would have the function check that you have the valid mat in your inv.

  12. #56
    Blueblood1's Avatar
    Join Date
    Aug 2012
    Gender
    male
    Posts
    711
    Reputation
    132
    Thanks
    7,126
    My Mood
    Mellow
    Quote Originally Posted by jumboperson187 View Post
    Work on MP? I would think Nelson would have the function check that you have the valid mat in your inv.
    Didn't test it, couldn't find a server :/

  13. #57
    jumboperson187's Avatar
    Join Date
    Jun 2014
    Gender
    male
    Posts
    124
    Reputation
    10
    Thanks
    883
    Quote Originally Posted by Blueblood1 View Post
    Didn't test it, couldn't find a server :/
    Okay, well if it does work on MP I'm gonna give Nelson some serious shit on steam.

  14. #58
    Blueblood1's Avatar
    Join Date
    Aug 2012
    Gender
    male
    Posts
    711
    Reputation
    132
    Thanks
    7,126
    My Mood
    Mellow
    It works MP, Kunii made a player boxer, all players on the map get trapped in walls.. lol

  15. #59
    Kunii's Avatar
    Join Date
    Aug 2012
    Gender
    male
    Location
    Norway
    Posts
    153
    Reputation
    68
    Thanks
    3,816
    Quote Originally Posted by Blueblood1 View Post
    It works MP, Kunii made a player boxer, all players on the map get trapped in walls.. lol
    It also occasionally spawns random shit, such as firetrucks if you click it too fast, too many times

  16. #60
    jumboperson187's Avatar
    Join Date
    Jun 2014
    Gender
    male
    Posts
    124
    Reputation
    10
    Thanks
    883
    Quote Originally Posted by Kunii View Post


    It also occasionally spawns random shit, such as firetrucks if you click it too fast, too many times
    LOL thats great

Page 4 of 12 FirstFirst ... 23456 ... LastLast

Similar Threads

  1. [Source Code] Release your .SQF Source Code Here! (Godmode, ESP, Etc)
    By ItsZaydeh in forum DayZ Mod & Standalone Hacks & Cheats
    Replies: 28
    Last Post: 10-25-2014, 05:00 PM
  2. Post your USED codes here!
    By MuffinHD in forum League of Legends Discussions
    Replies: 47
    Last Post: 01-11-2014, 01:12 AM
  3. [Patched] Post your Auth Codes here! (RSBots.net)
    By Ravallo in forum Runescape Hacks / Bots
    Replies: 220
    Last Post: 10-21-2011, 02:21 PM
  4. [Source Code] Ask for Source Codes here / Release your Source Codes here [Collection]
    By taylan in forum WarRock Hack Source Code
    Replies: 24
    Last Post: 02-01-2011, 11:27 AM
  5. Post your game name here
    By styx23 in forum WarRock - International Hacks
    Replies: 49
    Last Post: 07-17-2007, 08:47 PM