Beiträge von Soak

    Hi,
    ich finde das gm echt gut allerdings funktioniert es nicht so ganz:
    Fragen 1: Wo sollen die accounts gespeichert werden?
    hier: Server/
    hier: Server/Scriptfiles/
    oder hier: server/scriptfiles/user/


    und dan z.b. soak.dudb.sav.


    Frage 2: Und in den Script ist die /reg funktion mit /* und */ makiert das habe ich weg gemacht und wie kann ich das jetzt einstellen das das funktioniert?

    Hi,
    ich habe ein Bus Bot erstellt.
    habe mir ein paar Tuts angeschauen aber das klapt nicht so wie ich eis möchte.

    #include <a_npc>


    new gStoppedForTraffic = 0;
    new gPlaybackActive = 0;


    public ScanTimer();


    #define AHEAD_OF_CAR_DISTANCE 11.0
    #define SCAN_RADIUS 11.0


    //------------------------------------------


    main(){}


    //------------------------------------------


    stock GetXYInfrontOfMe(Float:distance, &Float:x, &Float:y)
    {
    new Float:z, Float:angle;
    GetMyPos(x,y,z);
    GetMyFacingAngle(angle);
    x += (distance * floatsin(-angle, degrees));
    y += (distance * floatcos(-angle, degrees));
    }


    //------------------------------------------


    public OnNPCModeInit()
    {
    SetTimer("ScanTimer",200,1);
    }


    //------------------------------------------


    LookForAReasonToPause()
    {
    new Float:X,Float:Y,Float:Z;
    new x=0;

    GetMyPos(X,Y,Z);
    GetXYInfrontOfMe(AHEAD_OF_CAR_DISTANCE,X,Y);

    while(x!=MAX_PLAYERS) {
    if(IsPlayerConnected(x) && IsPlayerStreamedIn(x)) {
    if( GetPlayerState(x) == PLAYER_STATE_DRIVER ||
    GetPlayerState(x) == PLAYER_STATE_ONFOOT )
    {
    if(IsPlayerInRangeOfPoint(x,SCAN_RADIUS,X,Y,Z)) {
    return 1;
    }
    }
    }
    x++;
    }

    //new msg[256];
    //new Float:angle;
    //GetMyFacingAngle(angle);
    //format(msg,256,"My yaw/heading = %f",angle);
    //SendChat(msg);

    return 0;
    }



    //------------------------------------------


    public ScanTimer()
    {
    //new ticker = GetTickCount() - g_LastTick;
    //printf("npctest: timer (%d)ms", ticker);
    //g_LastTick = GetTickCount();

    new ReasonToPause = LookForAReasonToPause();

    if(ReasonToPause && !gStoppedForTraffic)
    {
    //SendChat("I'm pausing");
    PauseRecordingPlayback();
    gStoppedForTraffic = 1;
    }
    else if(!ReasonToPause && gStoppedForTraffic)
    {
    //SendChat("I'm resuming");
    ResumeRecordingPlayback();
    gStoppedForTraffic = 0;
    gPlaybackActive = 1;
    }
    }



    //------------------------------------------


    StartPlayback()
    {
    StartRecordingPlayback(PLAYER_RECORDING_TYPE_DRIVER,"bus_2");
    gStoppedForTraffic = 0;
    }


    //------------------------------------------


    public OnRecordingPlaybackEnd()
    {
    StartPlayback();
    }


    //------------------------------------------


    public OnNPCEnterVehicle(vehicleid, seatid)
    {
    StartPlayback();
    }


    //------------------------------------------


    public OnNPCExitVehicle()
    {
    StopRecordingPlayback();
    }


    //------------------------------------------

    Und da kommt immer diese Fehler meldung:

    Code
    C:\DOKUME~1\Besitzer\Desktop\SA-RL\Server\npcmodes\Bus_2.pwn(87) : warning 204: symbol is assigned a value that is never used: "gPlaybackActive"
    Pawn compiler 3.2.3664	 	 	Copyright (c) 1997-2006, ITB CompuPhase
    
    
    1 Warning.


    in der gl_npcs.pwn datein habe es geändert was ich brauche und record hab ich auch gemacht.


    Hoffe ihr könnt mir da hefen.