Jump to content

Recommended Posts

Posted (edited)

Hello Dear RAGE MP Community,

when I start my resource and make a server chat event I will take Error that can see in Console logs.

 

Console logs:

[DONE] Started resource transfer server at 22006 port.
[DONE] Client-side packages weight: 0.000000 MB (uncompressed: 0.000000 MB).
[INFO] Initializing networking...
[DONE] Networking has been started: (IPv4-only) at 127.0.0.1:22005
[DONE] The server is ready to accept connections.
[N] Incoming connection from 127.0.0.1
Could not load type 'GTANetworkAPI.Client' from assembly 'Bootstrapper, Version=1.1.0.0, Culture=neutral, PublicKeyToken=null'.
Could not load type 'GTANetworkAPI.Client' from assembly 'Bootstrapper, Version=1.1.0.0, Culture=neutral, PublicKeyToken=null'.

 

using this scripts in ServerSide:

[ServerEvent(Event.ResourceStart)]
public void OnResourceStart()
{
  NAPI.Server.SetGlobalServerChat(false);
}



[ServerEvent(Event.ChatMessage)]
public void EventChatMessage(Client client, string message)
{
  Client[] clients = NAPI.Pools.GetAllPlayers().FindAll(x => x.Position.DistanceTo2D(client.Position) <= 5).ToArray();
  for (int i = 0; i < clients.Length; i++)
  {
    if (!clients[i].Exists)
      continue;
    clients[i].SendChatMessage($"{client.Name} says: {message}");
  }
}

 

Edited by LT.Steiner
Posted

Could not load type 'GTANetworkAPI.Client' from assembly 'Bootstrapper, Version=1.1.0.0, Culture=neutral, PublicKeyToken=null'.
 

Read the changelog to see how to adapt your gamemode to 1.1 version.

Posted (edited)
1 час назад, LT.Steiner сказал:

I know, but my library wont recognize (Player player), I should write (Client player), how can I fix it? somebody show me a way to fix it

Add RAGEMP\server-files\dotnet\runtime\bootstrapper.dll to your project
Changelog: 

 

Edited by Chelton

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...