DCMD String Help me.
#1

[color=brown]Hello. I have a new error, this time I cannot figure out what to do for my function, to give out the Value inside of the String.

Example:
Quote:

Hello, my name is bob. I am [Function Value Here] Years old.

The text of the string comes up, just not the %s part.

Here's my code, help me to get it like Above ^

Код:
public OnPlayerCommandText(playerid, cmdtext[]) {
	dcmd(checksober, 10, cmdtext);
	return 0;
}
 
dcmd_checksober(playerid, params[])
{
	new
		id,
		abc[64];
	if (strlen(params))
	{
		id = strval(params);
		if (IsPlayerConnected(id))
		{
			GetPlayerDrunkTime(id);
			format(abc, sizeof (abc), "The Player's Drunk Level is %s.");
			SendClientMessage(id, 0x00FF00AA, "You have been tested for your Soberness");
			SendClientMessage(playerid, 0x00FF00AA, abc);
		}
		else
		{
			SendClientMessage(playerid, 0xFF0000AA, "Player not found");
		}
	}
	else
	{
		SendClientMessage(playerid, 0xFF0000AA, "Usage: \"/checksober <playerid>\"");
	}
	return 1;
}
Reply


Messages In This Thread
DCMD String Help me. - by Ace_Menace - 31.05.2009, 01:38
Re: [FS - Help] DCMD Command - by Correlli - 31.05.2009, 02:01
Re: [FS - Help] DCMD Command - by Ace_Menace - 31.05.2009, 03:01
Re: DCMD String Help me. - by Ace_Menace - 31.05.2009, 05:49
Re: DCMD String Help me. - by Ignas1337 - 31.05.2009, 05:59
Re: DCMD String Help me. - by Ace_Menace - 31.05.2009, 06:03
Re: DCMD String Help me. - by yom - 31.05.2009, 06:14
Re: DCMD String Help me. - by Ace_Menace - 31.05.2009, 06:37

Forum Jump:


Users browsing this thread: 1 Guest(s)