Beagle[NL] Posted December 28, 2009 Share Posted December 28, 2009 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
Buffalo Posted December 28, 2009 Share Posted December 28, 2009 You shouldn't use the peds in teams. Do some workaround, as if you only need to stop damage for peds in certain teams e.g. set their and other team members element data and cancel damage event client side if data matches. Link to comment
Beagle[NL] Posted December 28, 2009 Author Share Posted December 28, 2009 I really don't understand what you are saying. What has changing element data to do with impersonating players in a team? 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 Link to comment
Buffalo Posted December 28, 2009 Share Posted December 28, 2009 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
50p Posted December 29, 2009 Share Posted December 29, 2009 ...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 Link to comment
Beagle[NL] Posted December 29, 2009 Author Share Posted December 29, 2009 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
50p Posted December 29, 2009 Share Posted December 29, 2009 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
Beagle[NL] Posted December 29, 2009 Author Share Posted December 29, 2009 Okay, thank you 50p. I will keep it in mind . Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now