texeon Posted December 8, 2010 Share Posted December 8, 2010 Okay so basically I am trying to spawn dead peds, its working, and I'm spawning the dead cops, multiple to be exact, but when it comes to actually defining multiple different peds, it doesn't work, i'm following a little tut, and basically its still not helping, tell me what I am doing wrong plz. Model.Load(#COP) 009A: [email protected] = create_actor_pedtype 1 model #COP at 1128.688 -698.6875 14.1875 0223: [email protected] = set_actor $COP health_to 0 0332: [email protected] = set_actor $COP bleeding_to 1 Actor.Angle([email protected]) = 450.0 0249: release_model #COP Model.Load(#SWAT) 009A: [email protected] = create_actor_pedtype 2 model #SWAT at 1131.688 -700.6875 14.1875 0223: [email protected] = set_actor $SWAT health_to 0 0332: [email protected] = set_actor $SWAT bleeding_to 1 Actor.Angle([email protected]) = 147.0 0249: release_model #SWAT Model.Load(#SWAT) 009A: [email protected] = create_actor_pedtype 2 model #SWAT at 1125.688 -692.6875 14.1875 0223: [email protected] = set_actor $SWAT health_to 0 0332: [email protected] = set_actor $SWAT bleeding_to 1 Actor.Angle([email protected]) = 724.0 0249: release_model #SWAT Model.Load(#SWAT) 009A: [email protected] = create_actor_pedtype 2 model #SWAT at 1122.688 -693.6875 14.1875 0223: [email protected] = set_actor $SWAT health_to 0 0332: [email protected] = set_actor $SWAT bleeding_to 1 Actor.Angle([email protected]) = 162.0 0249: release_model #SWAT Model.Load(#FBI) 009A: [email protected] = create_actor_pedtype 3 model #FBI at 11223.688 -687.6875 14.1875 0223: [email protected] = set_actor $FBI health_to 0 0332: [email protected] = set_actor $FBI bleeding_to 1 Actor.Angle([email protected]) = 538.0 0249: release_model #FBI Model.Load(#SWAT) 009A: [email protected] = create_actor_pedtype 2 model #SWAT at 1138.688 -694.6875 14.1875 0223: [email protected] = set_actor $SWAT health_to 0 0332: [email protected] = set_actor $SWAT bleeding_to 1 Actor.Angle([email protected]) = 396.0 0249: release_model #COP 009A: [email protected] = create_actor_pedtype 1 model #COP at 1129.688 -691.6875 14.1875 0223: [email protected] = set_actor $COP health_to 0 0332: [email protected] = set_actor $COP bleeding_to 1 Actor.Angle([email protected]) = 869.0 0249: release_model #COP also I encased it into a thread afterwards so it looks like this: create_thread @deadpedspawn (initialising the thread before hand) :deadpedspawn code goes here end_thread I've tried changing the variables: $SWAT1, $SWAT2 so on. I've also found that the more correct I am with the syntax the better the game loads, usually I get straight to the menu in less than a quarter of a second from the main logo screen if it is correct. Please help Link to comment Share on other sites More sharing options...
yair1221 Posted December 8, 2010 Share Posted December 8, 2010 a.use CODE button above...........about here^ well, at least when you write a post b.make all the pedtypes 4(i dont think its necessary, but i think its better than 1 = player) c.stop releasing all the models after every ped put the release model in the end of it d. 0223: [email protected] = set_actor $COP health_to 00332: [email protected] = set_actor $COP bleeding_to 1 you used the wrong variables e.you also used the wrong syntax, same context as above Model.Load(#SWAT)009A: [email protected] = create_actor_pedtype 2 model #SWAT at 1138.688 -694.6875 14.18750223: [email protected] = set_actor $SWAT health_to 00332: [email protected] = set_actor $SWAT bleeding_to 1Actor.Angle([email protected]) = 396.00249: release_model #COP here you released the cop model instead of swat and in the next part 009A: [email protected] = create_actor_pedtype 1 model #COP at 1129.688 -691.6875 14.18750223: [email protected] = set_actor $COP health_to 00332: [email protected] = set_actor $COP bleeding_to 1Actor.Angle([email protected]) = 869.00249: release_model #COP you didnt even load the model overview: the script should be like this: :deadpedspawnthread 'deadpeds'wait 0Model.Load(#COP)Model.Load(#SWAT)Model.Load(#FBI)if andmodel.available(#COP)model.available(#SWAT)model.available(#FBI)jf @deadpedspawn009A: [email protected] = create_actor_pedtype 4 model #COP at 1128.688 -698.6875 14.18750223: set_actor [email protected] health_to 00332: set_actor [email protected] bleeding_to 1Actor.Angle([email protected]) = 450.0009A: [email protected] = create_actor_pedtype 4 model #SWAT at 1131.688 -700.6875 14.18750223: set_actor [email protected] health_to 00332: set_actor [email protected] bleeding_to 1Actor.Angle([email protected]) = 147.0009A: [email protected] = create_actor_pedtype 4 model #SWAT at 1125.688 -692.6875 14.18750223: set_actor [email protected] health_to 00332: set_actor [email protected] bleeding_to 1Actor.Angle([email protected]) = 724.0009A: [email protected] = create_actor_pedtype 4 model #SWAT at 1122.688 -693.6875 14.18750223: set_actor [email protected] health_to 00332: set_actor [email protected] bleeding_to 1Actor.Angle([email protected]) = 162.0009A: [email protected] = create_actor_pedtype 4 model #FBI at 11223.688 -687.6875 14.18750223: set_actor [email protected] health_to 00332: set_actor [email protected] bleeding_to 1Actor.Angle([email protected]) = 538.0009A: [email protected] = create_actor_pedtype 4 model #SWAT at 1138.688 -694.6875 14.18750223: set_actor [email protected] health_to 00332: set_actor [email protected] bleeding_to 1Actor.Angle([email protected]) = 396.0009A: [email protected] = create_actor_pedtype 4 model #COP at 1129.688 -691.6875 14.18750223: set_actor [email protected] health_to 00332: set_actor [email protected] bleeding_to 1Actor.Angle([email protected]) = 869.00249: release_model #COP0249: release_model #SWAT0249: release_model #FBI Link to comment Share on other sites More sharing options...
texeon Posted December 8, 2010 Author Share Posted December 8, 2010 (edited) Thank you for your help, but just realize that I did start coding this morning, so I liked how you helped but the criticism didn't seem constructive rather instead it felt you were on the verge of biting my head off. Lol, sorry but in the end the code didn't work, it was close, as it loaded fast, but I got an exception. this is what worked for me: :deadped thread 'deadped' wait 0 Model.Load(#COP) Model.Load(#SWAT) Model.Load(#FBI) if and model.available(#COP) model.available(#SWAT) model.available(#FBI) jf @deadped 009A: [email protected] = create_actor_pedtype >>> 4 <<< model #COP at 1128.688 -698.6875 14.1875 0223: set_actor [email protected] health_to 0 0332: set_actor [email protected] bleeding_to 1 Actor.Angle([email protected]) = 450.0 009A: [email protected] = create_actor_pedtype >>> 4 <<< model #SWAT at 1131.688 -700.6875 14.1875 0223: set_actor [email protected] health_to 0 0332: set_actor [email protected] bleeding_to 1 Actor.Angle([email protected]) = 147.0 009A: [email protected] = create_actor_pedtype >>> 4 <<< model #SWAT at 1125.688 -692.6875 14.1875 0223: set_actor [email protected] health_to 0 0332: set_actor [email protected] bleeding_to 1 Actor.Angle([email protected]) = 724.0 009A: [email protected] = create_actor_pedtype >>> 4 <<< model #SWAT at 1122.688 -693.6875 14.1875 0223: set_actor [email protected] health_to 0 0332: set_actor [email protected] bleeding_to 1 Actor.Angle([email protected]) = 162.0 009A: [email protected] = create_actor_pedtype >>> 4 <<< model #FBI at 11223.688 -687.6875 14.1875 0223: set_actor [email protected] health_to 0 0332: set_actor [email protected] bleeding_to 1 Actor.Angle([email protected]) = 538.0 009A: >>>>>>>>>>> 3 <<<<<<<<< @ = create_actor_pedtype 2 model #SWAT at 1138.688 -694.6875 14.1875 0223: set_actor >>>>>>>>>>>> [email protected] <<<<<<<<<<<<<<<<<<, health_to 0 0332: set_actor >>>>>>>>>>>>>> [email protected] <<<<<<<<<<<<<<<<<<<<<< bleeding_to 1 Actor.Angle([email protected]) = 396.0 009A: [email protected] = create_actor_pedtype 1 model #COP at 1129.688 -691.6875 14.1875 0223: set_actor [email protected] health_to 0 0332: set_actor [email protected] bleeding_to 1 Actor.Angle([email protected]) = 869.0 0249: release_model #COP 0249: release_model #SWAT 0249: release_model #FBI Thanks again, because now it is working! Edited December 8, 2010 by texeon Link to comment Share on other sites More sharing options...
yair1221 Posted December 8, 2010 Share Posted December 8, 2010 dont worry, i dont like to bite ppl's head off mainly because everyone on GTAF would like to bite MY head off anyway. again, use the "CODE" button above, it makes it easier to read your script glad i could help, even though my script didnt work, what was the problem with it? and how is it working with that? 009A: >>>>>>>>>>> 3 <<<<<<<<< @ = create_actor_pedtype 2 model #SWAT at if you used [email protected], then local variable [email protected] doesnt exist which would cause a crash because of that 0223: set_actor >>>>>>>>>>>> [email protected] <<<<<<<<<<<<<<<<<<, health_to 00332: set_actor >>>>>>>>>>>>>> [email protected] <<<<<<<<<<<<<<<<<<<<<< bleeding_to 1Actor.Angle([email protected]) = 396.0 well, whatever , its working, thats all that matters...isnt it? Link to comment Share on other sites More sharing options...
texeon Posted December 8, 2010 Author Share Posted December 8, 2010 thank you again, and soz I seemed like an asshole after my edit, the code with the >>>>>>> was to signify the problem, one reason why it didn't work is with the identifiers, like: [email protected], [email protected] so on, you had a [email protected] in the [email protected] column and it chucked a mental, next all the models had been specified as cops, as this actually still worked, i think to prevent issues I change it so it was for the correct model, but hey, who gives a sh*t. Also yes I need to start using the code box, helps people to understand. You did a great and quick job, so it is easy to overlook, I even overlooked the identifier error and the model specifying. Maybe when I get better (quickly) we could work together. Thanks! Link to comment Share on other sites More sharing options...
yair1221 Posted December 8, 2010 Share Posted December 8, 2010 oh, yeah, sorry, i overlooked it at the original code... well, good luck, glad i could help(not really...) Link to comment Share on other sites More sharing options...
BnB Posted December 9, 2010 Share Posted December 9, 2010 (edited) Use code tag: [code][/code] Edited December 9, 2010 by BnB Link to comment Share on other sites More sharing options...
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