2 Questions ( Scoring and something else )
#6

Caution: May be buggy, I didn't use STRTOK.

Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
	if (strcmp("/setage", cmdtext, true, 10) == 0)
	{
	new string[18];
	if(cmdtext[9] == 0)
		{
		SendClientMessage(playerid, COLOR_[color], "Invalid number, /setage 1-99");
		return 1;
		}
	if(cmdtext[9] != 0)
	  {
		format(string, sizeof(string), "You are %d years old", cmdtext[9]);
	  SendClientMessage(playerid, COLOR_[color], string);
		// Set whatever you variables you want to become to players age.
		return 1;
	}
}
	return 0;
}
Its not tested.

I dont have much hope for it, but good luck hehe
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 3 Guest(s)