Jump to content

Create ped in team


Beagle[NL]

Recommended Posts

Hi,

I need to test certain functions I wrote, but some things can only be done when I for example kill a member of the opposite team. I tried spawning peds, but you can't assign them to a team. Bit dumb I tried this, but creating the player double isn't possible too. Does anybody know a way to get a ped in a team? I believe the Slothbot doesn't do this, and maybe there is already a resource for that I didn't saw.. Could anybody help me? Thanks :)

Link to comment

I mean you can't actually set ped's team, so you need to find other way. What i offer to you is setting players, that are in team A, element data to 1, then setting peds, that you want them to be in same team, data to 1 too. Then onClientPedDamage check if data is same and if it is, cancelEvent. That only example of how to stop damage if ped is in your team. If you want that peds would be showed in scoreboard like they are in your team, you must script scoreboard resource to do so. Or just tell why you want peds to be in teams, i can't think of any other reason you want to do so.

Link to comment
...

Or just tell why you want peds to be in teams, i can't think of any other reason you want to do so.

...

I need something where I can test functions on, in a team (it has to do with health and stuff). Or I'm understanding you wrong :roll:

Link to comment

Yes, I don't need to set a ped in the scoreboard, neither does it has to have the attributes of a player in the sentence of friendly fire. Ok, it's clear now that it's not possible to put a ped in a team. But how do other people test their own servers without having the need to have players in the server to test it on? Maybe there is then only one way, and that is put it online and test it with other people :(.

Link to comment
Yes, I don't need to set a ped in the scoreboard, neither does it has to have the attributes of a player in the sentence of friendly fire. Ok, it's clear now that it's not possible to put a ped in a team. But how do other people test their own servers without having the need to have players in the server to test it on? Maybe there is then only one way, and that is put it online and test it with other people :(.

The way I test it is testing it on myself. It's not always possible to test script on yourself (e.g. shooting at yourself). Try to script, don't test and see what comes up after a more than 1 thing that you changed. I usually don't test script until I finish 1 or 2 features. Also, I script it to be able to test on myself (e.g. sending messages to myself).

If you want to test it with someone, invite him to join your server or upload your script on your dedicated server. I've never tested any script using peds.

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