A simple Help
#1

Hello!
Can anybody tell me how to convert this strcmp command to zcmd?
Here is the code below

pawn Код:
if(strcmp(cmd, "/dance", true) == 0) {
          new tmp[256];
          new D_STYLE;
          tmp = strtok(cmdtext, idx);
          if(!strlen(tmp) || strlen(tmp) > 2) {
          SendClientMessage(playerid,0xFF0000FF,"USAGE: /dance [style 1-4]");
          return 1;}
          D_STYLE = strval(tmp);
          if(D_STYLE < 1 || D_STYLE > 4) {
          SendClientMessage(playerid,0xFF0000FF,"USAGE: /dance [style 1-4]");
          return 1;}
          if(D_STYLE == 1) {
          SetPlayerSpecialAction(playerid,SPECIAL_ACTION_DANCE1);
          } else if(D_STYLE == 2) {
          SetPlayerSpecialAction(playerid,SPECIAL_ACTION_DANCE2);
          } else if(D_STYLE == 3) {
          SetPlayerSpecialAction(playerid,SPECIAL_ACTION_DANCE3);
          } else if(D_STYLE == 4) {
          SetPlayerSpecialAction(playerid,SPECIAL_ACTION_DANCE4);
          }
          return 1;}
Reply


Messages In This Thread
A simple Help - by Ironboy - 30.03.2011, 20:20
Re: A simple Help - by admantis - 30.03.2011, 20:22
Re: A simple Help - by Ironboy - 30.03.2011, 20:24

Forum Jump:


Users browsing this thread: 1 Guest(s)