How to use "DestroyVehicle" whitout player in vehicle?
#21

Quote:
Originally Posted by ShihabSoft
View Post
What if the command the user entered is just of 3 characters, just /fb, then the cmdtext[3] would crash, with an array index out of bounds exception. It's better to use sscanf for these purposes. NEVER TRUST USER INPUT.
Well pawn uses zero terminated strings, even if it doesn't you should know that array parameter are simple addresses without any knowledge of the size, therefore there is no out of bound check!

Quote:
Originally Posted by tekass
View Post
I put the command in another GM and it works however i am forced to put the id car for the destroy and i want for something that would allow me to detroy the vehicle at the same time as i close the crusher. If is possible

Again tanks for your help +1 for you
Just call DestroyVehicle with the correct vehicleid if the crusher closes, therefor you need to check if a vehicle is close to the crusher
Loop through all vehicles and check with GetVehicleDistanceFromPoint if they are near the crusher and delete them
Reply


Messages In This Thread
How to use "DestroyVehicle" whitout player in vehicle? - by tekass - 31.05.2017, 18:01
Re: How to use "DestroyVehicle" whitout player in vehicle? - by JasonRiggs - 31.05.2017, 18:08
Re: How to use "DestroyVehicle" whitout player in vehicle? - by skuller12 - 31.05.2017, 18:16
Re: How to use "DestroyVehicle" whitout player in vehicle? - by JasonRiggs - 31.05.2017, 18:17
Re: How to use "DestroyVehicle" whitout player in vehicle? - by skuller12 - 31.05.2017, 18:20
Re: How to use "DestroyVehicle" whitout player in vehicle? - by JasonRiggs - 31.05.2017, 18:23
Re: How to use "DestroyVehicle" whitout player in vehicle? - by JasonRiggs - 31.05.2017, 18:25
Re: How to use "DestroyVehicle" whitout player in vehicle? - by tekass - 31.05.2017, 19:46
Re: How to use "DestroyVehicle" whitout player in vehicle? - by tekass - 31.05.2017, 20:17
Re: How to use "DestroyVehicle" whitout player in vehicle? - by Whatname - 31.05.2017, 20:38
Re: How to use "DestroyVehicle" whitout player in vehicle? - by tekass - 31.05.2017, 20:59
Re: How to use "DestroyVehicle" whitout player in vehicle? - by Whatname - 31.05.2017, 21:11
Re: How to use "DestroyVehicle" whitout player in vehicle? - by tekass - 31.05.2017, 21:13
Re: How to use "DestroyVehicle" whitout player in vehicle? - by tekass - 31.05.2017, 21:33
Re: How to use "DestroyVehicle" whitout player in vehicle? - by Nero_3D - 31.05.2017, 21:55
Re: How to use "DestroyVehicle" whitout player in vehicle? - by tekass - 31.05.2017, 22:47
Re: How to use "DestroyVehicle" whitout player in vehicle? - by Nero_3D - 31.05.2017, 23:25
Re: How to use "DestroyVehicle" whitout player in vehicle? - by ShihabSoft - 01.06.2017, 00:00
Re: How to use "DestroyVehicle" whitout player in vehicle? - by tekass - 01.06.2017, 01:03
Re: How to use "DestroyVehicle" whitout player in vehicle? - by skuller12 - 01.06.2017, 05:23
Re: How to use "DestroyVehicle" whitout player in vehicle? - by Nero_3D - 01.06.2017, 21:17
Re: How to use "DestroyVehicle" whitout player in vehicle? - by JuzDoiT - 02.06.2017, 20:46
Re: How to use "DestroyVehicle" whitout player in vehicle? - by tekass - 02.06.2017, 21:59
Re: How to use "DestroyVehicle" whitout player in vehicle? - by tekass - 06.06.2017, 01:58

Forum Jump:


Users browsing this thread: 1 Guest(s)