first, you got to get the coordinates for the teleport location. use the debugger mode and /save function. there will be savedpositions file in your gta directory if you /save. the command is like /save [comment] so you should enter something like /save telespot1 to recognise the info. Next if you were on foot there should be AddPlayerClass(blablabla, coordinates, weapons, ..). You need to get the first three coordinates. They are as following: x, y, z. then there is angle. if you want you can use that one too.
now for the command i use dcmd function, but as ou're new you could use strcmp just now.
pawn Код:
//OnPlayerCommandText(playerid, cmdtext[])
if(strcmp(cmdtext, "/goto_cars", true) == 0)
{
SetPlayerPos(playerid, /*coordinate x*/, /*coordinate y*/, /*coordinate z*/);
/* use this if you want to us angle :*/
SetPlayerFacingAngle(playerid, /* angle here);
return SendClientMessage(playerid, 0xFFFFFFFF, "You have been teleported to cars!");
}
note to replace my comments wit actual x y z and angle coordinates.
hope it helped!