SA-MP Forums Archive
how to make a car loose health even if there is no one inside? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: how to make a car loose health even if there is no one inside? (/showthread.php?tid=184744)



how to make a car loose health even if there is no one inside? - Shehab1337 - 21.10.2010

Hello samp scripters

I am making a roleplay gamemode and I saw in another server that when I shoot on empty car, the car looses health.

I thought about it, so it's either with a function, or I will have to script that when the player is facing the angle then when the player has a weapon in his hand, then when the player presses key primary fire, the car looses health then I have to script it for each different weapon because each weapon do different damage...

Ofcourse not! ofcourse they did it with an easy way, either a function that you can toggle or something easier that what I said above cus that will be a pain in the ass and it will still be buggy!

So anyone have any idea how to make a car loose health when there is no driver in it?

Thanks.


Re: how to make a car loose health even if there is no one inside? - Jeffry - 21.10.2010

Use: https://sampforum.blast.hk/showthread.php?tid=140765
And: https://sampwiki.blast.hk/wiki/SetVehicleHealth

Need the done code too?


Re: how to make a car loose health even if there is no one inside? - Shehab1337 - 21.10.2010

well I know that I can do it that way, and then assign every weapon to decrease the vehicle health by whatever percent but I am sure that there is an easier way to do it since in this server am talking about even if you hit the car with your punching and kicking it will still loose health and I am sure they didnt do it that way.


Re: how to make a car loose health even if there is no one inside? - Jeffry - 21.10.2010

I don't know any function that would do this. The coder of this server must've made it like this, or at least, similar to this.
And I guess, that with some investigation of time, it would be possible to make it. Take the time, thats my advice.


Re: how to make a car loose health even if there is no one inside? - Shehab1337 - 22.10.2010

Ok thank you very much for your help, but if anyone else knows another way to do it please tell me.


Re: how to make a car loose health even if there is no one inside? - Grim_ - 22.10.2010

There is no other way to do it, sorry.

Off-topic: Are you shehab from *******, that posted the beginner scripting tutorials a long time back?


Re: how to make a car loose health even if there is no one inside? - Shehab1337 - 22.10.2010

Thanks Grim and yes it's me but I didnt continue, I didn't feal like am a guy who can give scripting tutorials


Re: how to make a car loose health even if there is no one inside? - HrvojeCro - 22.10.2010

Quote:
Originally Posted by Shehab1337
Посмотреть сообщение
Thanks Grim and yes it's me but I didnt continue, I didn't feal like am a guy who can give scripting tutorials
i learned basics 2 weeks ago from you youre great man keep it up with advanced lession, ill need it...
still i figured out more things by myself and lest say that im not beginner but still dont know advanced stuff...


Re: how to make a car loose health even if there is no one inside? - Shehab1337 - 22.10.2010

I know dude and thanks but I am really sorry since I am working now on a roleplay project and I don't have the time to make the videos anymore.


Re: how to make a car loose health even if there is no one inside? - HrvojeCro - 22.10.2010

Quote:
Originally Posted by Shehab1337
Посмотреть сообщение
I know dude and thanks but I am really sorry since I am working now on a roleplay project and I don't have the time to make the videos anymore.
videos are how much 8mins long?
but.. whateva