News: Welcome back to Bullworth! If you haven't already, you will need to reset your password..


Author Topic: Lua Help Spawning Peds At Locations  (Read 2122 times)

0 Members and 1 Guest are viewing this topic.

Offline Masterreys100

  • Youtube.com/Masterreys100
  • Full Member
  • ***
  • Posts: 103
  • Gender: Male
    • View Profile
Lua Help Spawning Peds At Locations
« on: October 26, 2014, 05:07:04 PM »
I Need Help Spawning Peds At Locations

Offline Mick3Mouse

  • Obam3mouse
  • Bullworth Junkie
  • ****
  • Posts: 4,343
  • Gender: Male
  • Major Mick3Mouse Algie Hunter
    • View Profile
    • My youtube
Re: Lua Help Spawning Peds At Locations
« Reply #1 on: October 26, 2014, 05:10:34 PM »
I would like you to take a look at this tutorial:
http://www.bully-board.com/index.php?topic=18725.0

It shows very clear how to spawn peds.


PedCreateXYZ(ID, X,Y,Z) -
This command will create a ped where that you tell it to. Replace the ID with the number ID of the character you want to spawn. For example : PedCreateXYZ(33, X,Y,Z)
This will spawn Bif. Also make sure you write the local coords you have setted or the actuall coords in it :PedCreateXYZ(33, l_1_0, l_1_1, l_1_2)
I recommend that you will write first under the MissionSetup = Function() this : local Bif = Nil and then when you want to spawn him write it like this :
Bif = PedCreateXYZ(33, l_1_0, l_1_1, l_1_2)

(Copyed from c00l's tutorial)


You can use Supermod or mad's cord grabber to get the location where you want to spawn them. 

Offline c00ld0c26

  • The D0c
  • Can't Get Enough
  • *****
  • Posts: 5,137
  • Gender: Male
  • Just a dood doing dood things.
    • View Profile
    • My channel.
Re: Lua Help Spawning Peds At Locations
« Reply #2 on: October 27, 2014, 01:58:45 AM »
My tutorial really needs some fixes at certain places to make it more noob friendly, and Mick just found one of those.
Anyway, the l_1_0 and the rest can be replaced with any number, and you get those numbers from the coord grabber by MadmaN.

Offline Ky

  • Full Member
  • ***
  • Posts: 329
  • Gender: Male
  • <3
    • View Profile
Re: Lua Help Spawning Peds At Locations
« Reply #3 on: November 14, 2014, 06:53:21 AM »
You use the command PedCreateXYZ .