Paar Script fragen

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


    1.)Frage Wie erstelle ich eine neue Fraktion (kein GF Script ich mache eigenen)
    2.)Wie mach ich z.B den Befehl /help
    3.)Wie kann ich die Kameraansich ändern also beim spawnen will anderen Spawnplatz




    mfg.Waldi


    p.s Danke

  • [wiki]OnPlayerRequestClass[/wiki], darin folgende Funktionen aufrufen:


    [wiki]SetPlayerPos[/wiki] - Spieler Position ändern
    [wiki]SetPlayerCameraPos[/wiki] - Kamera Position ändern
    [wiki]SetPlayerCameraLookAt[/wiki] - Kamera-"Blickrichtung" ändern

    Intel Xeon W3690 Hexacore @ 4.5 GHz - 48GB Triple Channel DDR3 - GeForce RTX 2070 Super - Asus P6T Deluxe V1 @ P6T WS Pro BIOS

    Mainboard 12 Jahre, CPU 10 Jahre alt - old but gold!

  • if(classid == 0) was is daran falsch (gTeam) error:
    C:\Dokumente und Einstellungen\fell\Desktop\Waldi\LVRP\gamemodes\GM.pwn(67) : warning 225: unreachable code
    Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase



    1 Warning.

  • #include <a_samp>
    static gTeam[MAX_PLAYERS];
    #define TEAM_Biker 2
    #define TEAM_COPS 1
    #define blau 0x33AAFFAA
    #define COLOR_GREY 0xBEBEBEAA
    #define COLOR_WHITE 0xFFFFFFAA
    #define COLOR_GREEN 0x33AA33AA
    #define COLOR_GRAD5 0xE3E3E3FF
    #define COLOR_GRAD1 0xB4B5B7FF
    #define COLOR_YELLOW 0xFFFF00AA



    public OnFilterScriptInit()
    {
    print("\n--------------------------------------");
    print(" |Dorf|Reallife| by Waldi");
    print("--------------------------------------\n");
    return 1;
    }


    public OnFilterScriptExit()
    {
    return 1;
    }



    public OnGameModeInit()
    {
    SetGameModeText("Blank Script");
    AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
    //-----------------------Cars-----------------------------------//
    AddStaticVehicle(463,329.3150,-44.5616,1.0560,93.8002,125,125); // bikergang
    AddStaticVehicle(463,329.2610,-46.2688,1.0533,88.0368,125,125); // bikergang
    AddStaticVehicle(463,329.0899,-47.8094,1.0532,90.9776,125,125); // bikergang
    AddStaticVehicle(463,329.0309,-49.4808,1.0507,94.4550,125,125); // bikergang
    AddStaticVehicle(463,328.9554,-51.1017,1.0498,90.3637,125,125); // bikergang
    AddStaticVehicle(463,328.8583,-52.7996,1.0496,92.9790,125,125); // bikergang
    AddStaticVehicle(463,328.8426,-54.2901,1.0472,87.8804,125,125); // bikergang
    AddStaticVehicle(579,333.8526,-35.8094,1.4019,89.6096,125,125); // bikergang
    AddStaticVehicle(579,333.9219,-32.4778,1.4022,89.2319,125,125); // bikergang
    AddStaticVehicle(571,308.9101,-43.1813,0.8436,0.5755,125,125); // bikergang
    AddStaticVehicle(571,311.8344,-43.2515,0.8446,357.3977,125,125); // bikergang
    AddStaticVehicle(586,310.3597,-46.3480,1.0983,181.9723,125,125); // bikergang
    AddStaticVehicle(586,312.0049,-46.5342,1.0980,181.1982,125,125); // bikergang
    AddStaticVehicle(586,313.8733,-46.3633,1.0984,183.9691,125,125); // bikergang
    AddStaticVehicle(586,315.4269,-46.4567,1.0980,185.3183,125,125); // bikergang
    AddStaticVehicle(586,317.0502,-46.4121,1.0983,182.5962,125,125); // bikergang
    AddStaticVehicle(471,335.6248,-56.7554,0.9756,88.8786,125,125); // bikergang
    AddStaticVehicle(471,335.6596,-59.6258,0.9901,88.3646,125,125); // bikergang


    return 1;
    }


    public OnGameModeExit()
    {
    return 1;
    }


    public OnPlayerRequestClass(playerid, classid)
    {
    SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
    SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
    SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
    return 1;

    if(classid == 0)
    {
    gTeam[playerid] = TEAM_COPS;
    }
    if(classid == 1)
    {
    gTeam[playerid] = TEAM_Biker;
    }
    return 1;


  • public OnPlayerRequestClass(playerid, classid)
    {
    SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
    SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
    SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
    if(classid == 0)
    {
    gTeam[playerid] = TEAM_COPS;
    }
    if(classid == 1)
    {
    gTeam[playerid] = TEAM_Biker;
    }
    return 1;


    Mit freundlichen Grüßen


    Einstein