i need the /me comand lol
#3

pawn Код:
// Bigstrtok function.
stock bigstrtok(const string[], &idx)
{
  new length = strlen(string);
    while ((idx < length) && (string[idx] <= ' '))
    {
        idx++;
    }
    new offset = idx;
    new result[128];
    while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
    {
        result[idx - offset] = string[idx];
        idx++;
    }
    result[idx - offset] = EOS;
    return result;
}
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
  new string[128],bigtext[128];
  if(!strcmp(cmd,"/me",true))
  {
     bigtext=bigstrtok(cmdtext,idx);
     if(!strlen(bigtext)) return SendClientMessage(playerid,0xAFAFAFAA,"Syntax: /me [action]");
     format(string,sizeof(string)," * %s  %s.",PlayerName(playerid),bigtext);
     retirm SendClientMessageToAll(0xAA3333AA,string);
  }
Use that as the PlayerName varaieble.
pawn Код:
PlayerName(playerid)
{
  new n[24];
  GetPlayerName(playerid,n,24);
  return n;
}
Reply


Messages In This Thread
i need the /me comand lol - by Drift_04 - 03.03.2009, 05:12
Re: i need the /me comand lol - by TheAngel105 - 03.03.2009, 05:27
Re: i need the /me comand lol - by MenaceX^ - 03.03.2009, 08:11
Re: i need the /me comand lol - by Rks25 - 03.03.2009, 13:23
Re: i need the /me comand lol - by Nero_3D - 03.03.2009, 13:45
Re: i need the /me comand lol - by Drift_04 - 03.03.2009, 22:55

Forum Jump:


Users browsing this thread: 1 Guest(s)