SSCANF
#3

Код:
CMD:me(playerid, params[])
{
	new pName[MAX_PLAYER_NAME]; // Get the players name
	new str[128]; // holds a string
	if (sscanf(params, "z", str)) return SendClientMessage(playerid, 0xFF0000AA, "USAGE: /me <action>"); // Shows how to use the command
	else
	{
		GetPlayerName(playerid, pName, sizeof(pName)); // Gets the player name
		format(str, sizeof(str), "*%s %s", pName, str); // formats it for us, so we can see what it looks like
		SendClientMessageToAll(COLOR_PINK, str); // Just like in mIRC :P 
	}
	return 1;
}
You mean something like this? Also I'll edit this post later if you really need one with multiple params.
Reply


Messages In This Thread
SSCANF - by DRIFT_HUNTER - 27.11.2010, 00:37
Re: SSCANF - by Scenario - 27.11.2010, 00:59
Re: SSCANF - by Leon_Rahil! - 27.11.2010, 01:14
Re: SSCANF - by DRIFT_HUNTER - 27.11.2010, 05:04
Re: SSCANF - by Grim_ - 27.11.2010, 05:14
Respuesta: SSCANF - by MrDeath537 - 27.11.2010, 05:17

Forum Jump:


Users browsing this thread: 1 Guest(s)