Fraktion Fahrschule

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
  • Hallo Leute..


    Ich suche ein Script für die Fahrschule. Währe echt hilfreich, sollten Fahrlehrer sein keine Theorieprüfungen :love:


    Commands sollten /invite /uninvite /givelicense auto /givelicense angelschein /givelicense boot /givelicense helicopter /giverank


    sein. Ich habe überall gegoogelt und nirgendsgefunden danke für eure Hilfe
    Mfg Fuldara.


  • forward IsAnInstructor(playerid);



    new JoinPed
    {59}, // FAHRSCHULE 1 //Skins
    {60}, // FAHRSCHULE 2
    {150}, // FAHRSCHULE 3
    {76}, // FAHRSCHULE 4



    Public SetPlayerSpawn
    if(IsAnInstructor(playerid)) //Fahrschule spawn
    {
    if(SchoolSpawn[playerid] == 0)
    {
    SetPlayerToTeamColor(playerid);
    SetPlayerPos(playerid,-2032.4591,-99.6813,35.1641);
    SetPlayerFacingAngle(playerid,4.7173);
    SetPlayerInterior(playerid,0);
    PlayerInfo[playerid][pInt] = 0;
    }
    else if(SchoolSpawn[playerid] == 1)
    {
    SetPlayerToTeamColor(playerid);
    SetPlayerPos(playerid, 414.4144,2531.9580,19.1565);
    SetPlayerFacingAngle(playerid, 4.6505);
    SetPlayerInterior(playerid,0);
    PlayerInfo[playerid][pInt] = 0;
    }
    return 1;
    }


    public IsAnInstructor(playerid)
    {
    if(IsPlayerConnected(playerid)) //Fahrschulfunktion
    {
    new leader = PlayerInfo[playerid][pLeader];
    new member = PlayerInfo[playerid][pMember];
    if(member==11) //11 = FraktionsID
    {
    return 1;
    }
    if(leader==11) //11 = FraktionsID
    {
    return 1;
    }
    }
    return 0;
    }


    else if(IsAnInstructor(targetid))//Ränge
    {
    if(PlayerInfo[targetid][pRank] == 1) { rtext = "Trainee"; }
    else if(PlayerInfo[targetid][pRank] == 2) { rtext = "Instructor"; }
    else if(PlayerInfo[targetid][pRank] == 3) { rtext = "Senior Instructor"; }
    else if(PlayerInfo[targetid][pRank] == 4) { rtext = "Manager"; }
    else if(PlayerInfo[targetid][pRank] == 5) { rtext = "Under Boss"; }
    else if(PlayerInfo[targetid][pRank] == 6) { rtext = "Boss"; }
    else { rtext = "Trainee"; }
    }


    if(strcmp(cmd, "/givelicense", true) == 0)
    {
    if(IsPlayerConnected(playerid))
    {
    if(IsAnInstructor(playerid))
    {
    if(PlayerInfo[playerid][pRank] < 2)
    {
    SendClientMessage(playerid, COLOR_GREY, "Nur mit Rang 2 oder höher kann man Lizenzen ausstellen !");
    return 1;
    }
    new x_nr[256];
    x_nr = strtok(cmdtext, idx);
    if(!strlen(x_nr)) {
    SendClientMessage(playerid, COLOR_WHITE, "BENUTZUNG: /givelicense driving [playerid/Name]");
    SendClientMessage(playerid, COLOR_WHITE, "Scheine: Driving, Flying, Sailing, Fishing, Weapon.");
    return 1;
    }
    if(strcmp(x_nr,"driving",true) == 0)
    {
    tmp = strtok(cmdtext, idx);
    if(!strlen(tmp))
    {
    SendClientMessage(playerid, COLOR_WHITE, "Benutze: /givelicense driverslicense [playerid");
    return 1;
    }
    giveplayerid = ReturnUser(tmp);
    if(IsPlayerConnected(giveplayerid))
    {
    if(giveplayerid != INVALID_PLAYER_ID)
    {
    GetPlayerName(playerid, sendername, sizeof(sendername));
    GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
    format(string, sizeof(string), "* Du hast %s eine Fahrlicense gegeben..",giveplayer);
    SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
    format(string, sizeof(string), "* Lehrer %s hat dir eine Fahrlicense gegeben.",sendername);
    SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
    PlayerInfo[giveplayerid][pCarLic] = 1;
    return 1;
    }
    }
    else
    {
    SendClientMessage(playerid, COLOR_GREY, " Der Spieler ist Offline !");
    return 1;
    }
    }
    else if(strcmp(x_nr,"flying",true) == 0)
    {
    tmp = strtok(cmdtext, idx);
    if(!strlen(tmp))
    {
    SendClientMessage(playerid, COLOR_WHITE, "Benutze: /givelicense flyinglicense [playerid/PartOfName]");
    return 1;
    }
    giveplayerid = ReturnUser(tmp);
    if(IsPlayerConnected(giveplayerid))
    {
    if(giveplayerid != INVALID_PLAYER_ID)
    {
    GetPlayerName(playerid, sendername, sizeof(sendername));
    GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
    format(string, sizeof(string), "* Du hast %s eine Fluglicense gegeben.",giveplayer);
    SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
    format(string, sizeof(string), "*Lehrer %s hat dir eine Fluglicense gegeben.",sendername);
    SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
    PlayerInfo[giveplayerid][pFlyLic] = 1;
    return 1;
    }
    }
    else
    {
    SendClientMessage(playerid, COLOR_GREY, " Der Spieler ist Offline !");
    return 1;
    }
    }
    else if(strcmp(x_nr,"sailing",true) == 0)
    {
    tmp = strtok(cmdtext, idx);
    if(!strlen(tmp))
    {
    SendClientMessage(playerid, COLOR_WHITE, "Benutze: /givelicense sailinglicense [playerid");
    return 1;
    }
    giveplayerid = ReturnUser(tmp);
    if(IsPlayerConnected(giveplayerid))
    {
    if(giveplayerid != INVALID_PLAYER_ID)
    {
    GetPlayerName(playerid, sendername, sizeof(sendername));
    GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
    format(string, sizeof(string), "* Du hast %s eine BootsLicense gegeben.",giveplayer);
    SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
    format(string, sizeof(string), "* Lehrer %s hat dir eine BootsLicense gegeben.",sendername);
    SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
    PlayerInfo[giveplayerid][pBoatLic] = 1;
    return 1;
    }
    }
    else
    {
    SendClientMessage(playerid, COLOR_GREY, " Der Spieler ist Offline !");
    return 1;
    }
    }
    else if(strcmp(x_nr,"fishing",true) == 0)
    {
    tmp = strtok(cmdtext, idx);
    if(!strlen(tmp))
    {
    SendClientMessage(playerid, COLOR_WHITE, "Benutze: /givelicense fishinglicense [playerid");
    return 1;
    }
    giveplayerid = ReturnUser(tmp);
    if(IsPlayerConnected(giveplayerid))
    {
    if(giveplayerid != INVALID_PLAYER_ID)
    {
    GetPlayerName(playerid, sendername, sizeof(sendername));
    GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
    format(string, sizeof(string), "* Du hast %s eine AngelLicense gegeben.",giveplayer);
    SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
    format(string, sizeof(string), "* Lehrer %s hat dir eine Angel License gegeben.",sendername);
    SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
    PlayerInfo[giveplayerid][pFishLic] = 1;
    return 1;
    }
    }
    else
    {
    SendClientMessage(playerid, COLOR_GREY, " Der Spieler ist Offline !");
    return 1;
    }
    }
    else if(strcmp(x_nr,"LKW",true) == 0)
    {
    tmp = strtok(cmdtext, idx);
    if(!strlen(tmp))
    {
    SendClientMessage(playerid, COLOR_WHITE, "Benutze: /givelicense fishinglicense [playerid");
    return 1;
    }
    giveplayerid = ReturnUser(tmp);
    if(IsPlayerConnected(giveplayerid))
    {
    if(giveplayerid != INVALID_PLAYER_ID)
    {
    GetPlayerName(playerid, sendername, sizeof(sendername));
    GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
    format(string, sizeof(string), "* Du hast %s ein LKW schein gegeben.",giveplayer);
    SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
    format(string, sizeof(string), "* Lehrer %s hat dir ein LKW Schein gegeben.",sendername);
    SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
    PlayerInfo[giveplayerid][pLKWLic] = 1;
    return 1;
    }
    }
    else
    {
    SendClientMessage(playerid, COLOR_GREY, " Der Spieler ist Offline !");
    return 1;
    }
    }
    else if(strcmp(x_nr,"Motorad",true) == 0)
    {
    tmp = strtok(cmdtext, idx);
    if(!strlen(tmp))
    {
    SendClientMessage(playerid, COLOR_WHITE, "Benutze: /givelicense fishinglicense [playerid");
    return 1;
    }
    giveplayerid = ReturnUser(tmp);
    if(IsPlayerConnected(giveplayerid))
    {
    if(giveplayerid != INVALID_PLAYER_ID)
    {
    GetPlayerName(playerid, sendername, sizeof(sendername));
    GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
    format(string, sizeof(string), "* Du hast %s ein Motorad Schein gegeben.",giveplayer);
    SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
    format(string, sizeof(string), "* Lehrer %s hat dir ein Motorad Schein gegeben.",sendername);
    SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
    PlayerInfo[giveplayerid][pMotoLic] = 1;
    return 1;
    }
    }
    else
    {
    SendClientMessage(playerid, COLOR_GREY, " Der Spieler ist Offline !");
    return 1;
    }
    }
    else if(strcmp(x_nr,"weapon",true) == 0)
    {
    tmp = strtok(cmdtext, idx);
    if(!strlen(tmp))
    {
    SendClientMessage(playerid, COLOR_WHITE, "Benutze: /givelicense weaponlicense [playerid/PartOfName]");
    return 1;
    }
    giveplayerid = ReturnUser(tmp);
    if(IsPlayerConnected(giveplayerid))
    {
    if(giveplayerid != INVALID_PLAYER_ID)
    {
    GetPlayerName(playerid, sendername, sizeof(sendername));
    GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
    format(string, sizeof(string), "* Du hast %s eine Waffen License gegeben.",giveplayer);
    SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
    format(string, sizeof(string), "* Lehrer %s hat dir eine Waffenlicense gegeben.",sendername);
    SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
    PlayerInfo[giveplayerid][pGunLic] = 1;
    return 1;
    }
    }
    else
    {
    SendClientMessage(playerid, COLOR_GREY, " Der Spieler ist Offline !");
    return 1;
    }
    }
    }
    else
    {
    SendClientMessage(playerid, COLOR_GREY, " Du bist kein Fahrlehrer !");
    return 1;
    }
    }
    return 1;
    }


    Mh zulang , watch @ your pm :D