/me command
#8

Quote:
Originally Posted by CyberGhost
View Post
You must have the zcmd include
pawn Code:
COMMAND:me(playerid, params[])
{
    if(isnull(params)) return SendClientMessage(playerid, 0xFF0000AA, "Usage: /me [text]");
    {
        new string[128], name[24];
        GetPlayerName(playerid, name, sizeof(name));
        format(string, sizeof(string), "%s: %s", name, params);
        SendClientMessageToAll(GetPlayerColor(playerid), string);
    }
    return 1;
}
.....??


PHP Code:
stock SendLocalChat(playerid,color,msg[],Float:radius)
{
  new 
Float:x,Float:y,Float:z;
  
GetPlayerPos(playerid,x,y,z);
  for(new 
ply;ply<MAX_PLAYERS;ply++)
  {
    if(
IsPlayerInRangeOfPoint(ply,radius,x,y,z))SendClientMessage(ply,color,msg);
  }
  return 
1;

PHP Code:
CMD:me(playeridparams[])
{
    if(
sscanf(params"s[128]"params)) return SendClientMessage(playeridCOLOR_GREY"USAGE: /me [text]");
    new 
str[128], new PlayerName[24];
     
GetPlayerName(playeridPlayerNamesizeof(PlayerName));
      
format(strsizeof(str), "* %s %s"PlayerNameparams);
       
SendLocalChat(playerid,COLOR_PURPLE,str,30.0);
    return 
1;

Reply


Messages In This Thread
/me command - by Rabbayazza - 10.08.2011, 23:20
AW: /me command - by Nero_3D - 10.08.2011, 23:35
Re: /me command - by Zonoya - 10.08.2011, 23:38
Re: /me command - by Rabbayazza - 11.08.2011, 01:18
Re: /me command - by Laronic - 11.08.2011, 01:58
Re: /me command - by Rabbayazza - 11.08.2011, 02:01
Re: /me command - by Laronic - 11.08.2011, 02:04
Re: /me command - by Kush - 11.08.2011, 02:04

Forum Jump:


Users browsing this thread: 2 Guest(s)