With a Car the Teleport doesnt work.
But left the player a car and type /grove or other command he goes to the teleportcoords.
Код:
if(strcmp(cmdtext,"/Grove",true)==0)
{
new vehicleid = GetPlayerVehicleID(playerid);
new State = GetPlayerState(playerid);
if(IsPlayerInAnyVehicle(playerid) && State == PLAYER_STATE_DRIVER)
{
GameTextForPlayer(playerid,"Du bist an der Grove",4000,6);
return SetVehiclePos(vehicleid,2491.1860,-1667.5708,13.3438,90.3042);
}
SetPlayerPos(playerid,2491.1860,-1667.5708,13.3438,90.3042);
GameTextForPlayer(playerid,"Du bist an der Grove",4000,6);
return 1;
}
if(strcmp(cmdtext,"/LSPD",true)==0)
{
new vehicleid = GetPlayerVehicleID(playerid);
new State = GetPlayerState(playerid);
if(IsPlayerInAnyVehicle(playerid) && State == PLAYER_STATE_DRIVER)
{
GameTextForPlayer(playerid,"Du bist am LSPD",4000,6);
return SetVehiclePos(vehicleid,1512.1770,-1661.2734,13.5469,272.0497);
}
SetPlayerPos(playerid,1512.1770,-1661.2734,13.5469,272.0497);
GameTextForPlayer(playerid,"Du bist am LSPD",4000,6);
return 1;
}
if(strcmp(cmdtext,"/Vinewood",true)==0)
{
new vehicleid = GetPlayerVehicleID(playerid);
new State = GetPlayerState(playerid);
if(IsPlayerInAnyVehicle(playerid) && State == PLAYER_STATE_DRIVER)
{
GameTextForPlayer(playerid,"Du bist in Vindewood",4000,6);
return SetVehiclePos(vehicleid,1382.6194,-888.5532,38.0863,272.0497);
}
SetPlayerPos(playerid,1382.6194,-888.5532,38.0863,272.0497);
GameTextForPlayer(playerid,"Du bist in Vindewood",4000,6);
return 1;
}
if(strcmp(cmdtext,"/Bridge",true)==0)
{
new vehicleid = GetPlayerVehicleID(playerid);
new State = GetPlayerState(playerid);
if(IsPlayerInAnyVehicle(playerid) && State == PLAYER_STATE_DRIVER)
{
GameTextForPlayer(playerid,"Du bist an der Bridge",4000,6);
return SetVehiclePos(vehicleid,-2672.3596,1268.5905,55.9456,182.6368);
}
SetPlayerPos(playerid,-2672.3596,1268.5905,55.9456,182.6368);
GameTextForPlayer(playerid,"Du bist an der Bridge",4000,6);
return 1;
}
if(strcmp(cmdtext,"/chiliad",true)==0)
{
new vehicleid = GetPlayerVehicleID(playerid);
new State = GetPlayerState(playerid);
if(IsPlayerInAnyVehicle(playerid) && State == PLAYER_STATE_DRIVER)
{
GameTextForPlayer(playerid,"Du bist am Chiliad",4000,6);
return SetVehiclePos(vehicleid,-2305.2078,-1626.4778,483.7625,166.9700);
}
SetPlayerPos(playerid,-2305.2078,-1626.4778,483.7625,166.9700);
GameTextForPlayer(playerid,"Du bist am Chiliad",4000,6);
return 1;
}
if(strcmp(cmdtext,"/SF",true)==0)
{
new vehicleid = GetPlayerVehicleID(playerid);
new State = GetPlayerState(playerid);
if(IsPlayerInAnyVehicle(playerid) && State == PLAYER_STATE_DRIVER)
{
GameTextForPlayer(playerid,"Du bist in SF",4000,6);
return SetVehiclePos(vehicleid,-2041.9819,135.8807,28.8359,269.4310);
}
SetPlayerPos(playerid,-2041.9819,135.8807,28.8359,269.4310);
GameTextForPlayer(playerid,"Du bist in SF",4000,6);
return 1;
}
if(strcmp(cmdtext,"/WAA",true)==0)
{
new vehicleid = GetPlayerVehicleID(playerid);
new State = GetPlayerState(playerid);
if(IsPlayerInAnyVehicle(playerid) && State == PLAYER_STATE_DRIVER)
{
GameTextForPlayer(playerid,"Du bist an der WAA",4000,6);
return SetVehiclePos(vehicleid,-2699.8467,217.9686,4.1797,92.1187);
}
SetPlayerPos(playerid,-2699.8467,217.9686,4.1797,92.1187);
GameTextForPlayer(playerid,"Du bist an der WAA",4000,6);
return 1;
}
if(strcmp(cmdtext,"/Area51",true)==0)
{
new vehicleid = GetPlayerVehicleID(playerid);
new State = GetPlayerState(playerid);
if(IsPlayerInAnyVehicle(playerid) && State == PLAYER_STATE_DRIVER)
{
GameTextForPlayer(playerid,"Du bist an der Area51",4000,6);
return SetVehiclePos(vehicleid,95.9615,1920.5891,18.1226,266.9044);
}
SetPlayerPos(playerid,95.9615,1920.5891,18.1226,266.9044);
GameTextForPlayer(playerid,"Du bist an der Area51",4000,6);
return 1;
}
if(strcmp(cmdtext,"/BigJump",true)==0)
{
new vehicleid = GetPlayerVehicleID(playerid);
new State = GetPlayerState(playerid);
if(IsPlayerInAnyVehicle(playerid) && State == PLAYER_STATE_DRIVER)
{
GameTextForPlayer(playerid,"Du bist bist am BigJump",4000,6);
return SetVehiclePos(vehicleid,-668.8647,2306.2256,135.6503,87.9895);
}
SetPlayerPos(playerid,-668.8647,2306.2256,135.6503,87.9895);
GameTextForPlayer(playerid,"Du bist bist am BigJump",4000,6);
return 1;
}
And when i press F5 writes on the desk. this: