How to make a /me and /Do
#3

Very easy and simple mate

Код:
CMD:me(playerid, params[])
{
	if(CheckGMX(playerid)) return 1;
	if(isnull(params)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /me [action]");
	new string[128];
	format(string, sizeof(string), "* %s %s", GetPlayerNameEx(playerid), params);
	SetPlayerChatBubble(playerid,string,COLOR_PURPLE,60.0,5000);
	ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
	    	return 1;
    }
	return 1;
}

CMD:do(playerid, params[])
{
	if(CheckGMX(playerid)) return 1;
	if(gPlayerLogged[playerid] == 0)
	{
		SendClientMessage(playerid, COLOR_GREY, "You're not logged in.");
		return 1;
	}
	if(isnull(params)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /do [action]");
	else if(strlen(params) >= 100) return SendClientMessage(playerid, COLOR_GREY, "The specified message must not be longer than 99 characters in length.");
	new string[128];
	format(string, sizeof(string), "* %s (( %s ))", params, GetPlayerNameEx(playerid));
	SetPlayerChatBubble(playerid,string,COLOR_PURPLE,60.0,5000);
	ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
    }
	return 1;
}
Reply


Messages In This Thread
How to make a /me and /Do - by JoanB - 27.03.2014, 08:10
Re: How to make a /me and /Do - by Flake. - 27.03.2014, 08:36
Re: How to make a /me and /Do - by ChristianIvann09 - 27.03.2014, 08:41
Re: How to make a /me and /Do - by AhmedMohamed - 27.03.2014, 09:23

Forum Jump:


Users browsing this thread: 1 Guest(s)