Allright, check this code:
pawn Код:
new str[256],pName[32];
GetPlayerName(playerid,pName,32);
for(new i=0; i < sizeof(PropVar); i++)
{
if(strcmp(PropVar[i][POwner],pName) != -1)
{
GivePlayerMoney(playerid, PropVar[i][PPrice]/2);
format(PropVar[i][POwner], 24, "None");
PropVar[i][PoID] = -1;
format(str, 256, "{FF0000}%s\n{FFFF00}Owner: {FFFFFF}%s\n{FFFF00}Price: {FFFFFF}%d$\n{FFFF00}Earning: {FFFFFF}%d$", PropVar[i][PName], PropVar[i][POwner], PropVar[i][PPrice], PropVar[i][PEarn]);
Update3DTextLabelText(Pt[i], 0xFFFFFFAA, str);
CurrentP[playerid] = 0;
HProps[playerid]--;
}
}
It loops trough the houses existing in the server, and if the player who's leaving is the owner, the prop is cleared.
Be sure to remove the old code I gave you, and put this in under OnPlayerDisconnect.
Since I don't really get where you save the total properties created, I used the max variable of another for loop I found in it.
Be sure to remove the old OnPlayerDisconnect code from my other post