Jump to content

Call Car


Kimarik

Recommended Posts

Hi

 This Script is from jahangir13

Origina Script:

 

I don´t know if the script for using with masterkey works, i didn´t test it.

 but without masterkey it works fine

.

Script CallCar.sqf v0.1:

  Reveal hidden contents

ui_selectSlot.sqf:

  Reveal hidden contents

Copy that below the for loop or any right click options.

I don´t know if the Battle Eye Filter are the same for Epoch 1.0.6.1 because i don´t use any BE filters.

Link to comment
Share on other sites

  • 3 months later...

Hello i use your call car script. And my Player love this. But my Players have found a Bug/Dupe. You can call your car and can shoot the Driver inside the Vehicle. The Driver fall out and its dead. Now you can take the weapon from the Driver. You can do this again and again and again. Can anywhere fix this? Remove the gear from the druver or remove the body ???  Sorry for my bad english and thanks

Link to comment
Share on other sites

  On 8/29/2017 at 3:01 PM, Tweety060286 said:

Hello i use your call car script. And my Player love this. But my Players have found a Bug/Dupe. You can call your car and can shoot the Driver inside the Vehicle. The Driver fall out and its dead. Now you can take the weapon from the Driver. You can do this again and again and again. Can anywhere fix this? Remove the gear from the druver or remove the body ???  Sorry for my bad english and thanks

Expand  

Find this line

_vehDriver = _vehGroup createUnit [_driverModel, _vehTarget, [], 0,"LIEUTENANT"];

Place these lines below it

removeAllWeapons _vehDriver;
removeAllItems _vehDriver;

Let me know if that works.

Link to comment
Share on other sites

Ok, got this working but I have a couple of issues.

  1. This can be run on multiple vehicles from the same player at the same time. For example, if someone wanted to be malicious, they could buy a bunch of cheap vehicles, go to the opposite side of the map and call each car one right after the other.
  2. This can be run multiple times on the same vehicle which create a bunch of instances of it running that can bog down a server.

What do we have to do to limit these actions.

 

Link to comment
Share on other sites

  • 2 months later...

I'm trying to add vehicle selection menu for masterkey.
This is the callcar.sqf working in progress. I'll edit this when I found error I think it's ok now

  Reveal hidden contents

I also added  crew ejection before AI drive

Edited by Schalldampfer
completed
Link to comment
Share on other sites

Did anyone figure out a way to fix:

  Quote

Ok, got this working but I have a couple of issues.

  1. This can be run on multiple vehicles from the same player at the same time. For example, if someone wanted to be malicious, they could buy a bunch of cheap vehicles, go to the opposite side of the map and call each car one right after the other.
  2. This can be run multiple times on the same vehicle which create a bunch of instances of it running that can bog down a server.

What do we have to do to limit these actions.

Expand  

?

 

Also, I tested this inside a base and it was not moving but the script didn't end.

( !canMove _vehTarget )

this doesn't seem to be stopping the script

Link to comment
Share on other sites

 

  On 11/6/2017 at 7:40 AM, looter809 said:

Did anyone figure out a way to fix:

?

 

Also, I tested this inside a base and it was not moving but the script didn't end.

( !canMove _vehTarget )

this doesn't seem to be stopping the script

Expand  

This has always been an issue even in 1051. If there are player built walls up the AI will not be able to find a path very well. Ive suggested to all my players to make sure there is an open space for them. The two best ways to clear this issue out is to lobby log, or get in the vehicle urself and drive it to the location u called it to. Once you pull up to that spot it will stop the vehicle and kick you out of it as if it was delivered properly and the AI will despawn. 

Link to comment
Share on other sites

@Runewulv So maybe to fix that issue I'll test some ideas later when I'm home that use something like if speed = 0 for more than 10 seconds then end script. I have a few ideas how that would look so I'll mess around with it and see if I can fix that. I also have an idea how to fix the problem with being able to call the script more than once at a time. Both problems sound easy to fix in my head, so it'll be a fun test to see if I have enough C++ knowledge to fix it.

Link to comment
Share on other sites

@Runewulv Okay! I got the problem that @Schalldampfer posted above. Problem: Player can call the script as many times as they want with the same vehicle or a bunch of vehicles causing the server to bog down. When testing the fact that multiple people can call the car at the same time if they both have the key, I found that the script actually works just fine and whoever calls it last will have the vehicle go to them and the AI the first person called gets ejected and will delete after a minute or two.

You can figure out what I added by just searching "carRunning". https://pastebin.com/p0UW1uBh  (Note that if you copy the whole script, I did enable tanks to be driven by the AI. So if you don't want that option valid, go to "count ( player nearEntities" and remove "tank".

I'll work on the stuck car problem next.

Link to comment
Share on other sites

@Runewulv & @Schalldampfer https://pastebin.com/xBttdSU7 This has the fix for vehicle being stuck in a base. I didn't see if the variable "canMove" is defined anywhere, I imagine it's a true variable for the AI system, so I left it alone. But you can see what I fixed in this version in my comments near the added code. I will next be making the script cost coins to call since I find it sort of OP of a script, if you guys want the edits I make for that as well let me know and I can post it too. Or I could add to the script so it asks for briefcases if you don't use coins.

And I know my C++ writing could be improved, so if you see something I added to this script that could be improved feel free to teach me a lesson and show me what I did wrong. Thanks :)

 

Edit: Coins are now working on the script. If anyone wants my finished (at least for now) version of this awesome script let me know.

Link to comment
Share on other sites

  On 11/6/2017 at 11:58 PM, looter809 said:

@Runewulv Okay! I got the problem that @Schalldampfer posted above. Problem: Player can call the script as many times as they want with the same vehicle or a bunch of vehicles causing the server to bog down. When testing the fact that multiple people can call the car at the same time if they both have the key, I found that the script actually works just fine and whoever calls it last will have the vehicle go to them and the AI the first person called gets ejected and will delete after a minute or two.

You can figure out what I added by just searching "carRunning". https://pastebin.com/p0UW1uBh  (Note that if you copy the whole script, I did enable tanks to be driven by the AI. So if you don't want that option valid, go to "count ( player nearEntities" and remove "tank".

I'll work on the stuck car problem next.

Expand  

 

  On 11/7/2017 at 1:26 AM, looter809 said:

@Runewulv & @Schalldampfer https://pastebin.com/xBttdSU7 This has the fix for vehicle being stuck in a base. I didn't see if the variable "canMove" is defined anywhere, I imagine it's a true variable for the AI system, so I left it alone. But you can see what I fixed in this version in my comments near the added code. I will next be making the script cost coins to call since I find it sort of OP of a script, if you guys want the edits I make for that as well let me know and I can post it too. Or I could add to the script so it asks for briefcases if you don't use coins.

And I know my C++ writing could be improved, so if you see something I added to this script that could be improved feel free to teach me a lesson and show me what I did wrong. Thanks :)

Expand  

Thanks. I will check them and fix those issue, maybe in this weekend

Link to comment
Share on other sites

  On 11/7/2017 at 1:26 AM, looter809 said:

@Runewulv & @Schalldampfer https://pastebin.com/xBttdSU7 This has the fix for vehicle being stuck in a base. I didn't see if the variable "canMove" is defined anywhere, I imagine it's a true variable for the AI system, so I left it alone. But you can see what I fixed in this version in my comments near the added code. I will next be making the script cost coins to call since I find it sort of OP of a script, if you guys want the edits I make for that as well let me know and I can post it too. Or I could add to the script so it asks for briefcases if you don't use coins.

And I know my C++ writing could be improved, so if you see something I added to this script that could be improved feel free to teach me a lesson and show me what I did wrong. Thanks :)

 

Edit: Coins are now working on the script. If anyone wants my finished (at least for now) version of this awesome script let me know.

Expand  

well done looter, in your pastebin does this also have  @Schalldampfer masterkey compatible menu added in?

Link to comment
Share on other sites

  On 11/7/2017 at 4:37 PM, Runewulv said:

well done looter, in your pastebin does this also have  @Schalldampfer masterkey compatible menu added in?

Expand  

 

  On 11/7/2017 at 6:43 PM, looter809 said:

@Runewulv No sorry, I don't use masterkey so I didn't think about adding it. I'm sure you could take a look at my changes and his and figure out how to make both work. I also changed it so if there is a player/AI already in the driver seat the script exits before doing anything...

Expand  

 

I added changes in those fix, hope this works:  (sorry, long spoiler again)

  Reveal hidden contents

 

Link to comment
Share on other sites

I've tested the fixes done by Looter809 with the additions added by Schalldampfer. It seems to be working well. My only issue is, the AI seems a bit too ready to abandon the vehicle. Depending on distance, I have to keep re-calling the vehicle because it will drive a random distance and then abandon the vehicle. So it's not bugging you to where you can't use it, but the abandon option is just a little too aggressive.

Link to comment
Share on other sites

  On 11/10/2017 at 5:35 PM, Runewulv said:

I've tested the fixes done by Looter809 with the additions added by Schalldampfer. It seems to be working well. My only issue is, the AI seems a bit too ready to abandon the vehicle. Depending on distance, I have to keep re-calling the vehicle because it will drive a random distance and then abandon the vehicle. So it's not bugging you to where you can't use it, but the abandon option is just a little too aggressive.

Expand  

Hmmm. It works well for me, but this is on a test server with no lag on it. Are you watching the vehicle while it drives? Is it getting stuck on something?

Link to comment
Share on other sites

And this is to use with remoteVehicle script and its selection menu:

1. install remoteVehicle script

2. in overwrites\click_actions\config.sqf, add this

  Reveal hidden contents

3. and make overwrites\click_actions\examples\callcar.sqf

  Reveal hidden contents

The menu is created by @salival . Thank you!

Edited by Schalldampfer
Credit for menu
Link to comment
Share on other sites

  Reveal hidden contents

Here's the fixed version of what I last posted with @Schalldampfer's remote script as well. I don't personally use the remote vehicle script (thought about it, still kind of on the fence), but I have added a couple more options on my personal file. One addition I have added is coins as I stated before. The other addition is adding a small part of the knight rider theme song which plays on repeat on the server side (took me forever to get the repeat to work lol, I kind of wonder if there was an easier way, but I tried multiple methods...) If anyone wants the coins and knight rider theme additions just let me know.

(the fix i did from last time to this time fixes the problem @Runewulv said with the new method of checking if the car is stuck. I have it at 20 checks atm but it may do better with more/less)

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...