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



Need help with teleport! - Baumann - 16.11.2012

hey im new , and i dont know very well scripting , i maded command /home and it teles me to my selected place, but if i tele with car , my car gone and i tele wihtout car , . I want tele with car to not car lose


Re: Need help with teleport! - iGetty - 16.11.2012

Check if a player is in a vehicle.

pawn Код:
if(IsPlayerInVehicle(playerid))
{
    SetVehiclePos(GetPlayerVehicleID(playerid), x, y, z);
}
else
{
    //your code
}



Re: Need help with teleport! - Butch - 16.11.2012

huh i dont get it


Re: Need help with teleport! - Baumann - 16.11.2012

can u make for me it , AddPlayerClass(0,435.4337,2508.1094,16.4844,84.610 8,0,0,0,0,0,0); // home i want tele home with car not alone


Re: Need help with teleport! - kanersps - 16.11.2012

Butch there are lots and lots of tutorial on this dont make stupid posts!
i dont like seeing all this just watch tutorial learn stuff ask usefull questions like:

Is it possible to make a gamemode changer?
This is just a question you shouldnt ask because its also a stupid question even its possible
But make good questions i made a question:

Zcmd doesnt work?

But its nice that you ask such stuff i did it too i am not mad at you here is the code

Quote:

if(strcmp("/home", cmdtext, true, 10) == 0)
{
SetPlayerPos(Here your coords etc);
SetVehiclePos(GetPlayerVehicleID(playerid), x, y, z);
}
return 1;

This code should work


Re: Need help with teleport! - Baumann - 16.11.2012

C:\Documents and Settings\AGS\Desktop\tele.pwn(23 : error 017: undefined symbol "x"


Re: Need help with teleport! - kanersps - 16.11.2012

Quote:
Originally Posted by Baumann
Посмотреть сообщение
can u make for me it , AddPlayerClass(0,435.4337,2508.1094,16.4844,84.610 8,0,0,0,0,0,0); // home i want tele home with car not alone
Make your own topic for your own question and ill answer
btw i dont realy know what your saying?


Re: Need help with teleport! - Lean - 16.11.2012

Better Add in your gamemode as ZCMD


Re: Need help with teleport! - Baumann - 16.11.2012

how`?