How Can I Do This?
#1

How would I be able to link a command such as /ticket to be able to work using either /ticket or by pressing the sub mission button? Basically I have the command made I just need to know how to use the sub mission button with it and other commands as well. Thanks in advance!
Reply
#2

Something like this
pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
  if (newkeys & KEY_SUBMISSION)
  {
    OnPlayerCommandText(playerid, "/ticket");
    //if /ticket is in another script, use:
    //CallRemoteFunction("OnPlayerCommandText", "is", playerid, "/ticket");
    return true;
  }

  return false;
}
Reply
#3

Quote:
Originally Posted by 0rb
Something like this
pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
  if (newkeys & KEY_SUBMISSION)
  {
    OnPlayerCommandText(playerid, "/ticket");
    //if /ticket is in another script, use:
    //CallRemoteFunction("OnPlayerCommandText", "is", playerid, "/ticket");
    return true;
  }

  return false;
}
Thanks so much I really appreciate it!

Now I need to know how I could associate this with a dcmd command please. Would it be OnPlayerCommandText(playerid, "dcmd_command");? Thanks in advance!
Reply
#4

Np,

You just need to call
pawn Код:
dcmd_ticket(playerid, ""); //instead of OnPlayerCommandText(playerid, "/ticket");
(i think)
Reply
#5

Quote:
Originally Posted by 0rb
Np,

You just need to call
pawn Код:
dcmd_ticket(playerid, ""); //instead of OnPlayerCommandText(playerid, "/ticket");
(i think)
Ah I see lol lemme give it a try and I will post the outcome and once again thank you fingers crossed XXXX I hope this works!

EDIT
I just tried that out and for some reason it does not work :P I wish there was like a small tut on this sort of thing
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)