Hello, I tried to search for solution on Google and didn't find anything good. So I will try ask here.
Well I am just starting to programming with Lua, but I have experience in other language so this is not the problem.
I need to spawn NPC random in any map random places and with timer.
If you want to see a good system, then here is some good code to learn from. You could learn a lot more if you read through some of the other systems in there, since as you said you're just starting out.
[URL="https://github.com/FPtje/DarkRP/blob/e56639aada64c93064e7e3a0d1c013c5ef59ea50/gamemode/modules/events/sv_zombie.lua"]DarkRP Zombie Spawning System[/URL]
The functions you'll what to read are the SpawnZombie and the retrieveRandomZombieSpawnPos functions.
If you want me to (try) explain them, feel free to ask.
You could create them based on the positions of NPC nodes, but the map would need nodes.
If someone could explain how to spawn at Npc nodes.
Sorry, you need to Log In to post a reply to this thread.