Multiple cmds
#1

Hey everyone i need help. how to make multiple commands in PAWNO?

Ive seen vids that copy n paste the command line it doesnt work for me.
Reply
#2

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
  if(strcmp(cmdtext, "/help", true) == 0)
  {
   // Command 1
   return 1;
  }
  if(strcmp(cmdtext, "/rules", true) == 0)
  {
   // Command 2
  }
  return 0;
}
Reply
#3

ty grim
Reply
#4

It doesnґt work cause you forget to add more than just the "whole commands".
And commands are constructed on the respective scripts.

You can create commands with dcmd, zdcmd and others..If you donґt know what this is just learn to script, means: Search SAMP Wiki and read basics.

You can add to your script how many commands you want (I know it has a limit).

Reply
#5

Quote:
Originally Posted by [SAK
Karlis ]
ty grim
You're welcome.

@Flashy: What are you talking about? There's no limit to the amount of commands you can have, and using regular OnPlayerCommandText is fine.
Reply
#6

Oh, really? My bad
Reply
#7

it doesnt tele me it sais UNKNOWN CMD thats wut i wrote
Reply
#8

Nah, I was thinking SAMP and GTA have a limit of Playercommands.

But its wrong xD
Reply
#9

Add
pawn Код:
return 1;
after the SetPlayerPos line.
Reply
#10

no it still doesnt work
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)