Jump to content

adding ticket functions.. could use a little help please


Guest jagodragon

Recommended Posts

i am trying to add a function that will save a note for the gm in the ticket field. i have added all the requitred colums in the db and all of that but i am having a problem.

i want this to be a subfunction of the ticket command so i need to either grab thre separate strings from the userinput of the command as so:

.ticket note [ticket#] [note]

or ask for a nother input from the user after the first as so:

.ticket note [ticket#]
[enter your note on the next line]

this is the start to this in iether situation...

//ticket note
   if(strncmp(px,"note",5) == 0)
   {
       uint32 *ticket_num = strtok(NULL, " ");

       if(!ticket_num)
       {
           SendSysMessage("Please enter a Ticket Number");
           SendSysMessage("To find ticket number: .ticket listall");
           SetSentErrorMessage(true);
           return false;
       }

if any one could point me in the right direction i would appreciate it

ps. i have got these sub commands done and altered the db for these modifications.

.ticket listall - list all tickets
.ticket listopen - lists all open tickets
.ticket listclosed - lists all closed tickets
.ticket listfollowup - lists all tickets flagged for followup
.ticket close - closes a ticket without deleteing it from the db 
.ticket followup - flag a ticket for followup and removes the link to the player

Link to comment
Share on other sites

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use