NPC Hilfe.

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,


    Kann einer mir diese Bots richtig erstellen ? Die spawnen, aber machen nichts. Ich hab ihr bei den tuts nach geschaut, aber ich habe es nicht hingekriegt. Also ich hoffe ihr könnt das für mich machen, das sie sich einloggen und den Führerschein haben.


    Ich bitte um Hilfe.


    MfG


    Eno25 aka Enes


    #include <a_samp>


    #include <a_npc>




    new Coach1;


    new Coach2;


    new Barracks;


    new LSPDcar;


    new Ambulance;


    new Ambulanceheli;


    new Firetruck;


    new Hunter;


    new PDbike;


    new Train;


    new Infernus;


    new Sultan;


    new AT400;




    public OnGameModeInit()


    {


    ConnectNPC("Mike","busbot");


    ConnectNPC("Tom","busbot2");


    ConnectNPC("Andrew","barracksbot");


    ConnectNPC("Johnson","copcarbot");


    ConnectNPC("Anderson","ertbot");


    ConnectNPC("Mathew","erthelicopterbot");


    ConnectNPC("Davidson","firetruckbot");


    ConnectNPC("Moralles","hunterbot");


    ConnectNPC("Yards","policebikebot");


    ConnectNPC("Kelroy","trainbot");


    ConnectNPC("Sarah","infbot");


    ConnectNPC("Michael","sultanbot1");


    ConnectNPC("Roy","at400bot");




    Coach1 = AddStaticVehicle(437, 2109.1763, 1503.0453, 32.2887, 82.2873, 0, 1);


    Coach2 = AddStaticVehicle(437, 2109.1763, 1503.0453, 32.2887, 82.2873, 0, 1);


    Barracks = AddStaticVehicle(433, 2109.1763, 1503.0453, 32.2887, 82.2873, 0, 1);


    LSPDcar = AddStaticVehicle(596, 2109.1763, 1503.0453, 32.2887, 82.2873, 0, 1);


    Ambulance = AddStaticVehicle(416, 2109.1763, 1503.0453, 32.2887, 82.2873, 3, 6);


    Ambulanceheli = AddStaticVehicle(563, 2109.1763, 1503.0453, 32.2887, 82.2873, 3, 6);


    Firetruck = AddStaticVehicle(407, 2109.1763, 1503.0453, 32.2887, 82.2873, 6, 3);


    Hunter = AddStaticVehicle(425, 2109.1763, 1503.0453, 32.2887, 82.2873, 0, 0);


    PDbike = AddStaticVehicle(523, 2109.1763, 1503.0453, 32.2887, 82.2873, 0, 1);


    Train = AddStaticVehicle(538, 2109.1763, 1503.0453, 32.2887, 82.2873, 0, 1);


    Infernus = AddStaticVehicle(411, 2109.1763, 1503.0453, 32.2887, 82.2873, 3, 3);


    Sultan = AddStaticVehicle(560, 2109.1763, 1503.0453, 32.2887, 82.2873, 0, 0);


    AT400 = AddStaticVehicle(577, 2109.1763, 1503.0453, 32.2887, 82.2873, 1, 3);




    }




    public OnPlayerSpawn(playerid)


    {


    if(!IsPlayerNPC(playerid)) return 0;




    new playername[64];


    GetPlayerName(playerid,playername,64);




    if(!strcmp(playername,"Mike",true)) {


    PutPlayerInVehicle(playerid, Coach1, 0);



    }


    else if(!strcmp(playername,"Tom",true)) {


    PutPlayerInVehicle(playerid, Coach2, 0);


    }


    else if(!strcmp(playername,"Andrew",true)) {


    PutPlayerInVehicle(playerid, Barracks, 0);


    }


    else if(!strcmp(playername,"Johnson",true)) {


    PutPlayerInVehicle(playerid, LSPDcar, 0);


    }


    else if(!strcmp(playername,"Anderson",true)) {


    PutPlayerInVehicle(playerid, Ambulance, 0);


    }


    else if(!strcmp(playername,"Mathew",true)) {


    PutPlayerInVehicle(playerid, Ambulanceheli, 0);


    }


    else if(!strcmp(playername,"Davidson",true)) {


    PutPlayerInVehicle(playerid, Firetruck, 0);


    }


    else if(!strcmp(playername,"Moralles",true)) {


    PutPlayerInVehicle(playerid, Hunter, 0);


    }


    else if(!strcmp(playername,"Yards",true)) {


    PutPlayerInVehicle(playerid, PDbike, 0);


    }


    else if(!strcmp(playername,"Kelroy",true)) {


    PutPlayerInVehicle(playerid, Train, 0);


    }


    else if(!strcmp(playername,"Sarah",true)) {


    PutPlayerInVehicle(playerid, Infernus, 0);


    }


    else if(!strcmp(playername,"Michael",true)) {


    PutPlayerInVehicle(playerid, Sultan, 0);


    }


    else if(!strcmp(playername,"Roy",true)) {


    PutPlayerInVehicle(playerid, AT400, 0);


    }


    return 1;


    }