Question
#1

How can i make a switch but with letters and not numbers?
Like
that i type /car
and then i can type /car engine or /car lights etc.. (i cant type command:car engine cuz it fucks up the pawn)
Thanks in advance
Reply
#2

pawn Код:
if (!strcmp("car", cmdtext[1], true, 3))
{
  if (cmdtext[4] != ' ') return SendClientMessage(playerid, 0xff0000ff, "Usage: /car engine or /car lights /car whatsoever");
  if (!strcmp("engine", cmdtext[5], true, 6))
  {
    // user typed /car engine
    // put functions here
  }
  else if (!strcmp("lights", cmdtext[5], true, 6))
  {
    // user typed /car lights
    // put functions here
  }
  else if (!strcmp("boot", cmdtext[5], true, 4))
  {
    // user typed /car boot
    // put functions here
  }
  else return SendClientMessage(playerid, 0xff0000ff, "Error: unknown /car command.");
  return 1;
}
Reply
#3

Thanks but can you convert it to ZCMD?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)