Jump to content

С# | How to get the recipient with the sender?


Recommended Posts

Posted

Hello, I saw this code, I wanted to know how to do it
 

[Command("kick")]
public void CMD_Kick(Client client, Client player, string grund)

client - sender

player - recipient

 

Posted

You would have to access the target player (recipient) via his ID or Name

 

public void CMD_Kick(Client client, string idOrName, string grund)

Then implement the logic for looping all IDs and Names and find the exact one you want

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...