Suggestions how to do this and work with NPCs
#1

Hi, guys well today i came up with an idea that i would want to interpret in my server, but i have a hard time visualizing on how to do it. Here what i would like to do: I would like to, be able to go into a checkpoint holding a box, then to be frozen and an NPC would spawn, come by the checkpoint, grab the box and leave, shortly after disappearing. I am having a hard time with the NPC part, because i am not familiar with them. I know i could record an NPC and spawn it when in checkpoint, but how could i make it grab the box? And then after it grabbing the box, i could make it disappear when the recording stops. Any suggestions on how to do this? Thank you.
Reply
#2

https://sampwiki.blast.hk/wiki/ApplyAnimation - This works with NPCs, and you would probably want to use timers to get the NPC to walk, then apply the animation, attach object and leave.

Also, ApplyAnimation(player, "MISC", "pickup_box", 4, 0, 0, 0, 0) is an animation to pickup a box.

Cant do much if you dont have any code to show, but I hope this helps
Reply
#3

Thanks it definitely helps. I was also looking at this plugin: https://sampforum.blast.hk/showthread.php?tid=428066. I found out that it is not possible to make recorded NPCs do animations. Is this true? and what do you think about using the plugin? And if i needed these NPC for many different houses(want them to pickup the mail, that players would drive to houses.) would i need to keep on disconnecting and reconnecting them?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)