Jump to content

Destroy a pedestrian?


myonlake

Recommended Posts

Posted (edited)

Hello,

Is it possible to destroy a pedestrian? I will post my script if true.

Edited by myonlake

If I helped you, please click the like button on the right ;) Thanks!

Posted

By pedestrian you mean a ped that you created via createPed right? if so, then of course, use destroyElement.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

If I put a pedestrian in a XML file, and if I want to like, destroy it, does the script understand to destroy the pedestrian or does it just output me an error of invalid value in destroyElement?

If I helped you, please click the like button on the right ;) Thanks!

Posted

What do you mean by put a ped in a XML file? do you mean a value for then create it?

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

Well, I make a pedestrian with a command, it saves the following XML node in the file.

<pedestrians> 
 <ped id="1" /> 
</pedestrians 

Does the script understand the pedestrian that I just gave an ID. If I destroyElement it? Does it understand to delete it or will it output an error?

If I helped you, please click the like button on the right ;) Thanks!

Posted

The script will not do magic, you must have a function to load the peds from the XML, then you should create a table and store them by a index, or name.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

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...