[HELP]SendClientMessage not working properly
#1

Ok well i just puted in a streamer in my gamemode so i can stream checkpoints,well the checkpoints are working perfectly.But then i edited OnPlayerEnterDynamicCP so that if a person enters a checkpoint of a house that the house is not own it is supposed to say "This house is for sale"Well that works,But i also made it if a person enter a checkpoint of the house owned it will say "House is owned by %s" Well that doesn't work it says the same thing "House is for sale" even though the house is owned how can i fix it.heres my code:
Код:
public LoadPickups()
{
	pickuptoggle = 1;
	new string[128];


for(new h = 0; h < sizeof(HouseInfo); h++)
	{
 	if(HouseInfo[h][hOwned] == 0)
		{


			 	Houses = CreateDynamicCP(HouseInfo[h][hEnterX], HouseInfo[h][hEnterY], HouseInfo[h][hEnterZ], 2.2000, -1, -1, -1, 25);

		}
		if(HouseInfo[h][hOwned] == 1)
		{


			HousesOwned = CreateDynamicCP(HouseInfo[h][hEnterX], HouseInfo[h][hEnterY], HouseInfo[h][hEnterZ],2.2000, -1, -1, -1, 25);
		}
	}
}
public OnPlayerEnterDynamicCP(playerid, checkpointid) //there should be no ; at the end, this is a callback
{
new Bool:bHouseO[MAX_PLAYERS] = 1;
new string[256];
for(new h = 0; h < sizeof(HouseInfo); h++)
	{


	if(bHouseO[playerid] == 1)
	{
		if(HouseInfo[h][hOwned] == 0)
		{
if(checkpointid = Houses)
	{
		SendClientMessage(playerid, COLOR_GREEN, "Would you like to buy this house?");
		SendClientMessage(playerid, COLOR_GREEN, "Price show in the text");
		SendClientMessage(playerid, COLOR_WHITE, "Avilable Commands:/enter,(/buyhouse)");
bHouseO[playerid] = 0;
	}

else if(bHouseO[playerid] == 1)
	{
if(HouseInfo[h][hOwned] == 0)
		{
	if(checkpointid = HousesOwned)
	{
	format(string, sizeof(string),"House is owned by %s",HouseInfo[h][hOwner]);
	SendClientMessage(playerid,COLOR_WHITE,string);
	bHouseO[playerid] = 0;

}
}
}
}
}
}
	return 1;
}

Please help thanks
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 3 Guest(s)