Hey how to i tele a vehicle - 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: Hey how to i tele a vehicle (
/showthread.php?tid=88830)
Hey how to i tele a vehicle -
[mad]MLK - 29.07.2009
how would i tele the vehicle the player is in if they are in when they type this cmd?
Код:
if (strcmp("/seafun", cmdtext, true, 10) == 0)
{
SetPlayerPos(playerid, 2450.2224, -1788.5258, 458.3834);
SendClientMessage(playerid, 0xAA3333AA, "Welcome to sea fun drive down the tunnel at high speed!");
SetVehiclePos(vehicleid, 2450.2224, -1788.5258, 458.3834);
return 1;
}
Re: Hey how to i tele a vehicle -
Daren_Jacobson - 29.07.2009
pawn Код:
if (strcmp("/seafun", cmdtext, true, 10) == 0)
{
if (IsPlayerInAnyVehicle(playerid))
SetVehiclePos(GetPlayerVehicleID(playerid), 2450.2224, -1788.5258, 458.3834);
else
SetPlayerPos(playerid, 2450.2224, -1788.5258, 458.3834);
SendClientMessage(playerid, 0xAA3333AA, "Welcome to sea fun drive down the tunnel at high speed!");
return 1;
}
Re: Hey how to i tele a vehicle -
JadedJ - 29.07.2009
SetPlayerPos() should teleport you with your car if you're in one SetVehiclePos() will teleport the driver with the car if I recall right