commands help
#1

ok when making script commands do i have to um ...put this again or what

public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/help", cmdtext, true, 10) == 0)
{
SendClientMessage(playerid,0xAA3333AA,"Test command"); // Do something here
return 1;
}
return 0;
}
Reply
#2

No, in the OnPlayerCommandText just add the commands: (or use dcmd or whatever)

pawn Код:
if (strcmp("/help", cmdtext, true, 10) == 0)
  {
    SendClientMessage(playerid,0xAA3333AA,"Test command"); // Do something here
   return 1;
  }

if (strcmp("/anothercmd", cmdtext, true, 10) == 0)
  {
   // Do something here
   return 1;
  }
Reply
#3

ok thanks
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)