Vehicle Interiors
#6

This is the basic part of what i use on my server. hopefully it shows you what you need to do.
pawn Код:
new Intrailer[MAX_PLAYERS]; //create the variable,

//OnPlayerSpawn
Intrailer[playerid]=0;

//onplayerentervehicle
if (GetVehicleModel(vehicleid) == trailerid && ispassenger == 1) { //change trailer id to the id of the trailer.
        SetPlayerPos(playerid,trailerx,trailery,trailerz); //change trailerx, trailery, trailerz to the x,y,z cords for your trailer
        Intrailer[playerid]=vehicleid;
        SetPlayerVirtualWorld (playerid, vehicleid) ; //credits to retardedwolf for helping with this bit.
    }
//OnPlayerKeyStateChange

if (newkeys & 16 && Intrailer[playerid] > 0) //credits to whoever made the shamal interior fliterscript. (can't remember)
{
        new Float:X,Float:Y,Float:Z,Float:A;
        GetVehiclePos(Intrailer[playerid],X,Y,Z);
        GetVehicleZAngle(Intrailer[playerid],A);
        X+=(5*floatsin(-floatsub(A,45.0),degrees)),
            Y+=(5*floatcos(-floatsub(A,45.0),degrees));
        SetPlayerVirtualWorld(playerid, 0);
        SetPlayerPos(playerid,X,Y,floatsub(Z,0.94));
        SetPlayerFacingAngle(playerid,A);
        Intrailer[playerid]=0;
    }
Reply


Messages In This Thread
Vehicle Interiors - by Rokzlive - 16.12.2010, 01:02
Re: Vehicle Interiors - by The_Gangstas - 16.12.2010, 01:07
Re: Vehicle Interiors - by Rokzlive - 16.12.2010, 01:08
Re: Vehicle Interiors - by The_Gangstas - 16.12.2010, 01:17
Re: Vehicle Interiors - by Rokzlive - 16.12.2010, 01:28
Re: Vehicle Interiors - by Haydz - 16.12.2010, 01:32
Re: Vehicle Interiors - by The_Gangstas - 16.12.2010, 01:36

Forum Jump:


Users browsing this thread: 1 Guest(s)