#vip benefits

26 messages · Page 1 of 1 (latest)

steady ocean
#

It would have to be manually done, unless you make a discord bot or other script for automation which of course is advanced technical level

hushed wigeon
hushed wigeon
#
use oxide::prelude::*;
use rustcord::Rustcord;

#[plugin_name("SpawnWithM2")]
struct SpawnWithM2;

impl Plugin for SpawnWithM2 {
    fn on_server_initialized(&self) {
        let player_name = "BraytonJay";
        let item_id = 131;
        
        let player = match find_player_by_name(player_name) {
            Some(player) => player,
            None => return,
        };
        
        player.inventory.give(item_id, 1, false);
        
        Rustcord::send_chat_message(player.id, "You have spawned with a M2!");
    }
}

fn find_player_by_name(name: &str) -> Option<BasePlayer> {
    for player in BasePlayer::active_players() {
        if player.display_name() == name {
            return Some(player);
        }
    }
    None
}

It came up with this and I put it in the commands but it didn’t work

#

I enter it and it says not found

steady ocean
#

Im not proficient with the Rust language, but if it's a public cargo package you're using, make sure it's for rust console and not PC

#

Oh ChatGPT gave you that script? Considering it's cut-off knowledge is 2022 currently, it definitely won't write any code for community servers on Rust Console Edition @hushed wigeon

hushed wigeon
#

where do I find my game servers api

steady ocean
#

There isn't a public one

#

You have to reverse engineer the GPORTAL website to find the private one

hushed wigeon
#

I can write it in 2022 but I can’t find a way to implement it in

steady ocean
#

WaitWhat you can go in the past and write code?

hushed wigeon
#

the ai can use the same 2022 code

#

atleast I think

steady ocean
#

No it can't. I will reiterate that code is for Rust PC, not console.

Community servers on console was released at the end of 2023, not 2022. Therefore, GPT isn't even aware of console Community servers yet, so it definitely won't write code for you in regards to it.

#

GPT certainly won't reverse engineer a website for private API access either, so it's basically Impossible for AI to write the code for you at this time.

hushed wigeon
#

is there still a way to make a player spawn in with items

#

But only a singular set player and not all

steady ocean
#

It has to be a group, and it can't be just 5 times like your original message asked.

hushed wigeon
#

so I would manually have to do it then

steady ocean
#

If you have no programming knowledge, then yes

hushed wigeon
#

Would I put it in boot or console

steady ocean
#

Whichever you want. It's good practice to go in boot commands.

hushed wigeon
#

ok thank you

#

I’m sorry for all the questions