


Login Issues
Forgot password?Activate Issues
Account activation email not received? Wrong account activation email used?Other Problems?
Contact Support - Help Center Get help on the UGX Discord. Join it now!car_run.gsc
#include common_scripts\utility;
#include maps\_utility;
#include maps\_zombiemode_utility;
car_run_trig()
{
thread bomb_run();
}
bomb_run()
{
zombie_cost = 3500;
trigger = getEnt("car_run_trig","targetname");
trigger setHintString("need to turn on power");
trigger SetCursorHint( "HINT_NOICON" );
flag_wait("electricity_on");
wait 1;
while(1)
{
//players = getplayers();
plane = getEnt("car","targetname");
plane_path = GetVehicleNode("car_path_start","targetname");
trigger setCursorHint("HINT_NOICON");
trigger setHintString("Press &&1 to ride jeep [Cost: "+zombie_cost+"]");
trigger waittill("trigger",player);
if(player.score >= zombie_cost)
{
player maps\_zombiemode_score::minus_to_player_score( zombie_cost );
trigger setHintString("Please wait, Jeep is in Use");
plane AttachPath( plane_path );
plane thread maps\_vehicle::vehicle_paths(plane_path);
maps\_vehicle::vehicle_init(plane);
thread reason( plane, plane_path, trigger );
//plane StartPath( plane_path );
wait 50;
}
}
}
reason( plane, plane_path, trigger )
{
tag1 = plane gettagorigin( "tag_driver" );
tag2 = plane gettagorigin( "tag_passenger" );
tag3 = plane gettagorigin( "tag_passenger2" );
tag4 = plane gettagorigin( "tag_passenger3" );
multiple1 = getEnt("multiples123","targetname");
players_touching = get_players_touching( multiple1 );
for(i=0;i<players_touching.size;i++)
{
players_gun = players_touching[i] GetCurrentWeapon();
players_touching[i] PlayerLinkTo( plane, "tag_driver", 1.0 );
players_touching[i] giveWeapon("tesla_gun");
players_touching[i] SwitchToWeapon("tesla_gun");
players_touching[i] DisableWeaponCycling();
players_touching[i] EnableInvulnerability();
plane StartPath( plane_path );
wait 20;
players_touching[i] Unlink();
players_touching[i] takeweapon("tesla_gun");
players_touching[i] SwitchToWeapon(players_gun);
players_touching[i] EnableWeaponCycling();
players_touching[i] DisableInvulnerability();
trigger setHintString("Jeep is Refueling");
wait 30; //TIME IT WILL WAIT TO REFUEL THE JEEP
thread bomb_run();
}
}
get_players_touching( ent )
{
p= get_players();
array = [];
for(i=0;i<p.size;i++)
{
if(p[i] IsTouching(ent) && is_player_valid(p[i]) )
{
array[array.size] = p[i];
//iPrintLn("it is defined ^1" + p[i].playername);
return array;
}
}
}
thread maps\car_run::car_run_trig();
maps\_zombiemode::main();
wait 30;
wait 10;
zombie_cost = 3500;
![]() | Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum. |
![]() Nuclear | DARKLEGION's requested title |
![]() | Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager. |
you can post a video or a screenshot?
Works great thanks man
Yes! I have tried to make a script like this to work with the path for the vehicle like this and now you make one for us all, thank you.
In my case when I will use this I have an ai sitting in the car so is it a bit different to make an ai to work with this?
Yes I know I have already made a vehicle path with an ai in a jeep already. The only thing I needed was a script like this, and then I found this. So I try to make so the player at the driver seat is sitting at the back of the jeep somehow.
Thanks again, you saved me lots of time!
![]() | Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager. |
![]() | |
![]() | |
![]() | Has the ability to issue warnings to users, edit and remove posts from the forum and to move topics to other boards. Upholds the rules of the forum. Moderates Chat Rooms. |