SA-MP Forums Archive
Need help with teleport script! ~ - 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: Need help with teleport script! ~ (/showthread.php?tid=71191)



Need help with teleport script! ~ - Glass - 30.03.2009

How do i make a teleport so the car goes with?
Not just the person.


Re: Need help with teleport script! ~ - Glass - 30.03.2009

Please.


Re: Need help with teleport script! ~ - illay - 30.03.2009

Glass,

pawn Код:
stock TeleportPlayer(playerid,Float:bX,Float:bY,Float:bZ,Float:bD,interior=0) { // Goldkiller
    new
      vid=GetPlayerVehicleID(playerid);
    if(!vid) {
      SetPlayerPos(playerid,bX,bY,bZ);
      SetPlayerFacingAngle(playerid,bD);
     }
     else {
        SetVehiclePos(vid,bX,bY,bZ+2);
        SetVehicleZAngle(vid,bD);
        LinkVehicleToInterior(vid,interior);
    }
    return SetPlayerInterior(playerid,interior);
}

TeleportPlayer(playerid,x,y,z,a,interrior); //Code



Re: Need help with teleport script! ~ - Glass - 30.03.2009

I don't understand a shit of this crap


Re: Need help with teleport script! ~ - Luka P. - 30.03.2009

Quote:
Originally Posted by Glass
I don't understand a shit of this crap
how you can`t understand?

copy
Код:
stock TeleportPlayer(playerid,Float:bX,Float:bY,Float:bZ,Float:bD,interior=0) { // Goldkiller
	new
	  vid=GetPlayerVehicleID(playerid);
	if(!vid) {
	  SetPlayerPos(playerid,bX,bY,bZ);
	  SetPlayerFacingAngle(playerid,bD);
	 }
	 else {
		SetVehiclePos(vid,bX,bY,bZ+2);
		SetVehicleZAngle(vid,bD);
		LinkVehicleToInterior(vid,interior);
	}
 	return SetPlayerInterior(playerid,interior);
}
to your script...
and then
Код:
if(strcmp(cmd,"/teleport",true)==0)
{
  TeleportPlayer(playerid,x,y,z,a,interrior);
  return 1;
}



Re: Need help with teleport script! ~ - Glass - 30.03.2009

umh..


Re: Need help with teleport script! ~ - illay - 30.03.2009

™ScorpioN,

Pls, pawn tag! [pawn] [ /pawn]! Thank you!


Re: Need help with teleport script! ~ - illay - 30.03.2009

Glass,

Quote:
Originally Posted by illay
Command

pawn Код:
if(strcmp(cmd,"/command",true)==0)
{
  TeleportPlayer(playerid,x,y,z,a,interrior);
  return 1;
}
Functional:

[pawn]
stock TeleportPlayer(playerid,Float:bX,Float:bY,Float:bZ ,Float:bD,interior=0) { // Goldkiller
new
vid=GetPlayerVehicleID(playerid);
if(!vid) {
SetPlayerPos(playerid,bX,bY,bZ);
SetPlayerFacingAngle(playerid,bD);
}
else {
SetVehiclePos(vid,bX,bY,bZ+2);
SetVehicleZAngle(vid,bD);
]



Re: Need help with teleport script! ~ - Luka P. - 30.03.2009

[center][b]ok thank you...i doesn`t know that!


Re: Need help with teleport script! ~ - Glass - 30.03.2009

I don't understand.. -_-