22.03.2015, 13:48
Alright, the code below works but only for the first house. The checkpoint only appears for the first house in the script. Can someone tell me what I'm doing wrong?
pawn Код:
for(new h = 1; h < sizeof(HouseInfo); h++)
{
if(IsPlayerInRangeOfPoint(playerid, 10.0, HouseInfo[h][hEntranceX], HouseInfo[h][hEntranceY], HouseInfo[h][hEntranceZ]))
{
HouseInfo[h][HouseCP] = CreateDynamicCP(HouseInfo[h][hEntranceX], HouseInfo[h][hEntranceY], HouseInfo[h][hEntranceZ], 1.5, -1, -1, playerid, 5.0);
return 1;
}
else
{
DestroyDynamicCP(HouseInfo[h][HouseCP]);
return 1;
}
}