Untitled
public text v1 · immutablepublic OnPlayerCommandText(playerid, cmdtext[])
{
new command[256], index;
command = strtok(cmdtext, index);
if (strcmp(command, "/me", true)==0)
{
new string[256];
string = strrest(cmdtext, index);
if(!strlen(string))
{
SendErrMsg(playerid, "Usage: /me <Actions>");
return 1;
}
new tmp[256], pname[24];
format(tmp, sizeof(tmp), "%s %s", GetPlayerName(playerid, pname, 24), string);
SendClientMessageToAll(GetPlayerColor(playerid), string);
return 1;
}
return 0;
}