NPC w/ Animation
#1

Hello SA-MP Users.

I'm Creating my Advanced Gym System.

And Bassically i Want the Boxer Guy (in Red)
To Do the Animation of The Following Code Below
-
Код:
ApplyAnimation(playerid,"GYMNASIUM","GYMshadowbox",4.1,1,1,1,1,9500);
-

Now, I'm Wondering how i go About that,
I Had a Bit of Research but i Found if I Recorded it as the Boxer and Played the Animation the Boxer just Stands There.

Cheers,
Ricey.

PS: Sorry About my Capitals Habbit
Reply
#2

it would depend WHEN you want this to take place,

maybe using the IsPlayerInRangeOfPoint
and if they are then apply the animation at that time.
Reply
#3

Thankyou for Making no Sense.

But... I Think your on a Tottaly Diffrent Thing, I Want this to NPC's...
Read the Dam Post.

Cheers
Ricey.
Reply
#4

lol, I read the post... and clearly understood what you meant.

if no players are in range of the npc then
no one would see the Animation as it would play WHEN you use ApplyAnimation

so if you use ApplyAnimation WHEN a player is in range then the player would see it.


regards,
Reply
#5

pawn Код:
public onplayerupdate(playerid)
{
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i))
        {
            if(IsPlayerNPC(i)
            {
                new Float:X, Float:Y, Float:Z;
                GetPlayerPos(i, X, Y, Z);
                if(IsPlayerInRangeOfPoint(playerid, 5.0, X, Y, Z))
                {
                   ApplyAnimation(i,"GYMNASIUM","GYMshadowbox",4.1,1,1,1,1,9500);
                }
            }
        }
    }
    return 1;
}
Reply
#6

Quote:
Originally Posted by new121
Посмотреть сообщение
pawn Код:
public onplayerupdate(playerid)
{
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i))
        {
            if(IsPlayerNPC(i)
            {
                new Float:X, Float:Y, Float:Z;
                GetPlayerPos(i, X, Y, Z);
                if(IsPlayerInRangeOfPoint(playerid, 5.0, X, Y, Z))
                {
                   ApplyAnimation(i,"GYMNASIUM","GYMshadowbox",4.1,1,1,1,1,9500);
                }
            }
        }
    }
    return 1;
}
for loop inside onplayerupdate
not bad
Reply
#7

Quote:
Originally Posted by admantis
Посмотреть сообщение
for loop inside onplayerupdate
not bad
Ok??
Reply
#8

Thanks Alot new121,
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)