Jump to content

Recommended Posts

Posted

Hey. I've been recently working on a business system but I'm having a problem. I have inserted in the commands params the player and the int ID so the the script will receive the business' ID to be updated in the SQL. But everytime I use the command it asks me for the business' ID which I don't want. 

How can I solve this problem? Thanks.

  • 4 weeks later...
Posted
[Command("command")]
public void BLAHBLAHBLAH(Player p, string id)
{
  if (!Regex.IsMatch(vehicle, @"^\d+$"))
  {
    // Not an INT
    return;
  }

  int id = int.Parse(id);
}

Add them in the function itself; You can change the Argument Parsing from string to what ever you want in the "Command" attribute.

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