22.01.2014, 03:18
This simply doesn't work, I've been messing with it, but still doesn't work. I don't know why.
Any ideas?
pawn Код:
public OnPlayerEnterDynamicCP(playerid, checkpointid)
{
new string[128];
for(new h = 0; h < sizeof(Houses); c++)
{
if(checkpointid == Houses[h][PickupID])
{
if(Houses[h][Owned] == 0)
{
SendClientMessage(playerid, COLOR_GREEN, "Would you like to buy this?");
format(string, sizeof(string), "Price: $%d", Houses[h][HousePrice]);
SendClientMessage(playerid, COLOR_GREEN, string);
SendClientMessage(playerid, COLOR_WHITE, "Available commands: /enter, /ds(hout)");
SendClientMessage(playerid, COLOR_WHITE, "/buyhouse");
}
if(Houses[h][Rentable] == 1)
{
new string2[128];
format(string, sizeof(string), "[Address: %d] You're standing on %s's porch.",h,Houses[h][Owner]);
SendClientMessage(playerid, COLOR_GREEN, string);
format(string2, sizeof(string2), "Available commands: /enter, /ds(hout), /rentroom (Price: $%d)", Houses[h][RentCost]);
SendClientMessage(playerid, COLOR_WHITE, string2);
}
format(string, sizeof(string), "[Address: %d] You're standing on %s's porch.",h,Houses[h][Owner]);
SendClientMessage(playerid, COLOR_GREEN, string);
SendClientMessage(playerid, COLOR_WHITE, "Available commands: /enter, /ds(hout)");
}
}
}
return 1;
}
Any ideas?