26.10.2011, 08:46
good mornings all and nights. i need some help with this checkpoints it is fucked up i think is something about ranges, i have a house system with checkpoints always active but only shows when on range of 5.0 and a vehicle checkpoint with a range of 10.0 when the two are too close they switch each one sizes .
Who can help me solve this will get a rep point and thank you
pawn Код:
public OnPlayerEnterDynamicCP(playerid, checkpointid)
{
if(playerCKID[playerid] == checkpointid)
{
if(playerCK[playerid] == 1)
{
GameTextForPlayer(playerid, "You have found it!", 1000, 1);
DestroyDynamicCP(playerCKID[playerid]);
playerCK[playerid] = 0;
}
}
else if(GetPlayerState(playerid) == PLAYER_STATE_ONFOOT)
{
for(new e; e < MAX_HOUSES; e++)
{
if(checkpointid == housecp[e])
{
if(housedb[e][Owned] == 0)
{
SendClientMessage(playerid, COLOR_YELLOW2,"This house is for sale!");
}
else
{
new str[150];
format(str, sizeof(str),"You are standing on %s house.",housedb[e][Owner]);
SendClientMessage(playerid, COLOR_YELLOW2, str);
}
}
}
}
}