SA-MP Forums Archive
/me command I need help - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: /me command I need help (/showthread.php?tid=80817)



/me command I need help - Guardian - 06.06.2009

Sorry for reposting it but i needed answers. I wanted the /me command to be in lvdm
public OnPlayerCommandText(playerid, cmdtext[])
{
if(!strcmp(cmdtext, "/me", true, 3)) // 3 is the length of /me
{
if(cmdtext[3] == 0) {
SendClientMessage(playerid, 0xFF0000FF, "USAGE: /me [action]");
return 1;
}
new str[128];
GetPlayerName(playerid, str, sizeof(str));
format(str, sizeof(str), "* %s %s", str, cmdtext[4]);
SendClientMessageToAll(0xFFFF00AA, str);
return 1;
}
return 0;
}

Please tell me more specific details on how to add this script


Re: /me command I need help - MenaceX^ - 06.06.2009

pawn Код:
if(!strcmp(cmd,"/me",true))
{
  if(cmdtext[idx++] != 32 || cmdtext[idx] == EOS) return SendClientMessage(playerid,color,"USAGE: /me [action]");
  format(string,sizeof(string),"* %s %s",GetName(playerid),cmdtext[idx]);
  return SendClientMessageToAll(color,string);
}