Multiple commands same function
#1

how can i make that if i type /race or /drag i will teleport to the same place? (like having multiple commands for the same thing) how can i make multiple commands have the same function/results? plz help
Reply
#2

pawn Код:
if(strcmp(cmd, "/example1", true) == 0)
{
  SendClientMessage(playerid, GREEN, "Example command one!");
  return 1;
}
pawn Код:
if(strcmp(cmd, "/example2", true) == 0)
{
  SendClientMessage(playerid, GREEN, "Example command two!");
  return 1;
}
It's that simple.
Reply
#3

or
pawn Код:
if(!strcmp(cmdtext[1],"example1",true) || !strcmp(cmdtext[1],"example1",true))
{
  return 1;
}
Reply
#4

Lol at the " // Blocks PMs", That could be confusing to a new scripter.
Reply
#5

Quote:
Originally Posted by Chris - X-Host
Lol at the " // Blocks PMs", That could be confusing to a new scripter.
It was an accident, deleted. (It's cause i'm re-doing my block-PM command, i'm tired lawl).
Reply
#6

Quote:
Originally Posted by Joe Staff
or
pawn Код:
if(!strcmp(cmdtext[1],"example1",true) || !strcmp(cmdtext[1],"example1",true))
{
  return 1;
}
thanks
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)