House command help
#1

I got this code to where if you type /house tommeh, the player would teleport to the player's house, but how can i get this code to where if i type /house tom, or /house tomm, or even /house t, it knows that somebody has a file with those letters and executes the command?

Код:
dcmd_house(playerid, params[])
{
	#pragma unused params
	new file[128];
	new pname[32];
	new Float:HouseX, Float:HouseY, Float:HouseZ;
	if(sscanf(params, "s", pname)) return SendClientMessage(playerid, COLOR_ORANGE, "/house <Name>");
	format(file, sizeof(file), "/xadmin/Users/%s.ini", pname);
	if(!dini_Exists(file))return SendClientMessage(playerid, COLOR_RED,"That Player doesn't have a house");
	HouseX = dini_Float(file, "HouseX");
	HouseY = dini_Float(file, "HouseY");
	HouseZ = dini_Float(file, "HouseZ");
	SetPlayerPos(playerid,HouseX,HouseY,HouseZ);
	return 1;
}
Reply


Messages In This Thread
House command help - by Tommeh - 13.08.2014, 02:07
Re: House command help - by Tommeh - 13.08.2014, 07:48
Re: House command help - by MacT - 13.08.2014, 08:12
Re: House command help - by Tommeh - 13.08.2014, 08:31
Re: House command help - by MacT - 13.08.2014, 08:40
Re: House command help - by Tommeh - 13.08.2014, 08:46
Re: House command help - by Don_Cage - 13.08.2014, 11:45
Re: House command help - by Tommeh - 13.08.2014, 19:09

Forum Jump:


Users browsing this thread: 2 Guest(s)