SA-MP Forums Archive
Not in car after teleport - 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)
+--- Thread: Not in car after teleport (/showthread.php?tid=292158)



Not in car after teleport - Igdirli 76 - 22.10.2011

Hello my friends,

i have a question when i teleport to /ammu then i am not in my car but my car is too there.

I have Write this :

if(strcmp("/tuning", cmdtext, true) == 0){
new Pveh;
Pveh = GetPlayerVehicleID(playerid);
SetPlayerPos(playerid, 2385.100 ,1033 ,10.800);
SetVehiclePos(Pveh,2385.100 ,1033 ,10.800);
SetPlayerFacingAngle(playerid, 0);
SetVehicleZAngle(Pveh, 0);
SetPlayerInterior(playerid, 0);
LinkVehicleToInterior(Pveh, 0);
SetPlayerVirtualWorld(playerid, 0);
SetVehicleVirtualWorld(Pveh, 0);
SendClientMessage(playerid, 0xFF0000FF, "Tuning Shop");
return 1;
}


Re: Not in car after teleport - Gustavob - 22.10.2011

You're teleporting the vehicle and then the car, teleport just the vehicle instead

pawn Код:
if(strcmp("/tuning", cmdtext, true) == 0){
    new Pveh;
    Pveh = GetPlayerVehicleID(playerid);
    SetVehiclePos(Pveh,2385.100 ,1033 ,10.800);
    SetPlayerFacingAngle(playerid, 0);
    SetVehicleZAngle(Pveh, 0);
    SetPlayerInterior(playerid, 0);
    LinkVehicleToInterior(Pveh, 0);
    SetPlayerVirtualWorld(playerid, 0);
    SetVehicleVirtualWorld(Pveh, 0);
    SendClientMessage(playerid, 0xFF0000FF, "Tuning Shop");
    return 1;
}