Unlimit actors
#6

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:

PHP код:
s_DynamicActors[slot][e_iActorTimer] = SetTimerEx("UpdateActorStream"ACTOR_STREAM_TICK_RATEtrue"i"i); 
.. must be replaced with:
PHP код:
s_DynamicActors[slot][e_iActorTimer] = SetTimerEx("UpdateActorStream"ACTOR_STREAM_TICK_RATEtrue"i"slot); 
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 код:
stock bool:IsDynamicActorInStreamRange(actoridforplayerid)
{
    if (!
IsValidDynamicActor(actorid)) {
        return 
false;
    }
    
// Checks if the player is in range of the actor's position.
    
if (!IsPlayerInRangeOfPoint(forplayeridMAX_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 != -&& GetPlayerInterior(forplayerid) != interior) {
        return 
false;
    }
    if (
world != -&& GetPlayerVirtualWorld(forplayerid) != world) {
        return 
false;
    }
    return 
true;

Reply


Messages In This Thread
Unlimit actors - by gmstrikker - 23.02.2017, 08:12
Re: Unlimit actors - by vital2k - 23.02.2017, 09:21
Re: Unlimit actors - by gmstrikker - 23.02.2017, 09:45
Re: Unlimit actors - by maikons - 24.02.2017, 09:05
Re: Unlimit actors - by luccagomes15 - 24.02.2017, 17:39
Re: Unlimit actors - by Private200 - 24.02.2017, 17:46
Re: Unlimit actors - by pedrotvr - 25.02.2017, 04:17
Re: Unlimit actors - by Private200 - 25.02.2017, 17:00
Re: Unlimit actors - by pedrotvr - 26.02.2017, 02:25
Re: Unlimit actors - by gmstrikker - 27.02.2017, 03:56

Forum Jump:


Users browsing this thread: 1 Guest(s)