No Colision Rcon

jottaonline

Member
Donators
Messages
42
Likes
1
Points
8
Hello,

SO after read some stuff and now start making some sense but still dont work :\

i go from program to program last week and try add Rcon command to No colision Pluguin

add some lines changed to program but when i go to Rcon and try dont get anything, and BD dont get steam info to...



C++:
void AddNoCollision(APlayerController* player_controller, FString* message, bool)
{
    AShooterPlayerController* player = static_cast<AShooterPlayerController*>(player_controller);
    if (!player || !player->PlayerStateField() || !player->GetPlayerCharacter())
        return;

    TArray<FString> parsed;
    message->ParseIntoArray(parsed, L" ", true);

    if (parsed.IsValidIndex(1))
    {
        try
        {
            uint64 steam_id = std::stoull(parsed[1].ToString().c_str());

            if (!AllowedNoCollisionBuilders.Contains(steam_id))
            {
                AllowedNoCollisionBuilders.Add(steam_id);
                DBAddNoCollision(steam_id);

                ArkApi::GetApiUtils().SendServerMessage(player, FLinearColor(0, 1, 0), L"{} Added to NoCollision", steam_id);
            }
            else
            {
                ArkApi::GetApiUtils().SendServerMessage(player, FLinearColor(1.0, 0, 0), L"{} Already exists in NoCollision",
                                                        steam_id);
            }
        }
        catch (...)
        {
            ArkApi::GetApiUtils().SendServerMessage(player, FLinearColor(1.0, 0, 0),
                                                    L"Incorrect Syntax: cheat nc.add <SteamID>");
        }
    }
    else
    {
        ArkApi::GetApiUtils().SendServerMessage(player, FLinearColor(1.0, 0, 0),
                                                L"Incorrect Syntax: cheat nc.add <SteamID>");
    }
}
i add:

C++:
void AddNoCollisionRcon(RCONClientConnection* rcon_connection, RCONPacket* rcon_packet, UWorld*)
{
    auto result = AddNoCollision(rcon_packet->Body);
    if (!result.has_value())
        SendRconReply(rcon_connection, rcon_packet->Id, "Successfully added player");
    else
        SendRconReply(rcon_connection, rcon_packet->Id, result.value().c_str());
}


Arkapi::Getcommands().AddRconCommand("nc.remove", &RemoveNoCollisionRcon);


for sure something i have wrong on that :\

thanks for the help
 
Advertisement

Monetise Your Game Server

Want to monetise your ARK Server? Create your own webstore at tebex.io

Top