Help!
#4

Код:
if(strcmp(cmdtext, "/lockhouse", true) == 0)
{
	for(new i = 0; i <sizeof(HouseInfo); i++)
	{
		if(IsPlayerInRangeOfPoint(playerid, 1.0, HouseInfo[i][HouseExitX], HouseInfo[i][HouseExitY], HouseInfo[i][HouseExitZ]) || IsPlayerInRangeOfPoint(playerid, 1.0, HouseInfo[i][HouseEnterX], HouseInfo[i][HouseEnterY], HouseInfo[i][HouseEnterZ]))
		{
			new name[MAX_PLAYER_ANME];
			GetPlayerName(playerid, name, sizeof(name));
			if(strcmp(HouseInfo[i][HouseOwnerName], name, true) == 0)
			{
				if(HouseInfo[i][HouseLocked] == 0)
				{
					HouseInfo[i][HouseLocked] = 1;
					SendClientMessage(playerid, COLOR_LIGHTBLUE, "SERVER: {FFFFFF}Къщата вече е заключена за посетители!");
				}
				else
				{
					HouseInfo[i][HouseLocked] = 0;
					SendClientMessage(playerid, COLOR_LIGHTBLUE, "SERVER: {FFFFFF}Къщата вече е отключена за посетители!");
				}
                                return 1;
			}
			else 
                        {
                              SendClientMessage(playerid, COLOR_GREY, "Трябва да сте собственик на къщата!");
                              return 1;
                        }
		}
	}
	return 1;
}
Reply


Messages In This Thread
Help! - by martintasin - 07.08.2016, 17:08
Re: Help! - by Mencent - 07.08.2016, 17:23
Re: Help! - by martintasin - 07.08.2016, 17:34
Re: Help! - by Lucky13 - 07.08.2016, 17:36
Re: Help! - by martintasin - 07.08.2016, 17:58
Re: Help! - by Lucky13 - 07.08.2016, 18:02
Re: Help! - by martintasin - 07.08.2016, 18:07
Re: Help! - by Konstantinos - 07.08.2016, 18:08
Re: Help! - by martintasin - 07.08.2016, 18:15
Re: Help! - by Mencent - 07.08.2016, 18:18

Forum Jump:


Users browsing this thread: 1 Guest(s)