how to make a car loose health even if there is no one inside?
#1

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.
Reply
#2

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

Need the done code too?
Reply
#3

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.
Reply
#4

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.
Reply
#5

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

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?
Reply
#7

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

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...
Reply
#9

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.
Reply
#10

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
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)