SA-MP Forums Archive
Teleport [HELP] - 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: Teleport [HELP] (/showthread.php?tid=291059)



Teleport [HELP] - Salsa - 18.10.2011

I Make A Teleport 1st I Do /save and i copy save position from document files

but it Give"s A warning

Код:
}
    if (strcmp(cmdtext, "/test", true) == 0){
    SetPlayerInterior(playerid, 1);
    SetPlayerFacingAngle(playerid, 0);
    SetPlayerPos(playerid, -1505.6221,769.2800,7.1853,190.2585);
    SendClientMessage(playerid, 0xFFFF00AA, "test");
return 1;}



Re: Teleport [HELP] - TheMaddox - 18.10.2011

WHat's the warning?


Re: Teleport [HELP] - nilanjay - 18.10.2011

What warning it is saying?


Re: Teleport [HELP] - Salsa - 18.10.2011

THIS

Quote:

C:\Documents and Settings\XPPRESP3\Desktop\samp03csvr_R5_win32\samp 03csvr_R5_win32\samp03csvr_R5_win32\gamemodes\lvdm .pwn(526 : warning 202: number of arguments does not match definition
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase

Header size: 5748 bytes
Code size: 2795360 bytes
Data size: 417148 bytes
Stack/heap size: 16384 bytes; estimated max. usage=7131 cells (28524 bytes)
Total requirements: 3234640 bytes

1 Warning.




Re: Teleport [HELP] - Pharrel - 18.10.2011

pawn Код:
SetPlayerPos(playerid, -1505.6221,769.2800,7.1853/*,190.2585*/);//remove the 4th float
the 4th float is the player angle and setplayerpos does not set the player angle, to do that you must use SetPlayerFacingAngle.


Re: Teleport [HELP] - TheMaddox - 18.10.2011

Quote:
Originally Posted by Pharrel
Посмотреть сообщение
pawn Код:
SetPlayerPos(playerid, -1505.6221,769.2800,7.1853/*,190.2585*/);//remove the 4th float
the 4th float is the player angle and setplayerpos does not set the player angle, to do that you must use SetPlayerFacingAngle.
That's the perfect answer,you took it from my mouth..i mean hand


Re: Teleport [HELP] - [Diablo] - 18.10.2011

this should be float
pawn Код:
SetPlayerFacingAngle(playerid, 0);
edit: and you should delete the 4th float from SetPlayerPos, as stated above.


Re: Teleport [HELP] - Mr_Scripter - 18.10.2011

pawn Код:
if(!strcmp(cmdtext, "/test", true)){
   if(!IsPlayerInAnyVehicle(playerid)){
       SetPlayerPos(playerid, 1505.6221, 769.2800, 7.1853);
       SetPlayerFacingAngle(playerid, 0.0);
       SetPlayerInterior(playerid, 1);
       SetPlayerVirtualWorld(playerid, 0);
   }
   else{
       new veh = GetPlayerVehicleID(playerid);
       SetVehiclePos(veh, 1505.6221, 769.2800, 7.1853);
       SetVehicleZAngle(veh, 0.0);
       LinkVehicleToInterior(veh, 1);
       SetVehicleVirtualWorld(veh, 0);
       PutPlayerInVehicle(playerid, veh, 0);
   }
   return 1;
}
it will teleport the car also if your in any car and if your not it will make one :P

[pawn]
pawn Код:
if(!strcmp(cmdtext, "/test", true)){
   SetPlayerPos(playerid, 1505.6221, 769.2800, 7.1853);
   SetPlayerFacingAngle(playerid, 0.0);
   SetPlayerInterior(playerid, 1);
   SetPlayerVirtualWorld(playerid, 0);
   return 1;
}
this one is simple


Re: Teleport [HELP] - Salsa - 18.10.2011

Done Its Working Repu AddedTo Pharrel !!!


Re: Teleport [HELP] - TheMaddox - 18.10.2011

Quote:
Originally Posted by Salsa
Посмотреть сообщение
Done Its Working Repu AddedTo Pharrel !!!
Mr_Scripter's reply is better,you can TP yourself with your car(if you're in one).