/me command in dcmd [Solved]
#1

I am pretty new at pawn and I cant really figure out how to make a /me command using dcmd.



Example: /me is happy = ee100 is happy

Just so u know what it is. But I bet everyone know what /me is.

- ee100
Reply
#2

dcmd_me(playerid,params[])
{

new string[128];
if(!strlen(params)) return SendClientMessage(playerid,0xF60000AA, "/me <action>.");
format(string, sizeof(string), "* %s (%d) %s", pNick(playerid), playerid, params);
SendClientMessageToAll(0x00FFFFFF, string);
return 1;
}

stock pNick(playerid)
{
new nick[MAX_PLAYER_NAME];
GetPlayerName(playerid, nick, MAX_PLAYER_NAME);
return nick;
}
Reply
#3

Quote:
Originally Posted by brett7
dcmd_me(playerid,params[])
{

new string[128];
if(!strlen(params)) return SendClientMessage(playerid,0xF60000AA, "/me <action>.");
format(string, sizeof(string), "* %s (%d) %s", pNick(playerid), playerid, params);
SendClientMessageToAll(0x00FFFFFF, string);
return 1;
}

stock pNick(playerid)
{
new nick[MAX_PLAYER_NAME];
GetPlayerName(playerid, nick, MAX_PLAYER_NAME);
return nick;
}
Would be best if u could remove the (id) thing.. But it worked tho
Reply
#4

would be best if you searched first tbh
Reply
#5

Could u tell me how to remove that id thing.. i only want the name, not name and id.
Reply
#6

Код:
dcmd_me(playerid,params[])
{

  new string[128];
  if(!strlen(params)) return SendClientMessage(playerid,0xF60000AA, "/me <action>.");
  format(string, sizeof(string), "* %s %s", pNick(playerid), params);
   SendClientMessageToAll(0x00FFFFFF, string);
  return 1;
}

stock pNick(playerid)
{
  new nick[MAX_PLAYER_NAME];
  GetPlayerName(playerid, nick, MAX_PLAYER_NAME);
  return nick;
}
Reply
#7

Thanks man!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)