19.08.2010, 12:30
I had the same problem, I thought I fixed it this way:
May look a bit unorganized, but first get the house ID by doing a loop, when he's in the dynamic CP break that loop so you'll get result of 'h' being the house ID, work forward from that point.
pawn Код:
new h = -1;
for(h; h < MAX_HOUSES; h++)
{
if(IsPlayerInDynamicCP(playerid,CPID[h])) break;
}
if(h == -1) return SendClientMessage(playerid, -1, "You're not near a house!");
else
{
//Code if he is in a CP
}