Jump to content

spawn event


Recommended Posts

_createPed = createPed -- save the function 
createPed = function(x,y,z,rot,syn) 
      if x and y and z then 
    local rot = rot or 0 
        local syn = syn or true 
        local  thePed = _createPed (x,y,z,rot,syn) -- now we'll call it 
      if thePed then 
     return  thePed 
    triggerEvent (thePed,"onPedSpawn",thePed) -- lets trigger it  
          end 
     end 
end 
  

Usage:

 _createPed (0,0,0) 
  

So your new event is "onPedSpawn" and the source of this event is the ped that was created.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...