strmid HELP PLEASE.
#5

Help plox
Okay, can I make like a function instead of adding the whole code all the time?

Код:
CMD:low(playerid,params[])
{
	new string[256], action[128], act[128], act2[128];
	if(sscanf(params,"s[256]",action)) return SyntaxMSG(playerid, "/low [low chat]");
	if(strlen(action) > 90)
	{
		strmid(act, action, 0, 90);
		strmid(act2, action, 90, 128);
		format(string,sizeof(string), "%s says [low]: %s...", GetNameWithMask(playerid), act);
		ProxDetectorV(3.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
		format(string, sizeof(string), "...%s", act2);
		ProxDetectorV(3.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
	}
	else
	{
		format(string,sizeof(string), "%s says [low]: %s", GetNameWithMask(playerid), action);
		ProxDetectorV(3.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
	}
	return 1;
}
Reply


Messages In This Thread
strmid HELP PLEASE. - by PaulDinam - 14.02.2013, 14:18
Re: strmid HELP PLEASE. - by HarrisonC - 14.02.2013, 14:34
Re: strmid HELP PLEASE. - by Vince - 14.02.2013, 15:28
Re: strmid HELP PLEASE. - by PaulDinam - 14.02.2013, 18:28
Re: strmid HELP PLEASE. - by PaulDinam - 14.02.2013, 20:03

Forum Jump:


Users browsing this thread: 2 Guest(s)