27.10.2010, 02:20
Quote:
Here is a simple /me command with zcmd. The reason i put it here, is because i had hell with it and finally got it to work.
pawn Code:
|
Pretty simple example:
pawn Code:
CMD:me(playerid, params[])
{
if(isnull(params)) return SendClientMessage(playerid, 0xFFFFFFFF, "Usage: /me [action]");
else if((strlen(params) + 24) > 127) return SendClientMessage(playerid, 0xFFFFFFFF, "The action has to be between 0 and 123 characters long!");
new
name[24],
string[128];
GetPlayerName(playerid, name, 24);
format(string, sizeof(string), "%s %s", name, params);
SendClientMessageToAll(0xFFFFFFFF, string);
return 1;
}