Beiträge von Nadja Iwanow

    Dann nimm statt dem Editor die Quellcode Funktion


    //EDIT
    Rechange:


    probier mal das aus:


    case 1:
    {
    new vehicleid = GetPlayerVehicleID(playerid);
    printf("Vehicleid: %i",vehicleid);
    if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 451)
    {
    if(hassiren[vehicleid] == 1)
    {
    DestroyObject(siren[vehicleid]);
    hassiren[vehicleid] = 0;
    }
    if(hassiren[vehicleid] == 0)
    {
    siren[vehicleid] = CreateObject( 19620,0,0,0,0,0,0,80 ); // <tURIZMO>
    AttachObjectToVehicle(siren[vehicleid], vehicleid, 0.000000, -0.519999, 0.556999, 0.000000, 0.000000, 0.000000);
    hassiren[vehicleid] = 1;
    }
    }
    }


    Und poste was in der console steht also "Vehicleid: ...

    Wird die Datei in der du das abspeicherst auch erstellt?
    bzw. erkläre uns mal was Spielerdatei ist, wo du deine sachen abspeicherst.
    Denn es sieht so aus als würdest du die daten nehmen und sie in der Variable Spieler datei zwischenspeichern.


    Probiere mal das:


    public OnPlayerDisconnect(playerid, reason)
    {
    new Float:X, Float:Y, Float:Z;
    GetPlayerPos(playerid, X, Y, Z);
    dini_FloatSet(PlayerPos.ini, "SpawnX", X);
    dini_FloatSet(PlayerPos.ini, "SpawnY", Y);
    dini_FloatSet(PlayerPos.ini, "SpawnZ", Z);
    print("Float:X= %d", X);
    print("Float:Y= %d", Y);
    print("Float:Z= %d", Z);
    return 1;
    }


    public OnPlayerSpawn(playerid)
    {
    new Float:X, Float:Y, FloatZ;
    X = dini_Float(PlayerPos.ini, "SpawnX"),
    Y = dini_Float(PlayerPos.ini, "SpawnY"),
    Z = dini_Float(PlayerPos.ini, "SpawnZ");
    SetPlayerPos(playerid, X, Y, Z);
    print("Float:X= %d", X);
    print("Float:Y= %d", Y);
    print("Float:Z= %d", Z);
    return 1;
    }


    Und das bei OnGameModeInit
    if!(dini_Exists("PlayerPos.ini"))
    {
    dini_Create("PlayerPos.ini");
    print("PlayerPos.ini wurde erstellt.");
    }

    Ok, ich verwende jetzt NPCs aber irgendwie klappt das bei mir nicht so recht...


    npcmode
    #define RECORDING "lifecoast_tut_run"
    #define RECORDING_TYPE 2


    #include <a_npc>
    main(){}
    public OnRecordingPlaybackEnd() StartRecordingPlayback(RECORDING_TYPE, RECORDING);


    #if RECORDING_TYPE == 1
    public OnNPCEnterVehicle(vehicleid, seatid) StartRecordingPlayback(RECORDING_TYPE, RECORDING);
    public OnNPCExitVehicle() StopRecordingPlayback();
    #else
    public OnNPCSpawn() StartRecordingPlayback(RECORDING_TYPE, RECORDING);
    #endif


    und wie er im GM verwendet wird:

    ConnectNPC("lifecoast_tut_run","lifecoast_tut_run"); //OnGameModeInit


    //OnPlayerConnect
    if(IsPlayerNPC(playerid))
    {
    new botname[MAX_PLAYER_NAME];
    GetPlayerName(playerid, botname, sizeof(botname));
    if(!strcmp(botname, "lifecoast_tut_run", true))
    {
    SpawnPlayer(playerid);
    }
    }
    //OnPlayerSpawn
    if(IsPlayerNPC(playerid))
    {

    new botname[MAX_PLAYER_NAME];
    GetPlayerName(playerid, botname, sizeof(botname));
    if(!strcmp(botname, "lifecoast_tut_run", true))
    {
    new npcname[MAX_PLAYER_NAME];
    GetPlayerName(playerid, npcname, sizeof(npcname));
    if(!strcmp(npcname, "lifecoast_tut_run", true))
    {
    SetPlayerSkin(playerid, 18); // <- The Skin here!
    }
    }
    }


    Console:
    [21:02:50] [npc:join] lifecoast_tut_run has joined the server (0:127.0.0.1)
    [21:03:01] [npc:part] lifecoast_tut_run has left the server (0:0)
    PS: ich würde den NPC amliebsten nur im Tut Spawnen und das am besten in einer VR

    case 13:


    {
    InterpolateCameraPos(playerid, 545.416076, -1772.326171, 8.179362, 547.233886, -1774.291870, 8.147984, 5000);
    InterpolateCameraLookAt(playerid, 548.811035, -1775.996459, 8.120770, 550.628845, -1777.962158, 8.089392, 5000);
    SetTimerEx("OnPlayerFinishInterpolateCamera", 5000-600, 0, "id", playerid, 14);
    PlayerTextDrawSetString(playerid, roleplay[playerid], "Version 0.1");
    for(new i = 0; i != 32; i++) SendClientMessage(playerid, -1, " ");


    }
    case 14:
    {
    InterpolateCameraPos(playerid, 550.013793, -1772.057128, 16.024028, 552.169799, -1772.079223, 16.285087, 5000);
    InterpolateCameraLookAt(playerid, 546.803894, -1768.331054, 15.122734, 548.959899, -1768.353149, 15.383792, 5000);
    //SetTimerEx("OnPlayerFinishInterpolateCamera", 5000-600, 0, "id", playerid, SpawnJoinedPlayer(playerid));
    TextDrawShowForPlayer(playerid, roleplaybox);
    for(new i = 0; i != 32; i++) SendClientMessage(playerid, -1, " ");
    return SpawnJoinedPlayer(playerid);
    }


    SpawnJoinedPlayer wird nicht aufgerufen


    stock SpawnJoinedPlayer(playerid)
    {
    TogglePlayerControllable(playerid, true);
    TogglePlayerSpectating(playerid, false);
    SetPlayerPos(playerid, 2221.6460, -1733.3965, 13.3983);
    }

    Hallo, ich möchte für mein Projekt gerne Passanten haben die durch LS Laufen/Fahren, ist dies mit der neuen Actor Funktion möglich, und wenn ja wie?
    Danke für eure hilfe.


    Yannik B.