about commands
#1

I got some problems cant make any commands on my GM, tried in different ways and still have erros

lets take a simple command
Код:
if(strcmp(cmd, "/handsup", true) == 0)
{
  SetPlayerSpecialAction(playerid,SPECIAL_ACTION_HANDSUP);
  return 1;
}
When i compile it gives me ERROS

Код:
invalid function or declaration
invalid function or declaration
2 problem When im tryin to make command in 2nd way its jst doesn't work, when i type it >server say Unknow command
simple command
Код:
dcmd_kill1(playerid, cmdtext[]) {
  #pragma unused cmdtext
  SetPlayerHealth( playerid, 20 );
  return 1;
}
Reply
#2

pawn Код:
if(strcmp(cmdtext, "/handsup", true) == 0)
    {
      SetPlayerSpecialAction(playerid, SPECIAL_ACTION_HANDSUP);
      return 1;
    }
That compiles just fine for me. What the exact line(s) your having the errors on?

Edit:

Actually, I use tested the whole thing:

http://pastebin.com/f122c63e2

And it works fine. Even the /kill1 command.
Reply
#3

Quote:
Originally Posted by xploit101
Код:
dcmd_kill1(playerid, cmdtext[]) {
  #pragma unused cmdtext
  SetPlayerHealth( playerid, 20 );
  return 1;
}
Код:
dcmd_kill1(playerid,params[]) {
  #pragma unused params
  SetPlayerHealth(playerid,0.00 );
  return 1;
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)