SA-MP Forums Archive
/knock - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: /knock (/showthread.php?tid=72990)



/knock - Qeux - 12.04.2009

I'm having trouble with this when i compile it's fine but in game it doesn't work

by the way it's just a /knock command basically you stand at the house marker and do /knock then it sends the house owner a message saying someone is at your front door

Код:
	if(strcmp(cmd, "/knock", true) == 0)
	{
	  if(IsPlayerConnected(playerid))
		{
			for(new i = 0; i < sizeof(HouseInfo); i++)
			{
				if (PlayerToPoint(6, playerid,HouseInfo[i][hEntrancex], HouseInfo[i][hEntrancey], HouseInfo[i][hEntrancez]))
				{
				  SendClientMessage(HouseInfo[i][hOwner], COLOR_GREY, "Ding Dong someone is at your front door");
				}
        else
				{
		  		SendClientMessage(playerid, COLOR_GREY, "You are not at a house!");
					return 0;
				}
			}
		}
	}