[Tutorial] How to create custom destroyable objects or objects which can get damaged <0.3z>
#21

Thanks.

NOTE : I've noticed that it's announced on the RC3 update version that sniper gets called on objects beyond the SA's area. I couldn't test that out as I'm not on my home these days, would be really good if someone confirms about it. If so, you could use this tutorial with sniping too.
Reply
#22

This looks amazing Lordz! Good work brother. I can make a shooting range with all the new callbacks of SA-MP 0.3z
Reply
#23

Love the causual "lol" at the end of video. I'm quite impressed with that stuff, only thing I'd suggest is using custom iterators (as optional dependency y_iterate, of course) (hooked to createobject/createplayerobject), so you don't have to loop through all objects - and only loop through already added ones.
Reply
#24

Quote:
Originally Posted by Ballu Miaa
View Post
This looks amazing Lordz! Good work brother. I can make a shooting range with all the new callbacks of SA-MP 0.3z
Thanks! Yep, shooting ranges are going to be great with this 0.3z's release. I'm just waiting for it to get released completely.

Quote:
Originally Posted by Misiur
View Post
Love the causual "lol" at the end of video. I'm quite impressed with that stuff, only thing I'd suggest is using custom iterators (as optional dependency y_iterate, of course) (hooked to createobject/createplayerobject), so you don't have to loop through all objects - and only loop through already added ones.
Sure, you can use it in case if you want to. Or else, you can even create custom arrays so to just loop that array in which the destroyable objects would be listed. Counting the numbers would also save the times to loop.
Reply
#25

Thanks man, great tutorial
Reply
#26

@Rube, thanks.

OT : I just noticed that Streamer has been updated to 0.3z version which supports an additional callback called "OnPlayerShootDynamicObject". I've updated the tutorial with Streamer related object but right now I'm not that free so I've just explained major things under Streamer related tutorial for damaging objects. More could be explained soon.
Reply
#27

Nicely presented and explained. also a good idea inb4 anyone else xD so good job!
Reply
#28

Very well written tutorial, good job.
Reply
#29

Quote:
Originally Posted by Niko_boy
View Post
Nicely presented and explained. also a good idea inb4 anyone else xD so good job!
Haha, not really but I was just too much interested in this. Thanks.

Quote:
Originally Posted by BigGroter
View Post
Very well written tutorial, good job.
Thanks.
Reply
#30

Great work Lordz, +rep.


EDIT: Need to spread some..
Reply
#31

watching the video reminded me of flood mod in garry's mod... lol

i wonder if anyone actually used function this in a meaningful way on a server yet.

Unfortunately is there no way to stop fist damage to certain objects? because when fitting with hands, OnPlayerWeaponShot doesnt seem to be called
Reply
#32

Quote:
Originally Posted by AssMunchingFool
View Post
watching the video reminded me of flood mod in garry's mod... lol

i wonder if anyone actually used function this in a meaningful way on a server yet.

Unfortunately is there no way to stop fist damage to certain objects? because when fitting with hands, OnPlayerWeaponShot doesnt seem to be called
Unfortunately, OnPlayerWeaponShot gets called for weapons which fires bullets only. To try the hits with melee weapons, you could try getting the animation and then check if it's closed to object by getting player's and object's position, facing angle and facing pos.
Reply
#33

Updated thread, clarified a few more things.
Reply
#34

Well explained but the script is very untidy, wouldn't recommend for a new scripter
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)