OnPlayerCommand Text - unreachable code - PROBLEM!
#4

Quote:
Originally Posted by 13th
Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
	new cmd[256];
	new name[MAX_PLAYER_NAME], string[48];
	GetPlayerName(playerid, name, sizeof(name));
	format(string, sizeof(string), "Welcome to Mayor %s", name );

	if(strcmp(cmdtext, "/**********", true) == 0)
	{
		SendClientMessageToAll(0xFFFF00AA, string);
		SetPlayerSkin(playerid, 147);
		SetPlayerPos(playerid, 1044.4341,1012.6452,11.0000);
 		return 1;
	}

	else if(strcmp(cmd, "/help moneygrub", true) == 1)
	{
		return 1;
	}

	else if(strcmp(cmd, "/tips moneygrub", true) == 0)
	{
		return 1;
	}

 return SendClientMessage(playerid, 0xFFFFFFAA, "Unknown Command");;
}
Whenever i type a command like /blanb[kvbpfg or / it logs me in as mayor! help?!?!
Reply


Messages In This Thread
OnPlayerCommand Text - unreachable code - PROBLEM! - by nickbugun - 09.04.2009, 09:44
Re: OnPlayerCommand Text - unreachable code - PROBLEM! - by gernes - 09.04.2009, 10:12
Re: OnPlayerCommand Text - unreachable code - PROBLEM! - by 13th - 09.04.2009, 10:13
Re: OnPlayerCommand Text - unreachable code - PROBLEM! - by nickbugun - 09.04.2009, 11:57

Forum Jump:


Users browsing this thread: 2 Guest(s)