11.02.2018, 20:20
It seems to be a good suggestion, a pottus-like script named actor studio.
I read your code it looks robust. some new functions:
ANIM
doesnt exists in samp actor library, just for dynamic actors from incognito streamer. You already store these informations, let people get access to them.
reapply current animation with new loop status. good util.
TARGET AND TRIGGER ZONE
how it works internally : maybe creating a dynamic area linked to actor. type cylindric, max range 8.
no trigger zone when actor created.
if range 0.0, no trigger zone (destroy area if exists).
sound played at actor pos.
if playerpos > range of 20, no sound played.
duration: duration before stopsound (some soundid are looped)
samp-fixes.inc fixes two bugs for actor animations :
If you did fixe them yourself, check if samp-fixes is not defined to be sure to not apply same fixes twice.
Good work dude !
I read your code it looks robust. some new functions:
ANIM
Код:
GetActorAnimation(actorid, animlib[], animname[], maxanimlib = sizeof animlib, maxanimname = sizeof animname); GetActorAnimationEx(actorid, animlib[], animname[], &Float:fdelta, &loop, &lockx, &locky, &freeze, &time, maxanimlib = sizeof animlib, maxanimname = sizeof animname);
Код:
IsActorPlayingAnimation(actorid);
Код:
ToggleActorAnimationLoop(actorid, bool:status);
TARGET AND TRIGGER ZONE
Код:
OnPlayerStopTargetActor(playerid, actorid, weaponid); // #define DONT_DETECT_OPTA can be defined if you won't detect use any timer for OnPlayerTargetActor(playerid, actorid, weaponid); & OnPlayerStopTargetActor(playerid, actorid, weaponid);
Код:
SetActorArea(actorid, range=ACTOR_MAX_TRIGGER_AREA);
no trigger zone when actor created.
if range 0.0, no trigger zone (destroy area if exists).
Код:
GetActorAreaState(actorid, &bool:state); OnPlayerEnterActorArea(playerid, actorid); OnPlayerExitActorArea(playerid, actorid); PlayActorSoundForPlayer(actorid, soundid, duration=0.0);
if playerpos > range of 20, no sound played.
duration: duration before stopsound (some soundid are looped)
samp-fixes.inc fixes two bugs for actor animations :
Код:
ApplyActorAnimation : - Passing an invalid animation library in ApplyAnimation causes a client crash for streamed in players. FIX: Block ApplyActorAnimation when an invalid library is passed. -First time a library is used, it does nothing. FIX:Apply animations twice when first using a library.
Good work dude !