01.01.2015, 19:27
Hi,
Regarding your code, if you want to make a teleport command, you will need just to change the following lines:
I have made some changes in your code, but it will do the same thing.
You could just to make another command like that and change the lines I have mentioned.
To get a position coordinate, type /save in game and go to your GTA-SA files > SAMP and look for a file named "savedpositions" and get the second, third and fourth paramter of the function "AddPlayerClass".
More info:
https://sampwiki.blast.hk/wiki/AddPlayerClass
Regarding your code, if you want to make a teleport command, you will need just to change the following lines:
pawn Код:
CMD:sfa(playerid, params[])
{
SpawnCheck(playerid);
PassengerCheck(playerid);
if(Restriction(playerid) == 1) return SendClientMessage(playerid, -1, "» "red"You cannot use this command at the moment.");
if(IsPlayerInAnyVehicle(playerid))
{
LinkVehicleToInterior(GetPlayerVehicleID(playerid), 0);
SetVehicleVirtualWorld(GetPlayerVehicleID(playerid), 0);
SetVehiclePos(GetPlayerVehicleID(playerid), -1504.4640, -322.4451, 6.7357); // Change this line
SetVehicleZAngle(GetPlayerVehicleID(playerid), 13.3832); // Optional
}
else
{
SetPlayerInterior(playerid, 0);
SetPlayerVirtualWorld(playerid, 0);
SetPlayerPos(playerid, -1514.8895,-331.4654,6.8848); // Change this line
SetPlayerFacingAngle(playerid, 359.1662); // Optional
}
SendTeleportMessage(playerid, "San Fierro Airport", "sfa");
SetCameraBehindPlayer(playerid);
return 1;
}
You could just to make another command like that and change the lines I have mentioned.
To get a position coordinate, type /save in game and go to your GTA-SA files > SAMP and look for a file named "savedpositions" and get the second, third and fourth paramter of the function "AddPlayerClass".
More info:
https://sampwiki.blast.hk/wiki/AddPlayerClass