SA-MP Forums Archive
whats the safe car tele - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: whats the safe car tele (/showthread.php?tid=206379)



whats the safe car tele - Deal-or-die - 03.01.2011

Whats the cmd to teleport a player and a car eg a marker to someones garage they type /enter, and they spawn in the interior?


Re: whats the safe car tele - Kwarde - 03.01.2011

LinkVehicleToInterior(vehicleid, interior);

Do you mean that?


Re: whats the safe car tele - Deal-or-die - 03.01.2011

ok so what i want is this as the exterior where the player has to type /enter :
AddPlayerClass(189,-2073.5991,975.3473,62.9219,354.8150,0,0,0,0,0,0); //

and this where the player and their car will be teleported into:
AddPlayerClass(189,1403.2014,3.4539,1000.9092,0.89 38,0,0,0,0,0,0); //

and vice versa so you are able to get out again


Re: whats the safe car tele - Kwarde - 03.01.2011

Yes it's able to get out of there. Here are some codes:

Get into the interior:
pawn Код:
new veh = GetPlayerVehicleID(playerid);
if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, 0xAFAFAFAA, "You must be in an vehicle!");
if(!IsPlayerInRangeOfPoint(playerid, 5, -2073.5991, 975.3473, 62.9219)) return SendClientMessage(playerid, 0xAFAFAFAA, "You are not in range of the entrance point!");
if(GetPlayerState(playerid) != 2) return SendClientMessage(playerid, 0xAFAFAFAA, "You must be the driver of the vehicle!");
SetVehiclePos(GetPlayerVehicleID(playerid), 1403.2014, 3.4539, 1000.9092);
SetVehicleZAngle(GetPlayerVehicleID(playerid), 0.89);
LinkVehicleToInterior(GetPlayerVehicleID(playerid), INTERIOR_ID_YOU_NEED);
PutPlayerInVehicle(playerid, veh, 0);
- No interior,