03.11.2013, 17:57
Yeah.. I don't know. It doesn't work, and I don't know why.
pawn Код:
public OnPlayerEnterDynamicCP(playerid, checkpointid)
{
new string[128];
for(new c = 0; c < sizeof(Houses); c++)
{
if (PlayerToPoint(1.4,playerid,Houses[c][EnterX], Houses[c][EnterY], Houses[c][EnterZ]))
{
if(Houses[c][Owned] == 0)
{
SendClientMessage(playerid, COLOR_GREEN, "Would you like to buy this?");
format(string, sizeof(string), "Price: $%d", Houses[c][HousePrice]);
SendClientMessage(playerid, COLOR_GREEN, string);
SendClientMessage(playerid, COLOR_WHITE, "Available commands: /enter, /ds(hout)");
SendClientMessage(playerid, COLOR_WHITE, "/buyhouse");
}
if(Houses[c][Rentable] == 1)
{
new string2[128];
format(string, sizeof(string), "[Address: %d] You're standing on %s's porch.",c,Houses[c][Owner]);
SendClientMessage(playerid, COLOR_GREEN, string);
format(string2, sizeof(string2), "Available commands: /enter, /ds(hout), /rentroom (Price: $%d)", Houses[c][RentCost]);
SendClientMessage(playerid, COLOR_WHITE, string2);
}
format(string, sizeof(string), "[Address: %d] You're standing on %s's porch.",c,Houses[c][Owner]);
SendClientMessage(playerid, COLOR_GREEN, string);
SendClientMessage(playerid, COLOR_WHITE, "Available commands: /enter, /ds(hout)");
}
}
}
return 1;
}