2021-01-06, 11:28 PM
(2020-12-31, 04:46 PM)xbruno1000x Wrote: First:
Code:new IsInSecuricar[MAX_PLAYERS];
To enter interior:
Code:public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(newstate == PLAYER_STATE_PASSENGER)
{
if (GetVehicleModel(vehicleid) == SECURICAR ID)
{
SetPlayerPos(playerid, INTERIOR POS);
SetPlayerFacingAngle(playerid, ANGLE);
SetCameraBehindPlayer(playerid);
SetPlayerInterior(playerid, INTERIORID);
IsInSecuricar[playerid] = vehicleid;
}
}
To Exit car interior:
Code:public OnPlayerKeyStateChange(playerid,newkeys,oldkeys)
{
if (newkeys == 16 && IsInSecuricar[playerid] > 0)
{
new Float:X,Float:Y,Float:Z;
GetVehiclePos(IsInSecuricar[playerid], X, Y, Z);
SetPlayerPos(playerid, X, Y, Z);
SetPlayerInterior(playerid, 0);
IsInSecuricar[playerid] = 0;
}
I couldn?t do it but thank you so much :)