Is this command possible?
#1

Is this command possible? If i go near a car and a player is in it, and i type /break [id of player] and it says

"you have screwed up the players engine" and it starts to smoke and set on fire.


How do i do it?
Reply
#2

Yeah, it is.
Reply
#3

Quote:
Originally Posted by MenaceX^
Yeah, it is.
How do i do it?
Reply
#4

Get the closest vehicle and check distance, check if any player is in it, set vehicle's health under 240 and other things you want to do.
Reply
#5

Request it in Script Request Thread.
Reply
#6

Quote:
Originally Posted by Don Correlli
Get the closest vehicle and check distance, check if any player is in it, set vehicle's health under 240 and other things you want to do.
I understand how to do it now, but the problem is, how can i make it so it works for id's so it works on a certain id?
Reply
#7

Quote:
Originally Posted by killdahobo99
Quote:
Originally Posted by Don Correlli
Get the closest vehicle and check distance, check if any player is in it, set vehicle's health under 240 and other things you want to do.
I understand how to do it now, but the problem is, how can i make it so it works for id's so it works on a certain id?
Search around or ask in script request topic.
Reply
#8

Quote:
Originally Posted by Don Correlli
Quote:
Originally Posted by killdahobo99
Quote:
Originally Posted by Don Correlli
Get the closest vehicle and check distance, check if any player is in it, set vehicle's health under 240 and other things you want to do.
I understand how to do it now, but the problem is, how can i make it so it works for id's so it works on a certain id?
Search around or ask in script request topic.
I have searched around, and if you ask anything in the script request topic, it either doesnt get answered or it just gets bumped by many other questions by people.

This is a scripting discussion, i'm not asking for the full code, i'm asking how i could make it so it works according to id's.
Reply
#9

Like i said: search for GetClosestVehicle function (can be found in uf.inc), use IsPlayerInVehicle function with loop for all players to see if someone is in that vehicle and set vehicle's health so it will go on fire.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)