24.02.2017, 17:46
I'm not sure if I understood that part of the code as I haven't went through all of it, but I'm giving it a guess:
.. must be replaced with:
I will soon give you a reply with a possible fix for the tag mismatch error.
EDIT: As it is a boolean, you cannot return an integer as value. Code must be replaced with;
PHP код:
s_DynamicActors[slot][e_iActorTimer] = SetTimerEx("UpdateActorStream", ACTOR_STREAM_TICK_RATE, true, "i", i);
PHP код:
s_DynamicActors[slot][e_iActorTimer] = SetTimerEx("UpdateActorStream", ACTOR_STREAM_TICK_RATE, true, "i", slot);
EDIT: As it is a boolean, you cannot return an integer as value. Code must be replaced with;
PHP код:
stock bool:IsDynamicActorInStreamRange(actorid, forplayerid)
{
if (!IsValidDynamicActor(actorid)) {
return false;
}
// Checks if the player is in range of the actor's position.
if (!IsPlayerInRangeOfPoint(forplayerid, MAX_ACTOR_STREAM_DISTANCE,
s_DynamicActors[actorid][e_fActorX],
s_DynamicActors[actorid][e_fActorY],
s_DynamicActors[actorid][e_fActorZ])) {
return false;
}
// An additional check for interiors and virtual worlds.
new
interior,
world;
interior = s_DynamicActors[actorid][e_iActorInterior];
world = s_DynamicActors[actorid][e_iActorWorld];
if (interior != -1 && GetPlayerInterior(forplayerid) != interior) {
return false;
}
if (world != -1 && GetPlayerVirtualWorld(forplayerid) != world) {
return false;
}
return true;
}