Posted By: SkullBoy99
Enter in a car,like in GTA - 04/20/14 14:36
Hello Today I will give you a code which give player ability to enter in a car.I created only the feature's basics.I stopped working on this because I want to work on a shader ,R.A.G.E. .OK..player can enter in once car,and control it.
What you need??
1.Two entities:
2.In your camera script the target must be currSelected.
3.In your player's function you need to set this:
.
4.Now the script for vehicle:
These are only the basics of this feature,i tried everything to get more cars buuut,nothing.
I hope that will be useful
What you need??
1.Two entities:
Code:
ENTITY* currSelected; ENTITY* pl_entity;
2.In your camera script the target must be currSelected.
3.In your player's function you need to set this:
Code:
pl_entity = ent_create(mdl_name,player_xyz,your_action); cursSelected = pl_entity;
4.Now the script for vehicle:
Code:
ENTITY* vehicle; action get_car() { me = vehicle; you = pl_entity; if(vec_dist(my.x,your.x) < 250) { wait(-1); currSelected = vehicle; } } action vehicle() { vehicle = me; on_yourkey = get_car; while(1) { if(currSelected == vehicle) { //add your movement script } wait(1) } } }
These are only the basics of this feature,i tried everything to get more cars buuut,nothing.
I hope that will be useful