Yes, in housestats code i using playerid .
pawn Код:
stock GetHouseStats(playerid, hid)
{
new str2[256];
new string[256];
if(!strcmp(h2Info[hid][Renter],"ForRent",true))
{
//format(str2, sizeof(str2), "~w~This House Owned by ~r~ %s ~w~ Cost: ~r~ $%d ~w~ rent cost:~r~ $%i", h2Info[hid][Name], h2Info[hid][Cost], h2Info[hid][Rentcost]);
if(PlayerToPoint(4.0, playerid,h2Info[hid][iconx],h2Info[hid][icony],h2Info[hid][iconz]))
{
if(checkhouse[playerid] == 0)
{
SetPlayerCheckpoint(playerid, h2Info[hid][iconx], h2Info[hid][icony], h2Info[hid][iconz], 2);
format(string, sizeof(string), "You'r standing on %s's porch", h2Info[hid][Name]);
SendClientMessage(playerid, COLOR_LIGHTGREEN, string);
checkhouse[playerid] = 1;
}
}
else
{
if(checkhouse[playerid] == 1)
{
DisablePlayerCheckpoint(playerid);
checkhouse[playerid] = 0;
}
}
}
else if(!strcmp(h2Info[hid][Name],"ForSale",true))
{
//format(str2, sizeof(str2), "~w~This House For Sale", h2Info[hid][Name]);
if(PlayerToPoint(4.0, playerid,h2Info[hid][iconx],h2Info[hid][icony],h2Info[hid][iconz]))
{
if(checkhouse[playerid] == 0)
{
SetPlayerCheckpoint(playerid, h2Info[hid][iconx], h2Info[hid][icony], h2Info[hid][iconz], 2);
format(string, sizeof(string), "This House for sale, and cost $%d", h2Info[hid][Cost]);
SendClientMessage(playerid, COLOR_LIGHTGREEN, string);
checkhouse[playerid] = 1;
}
}
else
{
if(checkhouse[playerid] == 1)
{
DisablePlayerCheckpoint(playerid);
checkhouse[playerid] = 0;
}
}
}
else
{
//format(str2, sizeof(str2), "~w~This House Owned by ~r~ %s", h2Info[hid][Name]);
if(PlayerToPoint(4.0, playerid,h2Info[hid][iconx],h2Info[hid][icony],h2Info[hid][iconz]))
{
if(checkhouse[playerid] == 0)
{
SetPlayerCheckpoint(playerid, h2Info[hid][iconx], h2Info[hid][icony], h2Info[hid][iconz], 2);
format(string, sizeof(string), "This House for sale, and cost $%d", h2Info[hid][Cost]);
SendClientMessage(playerid, COLOR_LIGHTGREEN, string);
checkhouse[playerid] = 1;
}
}
else
{
if(checkhouse[playerid] == 1)
{
DisablePlayerCheckpoint(playerid);
checkhouse[playerid] = 0;
}
}
}
//GameTextForPlayer(playerid, str2, 5000, 3);
}