Teleport Problem ...

Wichtiger Hinweis: Bitte ändert nicht manuell die Schriftfarbe auf schwarz sondern belasst es bei der Standardeinstellung. Somit tragt ihr dazu bei dass euer Text auch bei Verwendung unseren dunklen Forenstils noch lesbar ist!

Tipp: Ihr wollt längere Codeausschnitte oder Logfiles bereitstellen? Benutzt unseren eigenen PasteBin-Dienst Link
  • hey leute,
    ich habe ein problem undzwa;
    wenn ich in einem wagen bin und mich irgentwo hin teleportiere kommt das
    fahrzeug nicht mit ?
    bitte um hilfe ;D

  • ja genau das will ich ja nur wie ?
    ich habe ein eigenen telporter script und
    ich kann ja so oder so nicht gut scripten habe erst vor gestern gelernt :D
    deshalb wie macht man das mit dem auto mit porten ?


    achja danke für dich schnelle antwort :D

  • hier ist mein script.


    #include <a_samp>


    #define COLOR_YELLOW 0xFFFF00AA


    new Menu:Teleports;


    public OnPlayerConnect(playerid)
    {
    SendClientMessage(playerid, COLOR_YELLOW, "");
    return 1;
    }
    public OnPlayerCommandText(playerid, cmdtext[])
    {


    if (strcmp("/LS",cmdtext, true, 10)==0)
    {
    Teleports = CreateMenu("TELEPORTS",2,200,100,150,100);
    AddMenuItem(Teleports, 0, "Groove Street");
    AddMenuItem(Teleports, 0, "Tankstelle");
    AddMenuItem(Teleports, 0, "Autohaus");
    AddMenuItem(Teleports, 0, "Polizei Station");
    AddMenuItem(Teleports, 0, "Waffen Laden");
    AddMenuItem(Teleports, 0, "BSN");
    AddMenuItem(Teleports, 0, "Tuning Werkstatt");
    ShowMenuForPlayer(Teleports, playerid);
    TogglePlayerControllable(playerid, 0);
    return 1;
    }
    return 0;
    }
    public OnPlayerSelectedMenuRow(playerid, row)
    {


    new Menu:Current = GetPlayerMenu(playerid);
    //Teleports
    if (Current == Teleports)
    {
    switch(row) {


    case 0:{
    SetPlayerPos(playerid,2482.4836,-1689.6537,13.5145);
    TogglePlayerControllable(playerid, 1);}


    case 1:{
    SetPlayerPos(playerid,1937.1121,-1774.4595,13.3828);
    TogglePlayerControllable(playerid, 1);}
    case 2:{
    SetPlayerPos(playerid,1656.8973,-1706.7909,15.6094);
    TogglePlayerControllable(playerid, 1);}
    case 3:{
    SetPlayerPos(playerid,1549.9364,-1675.7362,15.1872);
    TogglePlayerControllable(playerid, 1);}
    case 4:{
    SetPlayerPos(playerid,1365.0520,-1279.8701,13.5469);
    TogglePlayerControllable(playerid, 1);}
    case 5:{
    SetPlayerPos(playerid,1200.3815,-923.7845,43.0152);
    TogglePlayerControllable(playerid, 1);}
    case 6:{
    SetPlayerPos(playerid,1035.7764,-1032.2292,31.9555);
    TogglePlayerControllable(playerid, 1);}




    }
    }
    return 1;
    }



    //ON MENU EXIT
    public OnPlayerExitedMenu(playerid)
    {
    new Menu:Current = GetPlayerMenu(playerid);
    if( Current == Teleports){
    TogglePlayerControllable(playerid,1);}


    return 1;
    }

  • Also ich würds so machen,

    #include <a_samp>


    #define COLOR_YELLOW 0xFFFF00AA


    new Menu:Teleports;


    public OnPlayerConnect(playerid)
    {
    SendClientMessage(playerid, COLOR_YELLOW, "");
    return 1;
    }
    public OnPlayerCommandText(playerid, cmdtext[])
    {


    if (strcmp("/LS",cmdtext, true, 10)==0)
    {
    Teleports = CreateMenu("TELEPORTS",2,200,100,150,100);
    AddMenuItem(Teleports, 0, "Groove Street");
    AddMenuItem(Teleports, 0, "Tankstelle");
    AddMenuItem(Teleports, 0, "Autohaus");
    AddMenuItem(Teleports, 0, "Polizei Station");
    AddMenuItem(Teleports, 0, "Waffen Laden");
    AddMenuItem(Teleports, 0, "BSN");
    AddMenuItem(Teleports, 0, "Tuning Werkstatt");
    ShowMenuForPlayer(Teleports, playerid);
    TogglePlayerControllable(playerid, 0);
    return 1;
    }
    return 0;
    }
    public OnPlayerSelectedMenuRow(playerid, row)
    {


    new Menu:Current = GetPlayerMenu(playerid);
    //Teleports
    if (Current == Teleports)
    {
    switch(row) {


    case 0:{
    new tmpcar = GetPlayerVehicleID(playerid);
    SetVehiclePos(tmpcar, 2482.4836,-1689.6537,13.5145);
    SetPlayerPos(playerid,2482.4836,-1689.6537,13.5145);
    TogglePlayerControllable(playerid, 1);}
    case 1:{
    new tmpcar = GetPlayerVehicleID(playerid);
    SetVehiclePos(tmpcar, 1937.1121,-1774.4595,13.3828);
    SetPlayerPos(playerid,1937.1121,-1774.4595,13.3828);
    TogglePlayerControllable(playerid, 1);}
    case 2:{
    new tmpcar = GetPlayerVehicleID(playerid);
    SetVehiclePos(tmpcar, 1656.8973,-1706.7909,15.6094);
    SetPlayerPos(playerid,1656.8973,-1706.7909,15.6094);
    TogglePlayerControllable(playerid, 1);}
    case 3:{
    new tmpcar = GetPlayerVehicleID(playerid);
    SetVehiclePos(tmpcar, 1549.9364,-1675.7362,15.1872);
    SetPlayerPos(playerid,1549.9364,-1675.7362,15.1872);
    TogglePlayerControllable(playerid, 1);}
    case 4:{
    new tmpcar = GetPlayerVehicleID(playerid);
    SetVehiclePos(tmpcar, 1365.0520,-1279.8701,13.5469);
    SetPlayerPos(playerid,1365.0520,-1279.8701,13.5469);
    TogglePlayerControllable(playerid, 1);}
    case 5:{
    new tmpcar = GetPlayerVehicleID(playerid);
    SetVehiclePos(tmpcar, 1200.3815,-923.7845,43.0152);
    SetPlayerPos(playerid,1200.3815,-923.7845,43.0152);
    TogglePlayerControllable(playerid, 1);}
    case 6:{
    new tmpcar = GetPlayerVehicleID(playerid);
    SetVehiclePos(tmpcar, 1035.7764,-1032.2292,31.9555);
    SetPlayerPos(playerid,1035.7764,-1032.2292,31.9555);
    TogglePlayerControllable(playerid, 1);}




    }
    }
    return 1;
    }



    //ON MENU EXIT
    public OnPlayerExitedMenu(playerid)
    {
    new Menu:Current = GetPlayerMenu(playerid);
    if( Current == Teleports){
    TogglePlayerControllable(playerid,1);}


    return 1;
    }


    Teste es einfach mal ;)
    Gebe aber keine Garantie habs ausem Topf geschrieben ;)

  • Jo Danke ;D Funktioniert ..D
    nur wenn ich mich teleportiert habe,
    bin ich auf dem dach von dem auto ;(?


    EDIT// Okey Ich Habe Den Fehler Endeckt Undzw Stand Hier;


    case 0:{
    new tmpcar = GetPlayerVehicleID(playerid);
    SetVehiclePos(tmpcar, 2482.4836,-1689.6537,13.5145);
    SetVehiclePos(playerid, 2482.4836,-1689.6537,13.5145);
    TogglePlayerControllable(playerid, 1);}



    Das:



    SetVehiclePos(playerid, 2482.4836,-1689.6537,13.5145);


    habe ich weg gemacht weil der player dann ja dann kommt und das auto :D


    jetzt geht es :D


    EDIT//2
    Ok Noch Ein Problem...
    Jetzt Kommt Der Player Nicht Mehr,
    SOndern Das Auto Teleportiert Sich Dahin xD

    Einmal editiert, zuletzt von Caglar ()

  • naja kannst du es mir machen ?
    ich kenn mich mit sowas nicht aus ;(
    wenn ja hier ist nochmal mein script.
    also der ganz normale;


    #include <a_samp>


    #define COLOR_YELLOW 0xFFFF00AA


    new Menu:Teleports;


    public OnPlayerConnect(playerid)
    {
    SendClientMessage(playerid, COLOR_YELLOW, "");
    return 1;
    }
    public OnPlayerCommandText(playerid, cmdtext[])
    {


    if (strcmp("/LS",cmdtext, true, 10)==0)
    {
    Teleports = CreateMenu("TELEPORTS",2,200,100,150,100);
    AddMenuItem(Teleports, 0, "Groove Street");
    AddMenuItem(Teleports, 0, "Tankstelle");
    AddMenuItem(Teleports, 0, "Autohaus");
    AddMenuItem(Teleports, 0, "Polizei Station");
    AddMenuItem(Teleports, 0, "Waffen Laden");
    AddMenuItem(Teleports, 0, "BSN");
    AddMenuItem(Teleports, 0, "Tuning Werkstatt");
    ShowMenuForPlayer(Teleports, playerid);
    TogglePlayerControllable(playerid, 0);
    return 1;
    }
    return 0;
    }
    public OnPlayerSelectedMenuRow(playerid, row)
    {


    new Menu:Current = GetPlayerMenu(playerid);
    //Teleports
    if (Current == Teleports)
    {
    switch(row) {


    case 0:{
    new tmpcar = GetPlayerVehicleID(playerid);
    SetVehiclePos(tmpcar, 2482.4836,-1689.6537,13.5145);
    SetPlayerPos(playerid,2482.4836,-1689.6537,13.5145);
    TogglePlayerControllable(playerid, 1);}
    case 1:{
    new tmpcar = GetPlayerVehicleID(playerid);
    SetVehiclePos(tmpcar, 1937.1121,-1774.4595,13.3828);
    SetPlayerPos(playerid,1937.1121,-1774.4595,13.3828);
    TogglePlayerControllable(playerid, 1);}
    case 2:{
    new tmpcar = GetPlayerVehicleID(playerid);
    SetVehiclePos(tmpcar, 1656.8973,-1706.7909,15.6094);
    SetPlayerPos(playerid,1656.8973,-1706.7909,15.6094);
    TogglePlayerControllable(playerid, 1);}
    case 3:{
    new tmpcar = GetPlayerVehicleID(playerid);
    SetVehiclePos(tmpcar, 1549.9364,-1675.7362,15.1872);
    SetPlayerPos(playerid,1549.9364,-1675.7362,15.1872);
    TogglePlayerControllable(playerid, 1);}
    case 4:{
    new tmpcar = GetPlayerVehicleID(playerid);
    SetVehiclePos(tmpcar, 1365.0520,-1279.8701,13.5469);
    SetPlayerPos(playerid,1365.0520,-1279.8701,13.5469);
    TogglePlayerControllable(playerid, 1);}
    case 5:{
    new tmpcar = GetPlayerVehicleID(playerid);
    SetVehiclePos(tmpcar, 1200.3815,-923.7845,43.0152);
    SetPlayerPos(playerid,1200.3815,-923.7845,43.0152);
    TogglePlayerControllable(playerid, 1);}
    case 6:{
    new tmpcar = GetPlayerVehicleID(playerid);
    SetVehiclePos(tmpcar, 1035.7764,-1032.2292,31.9555);
    SetPlayerPos(playerid,1035.7764,-1032.2292,31.9555);
    TogglePlayerControllable(playerid, 1);}




    }
    }
    return 1;
    }



    //ON MENU EXIT
    public OnPlayerExitedMenu(playerid)
    {
    new Menu:Current = GetPlayerMenu(playerid);
    if( Current == Teleports){
    TogglePlayerControllable(playerid,1);}


    return 1;
    }