/me, /do, /action returns if longer then 3 params
#1

I got those commands:

pawn Код:
dcmd_do(playerid, params[])
    {
      new action, pName[MAX_PLAYER_NAME],string[256];
      if(sscanf(params,"s",action)) return SendClientMessage(playerid,COLOR_DARKRED,"Usage: /do [action]");
      GetPlayerName(playerid,pName,sizeof(pName));
      format(string,sizeof(string),"%s ((%s))",action,pName);
      ProxDetector(25,playerid,string,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
      return 1;
    }
    dcmd_me(playerid, params[])
    {
      new action, pName[MAX_PLAYER_NAME],string[256];
      if(sscanf(params,"s",action)) return SendClientMessage(playerid,COLOR_DARKRED,"Usage: /me [action]");
      GetPlayerName(playerid,pName,sizeof(pName));
      format(string,sizeof(string),"%s %s",pName,action);
      ProxDetector(25,playerid,string,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
      return 1;
    }
  dcmd_action(playerid, params[])
    {
      new action, pName[MAX_PLAYER_NAME],string[256];
      if(sscanf(params,"s",action)) return SendClientMessage(playerid,COLOR_DARKRED,"Usage: /action [action]");
      GetPlayerName(playerid,pName,sizeof(pName));
      format(string,sizeof(string),"((%s)) %s",pName,action);
      ProxDetector(25,playerid,string,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
      return 1;
    }
If you type example "/me is a" it sends:

<Name> is a

if you type "/me is a jerk"

it returns 1; and sends nothing... :S Same for all those 3.. why? Plx xD
Reply
#2

You have no size on this new action

Try to put new action[64];
Reply
#3

nvm
Reply
#4

Quote:
Originally Posted by Dujma
You have no size on this new action

Try to put new action[64];
Thx
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)