[Help!] Putting player in vehicle when Key pushed
#1

Hi, I have a problem
Could anybody write me code for a Key function which will put player in vehicle as 1 position (front passenger).

Info:
Key - KEY_LOOK_RIGHT
Distance (player to vehicle) - 15
Vehicles (with which will it work) - 417, 460
Position (in vehicle) - 1 (front passenger)

It's really important to me! Please do it for me! I have tried but no effefcts
WojteQ
Reply
#2

I do not understand nothing from what you said. But here is something I tihnk it will help:

pawn Code:
if(newkeys == KEY_LOOK_RIGHT && oldkeys == KEY_LOOK_RIGHT)
    {
    new Infernus, Float:x, Float:y, Float:z, Float:a;
    GetPlayerPos(playerid,x,y,z);
    GetPlayerFacingAngle(playerid,a);
    Infernus = CreateVehicle(411,x,y,z,a,6,1,100000);
    PutPlayerInVehicle(playerid,Infernus,1);
    LinkVehicleToInterior(Infernus,GetPlayerInterior(playerid));
    return 1;
    }
Reply
#3

I mean when player's distance to a specified vehicle model it puts him in this vehicle, but when he presses KEY_LOOK_RIGHT.

Example:
I am 30 from leviathan and push E. Nothing happens. I'm 0-15 from leviathan and push E - it puts me in this leviathan as front passenger (1 in pawn).
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)