All pastes #498568 Raw Edit

Untitled

public text v1 · immutable
·published 2007-05-20 15:08 UTC
rendered paste body
public 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;
}