Page 3 of 3 FirstFirst 123
Results 31 to 41 of 41
  1. #31
    Fabi0wZ1's Avatar
    Join Date
    Jun 2015
    Gender
    male
    Posts
    24
    Reputation
    10
    Thanks
    0
    I found out why is giving me the error, but its the type of thing thats hard for me to fix since i dont know TypeScript very well, please @ArkMods end my suffering and show me the player-sniper-config document

  2. #32
    Killer Be Killed's Avatar
    Join Date
    Jun 2010
    Gender
    male
    Posts
    212
    Reputation
    53
    Thanks
    2,352
    My Mood
    Asleep
    Quote Originally Posted by Fabi0wZ1 View Post
    I found out why is giving me the error, but its the type of thing thats hard for me to fix since i dont know TypeScript very well, please @ArkMods end my suffering and show me the player-sniper-config document
    It's not that hard to guess what the structure of the config looks like by just having a look at the code. Let's have a look for any occurrences of the config in Ark's code.

    Code:
    for (let i = 0; i < config.list.length; i++) {
    OK, so there is an array called 'list'.

    Code:
    player.name.toLowerCase() == config.list[i].name.toLowerCase()) {
    The items in that array have a property called 'name' which we know is a string since it's being compared to one here.

    Code:
    'Found: '+ player.name + ' : ' + config.list[i].type);
    The items also have a property called 'type' which is most likely also a string.

    Code:
    for (let i = 0; i < config.portals.length; i++) {
    There is another array called 'portals'.

    Code:
    update.newObjects[k].objectType == config.portals[i].id
    The items in that array have a property called 'id' which we know is a number since its being compared to one here.

    Code:
    ' Found: ' + config.portals[i].name);
    The items also have a property called 'name' which is most likely a string.

    Putting all of this information together, we can guess that the config looks something like this
    Code:
    {
        "list": [
            {
                "name": "Eendi",
                "type": "Cool players"
            },
            {
                "name": "Oshyu",
                "type": "Fame Trainers"
            },
            {
                "name": "You get the idea",
                "type": "I hope"
            }
        ],
        "portals": [
            {
                "id": 81942,
                "name": "Ice Tomb Portal"
            },
            {
                "id": 23879423,
                "name": "Cave of a Thousand Treasures"
            }
        ]
    }

  3. The Following User Says Thank You to Killer Be Killed For This Useful Post:

    Fabi0wZ1 (03-26-2018)

  4. #33
    Fabi0wZ1's Avatar
    Join Date
    Jun 2015
    Gender
    male
    Posts
    24
    Reputation
    10
    Thanks
    0
    Quote Originally Posted by Killer Be Killed View Post
    It's not that hard to guess what the structure of the config looks like by just having a look at the code. Let's have a look for any occurrences of the config in Ark's code.

    Code:
    for (let i = 0; i < config.list.length; i++) {
    OK, so there is an array called 'list'.

    Code:
    player.name.toLowerCase() == config.list[i].name.toLowerCase()) {
    The items in that array have a property called 'name' which we know is a string since it's being compared to one here.

    Code:
    'Found: '+ player.name + ' : ' + config.list[i].type);
    The items also have a property called 'type' which is most likely also a string.

    Code:
    for (let i = 0; i < config.portals.length; i++) {
    There is another array called 'portals'.

    Code:
    update.newObjects[k].objectType == config.portals[i].id
    The items in that array have a property called 'id' which we know is a number since its being compared to one here.

    Code:
    ' Found: ' + config.portals[i].name);
    The items also have a property called 'name' which is most likely a string.

    Putting all of this information together, we can guess that the config looks something like this
    Code:
    {
        "list": [
            {
                "name": "Eendi",
                "type": "Cool players"
            },
            {
                "name": "Oshyu",
                "type": "Fame Trainers"
            },
            {
                "name": "You get the idea",
                "type": "I hope"
            }
        ],
        "portals": [
            {
                "id": 81942,
                "name": "Ice Tomb Portal"
            },
            {
                "id": 23879423,
                "name": "Cave of a Thousand Treasures"
            }
        ]
    }
    You wont believe how close i was to making it.
    Anyway got it up and running thank you so much both @ArkMods and @Killer Be Killed

    Last thing where can i find every portal static id? I know its probably in the xml file, just dont know wich one
    Last edited by Fabi0wZ1; 03-26-2018 at 04:48 AM.

  5. #34
    Killer Be Killed's Avatar
    Join Date
    Jun 2010
    Gender
    male
    Posts
    212
    Reputation
    53
    Thanks
    2,352
    My Mood
    Asleep
    Quote Originally Posted by Fabi0wZ1 View Post
    You wont believe how close i was to making it.
    Anyway got it up and running thank you so much both @ArkMods and @Killer Be Killed

    Last thing where can i find every portal static id? I know its probably in the xml file, just dont know wich one
    nrelay uses the Objects.json file instead of the Objects.xml file and it will automatically download the latest one when it runs so you should already have it. If you search that file for the term
    Code:
    "Class": "Portal"
    You will be able to see all portals. The id field in the config file should correspond to the "type" field in the Objects.json file. For example the Ice tomb portal has a "type" of 0x7fb8

    One useful thing about TypeScript (and many other languages) is that using a hexadecimal literal as a number is fine. So you can put "0x7fb8" right into the config file instead of converting it to a decimal number first.

  6. #35
    Fabi0wZ1's Avatar
    Join Date
    Jun 2015
    Gender
    male
    Posts
    24
    Reputation
    10
    Thanks
    0
    i keep getting this error [18:30:47 | PluginManager] TypeError: Cannot read property 'toLowerCase' of null
    on this line of code
    Code:
    if (player.name != '' && player.name.toLowerCase() == config.list[i].name.toLowerCase()){
    why is it giving me null values instead of just an empty string?


    it is tracking my accounts, but it's also giving me that error
    Last edited by Fabi0wZ1; 03-26-2018 at 10:54 AM.

  7. #36
    Fabi0wZ1's Avatar
    Join Date
    Jun 2015
    Gender
    male
    Posts
    24
    Reputation
    10
    Thanks
    0
    for now i will have to use without .toLowerCase but it's kinda hard if someone has a hidden realmeye and i dont know which letters in their name is caps locked and wich ones are not, whenever someone can help me i appreciate it

  8. #37
    willfuttbuck's Avatar
    Join Date
    Feb 2013
    Gender
    male
    Posts
    235
    Reputation
    28
    Thanks
    6,029
    Quote Originally Posted by Fabi0wZ1 View Post
    for now i will have to use without .toLowerCase but it's kinda hard if someone has a hidden realmeye and i dont know which letters in their name is caps locked and wich ones are not, whenever someone can help me i appreciate it
    cause you're not checking if it's null, null isn't hte same as a empty string, and empty string is still a string, not a null value.

    Check it for null not an empty string

    if (player.name != null && player.name.toLowerCase() == config.list[i].name.toLowerCase())
    {
    }

    would probably do what you want.

  9. #38
    ArkMods's Avatar
    Join Date
    Sep 2016
    Gender
    male
    Location
    DWORD* loc = nullptr;
    Posts
    192
    Reputation
    10
    Thanks
    63
    My Mood
    Sleepy
    When you process the data from new objects => IPlayerData if the object is not a player <IPlayerData>.name will be an empty string.

  10. #39
    ddddog's Avatar
    Join Date
    Jul 2017
    Gender
    female
    Posts
    10
    Reputation
    10
    Thanks
    0
    @ArkMods @Killer Be Killed could someone add me on skype @ddddog and give me like a walk through cause I have no idea where to begin with tracking players

  11. #40
    ArkMods's Avatar
    Join Date
    Sep 2016
    Gender
    male
    Location
    DWORD* loc = nullptr;
    Posts
    192
    Reputation
    10
    Thanks
    63
    My Mood
    Sleepy
    Quote Originally Posted by ddddog View Post
    @ArkMods @Killer Be Killed could someone add me on skype @ddddog and give me like a walk through cause I have no idea where to begin with tracking players
    *******: Ark Died#2791
    Ill help for like $5 paypal, I already explained this earlier on the thread...

  12. #41
    ddddog's Avatar
    Join Date
    Jul 2017
    Gender
    female
    Posts
    10
    Reputation
    10
    Thanks
    0
    well nevermind then im a broke boy

Page 3 of 3 FirstFirst 123

Similar Threads

  1. [Help Request] Help regarding macros
    By PREG8 in forum Counter-Strike 2 Help
    Replies: 0
    Last Post: 04-11-2017, 05:53 AM
  2. [Help Request] Help Regarding Rich Peds And Spawn Rich Peds Options - NEED AN EXPERT
    By Bolapeluda in forum Grand Theft Auto 5 (GTA V) Help
    Replies: 0
    Last Post: 12-29-2015, 05:12 PM
  3. [Help Request] need help regarding downloading bf3 to origin
    By nickaustin in forum Suggestions, Requests & General Help
    Replies: 8
    Last Post: 08-30-2013, 09:29 AM
  4. [Help Request] Help regarding Photoshop CS4 + DTXFormat
    By Pathogenic in forum Combat Arms Mod Help
    Replies: 0
    Last Post: 07-13-2013, 01:38 AM
  5. [Help Request] Player Tracking mod?
    By Bashman in forum Minecraft Help
    Replies: 2
    Last Post: 05-14-2012, 12:23 AM