3. Gang spawnt an der 2. Gang Base

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
  • Guten Tag, ich wollte in mein Script eine 3. Gang, die Grove Street einbauen.
    Alles klappt mit den Skins etc, jedoch spawnen diese an der Triaden Base.



    //Yakuza AddPlayerClass(186, -2462.8484, 132.6171, 35.1719, 0, 0, 0, 0, 0, 0, 0); AddPlayerClass(122, -2462.8484, 132.6171, 35.1719, 0, 0, 0, 0, 0, 0, 0); AddPlayerClass(123, -2462.8484, 132.6171, 35.1719, 0, 0, 0, 0, 0, 0, 0); AddPlayerClass(224, -2462.8484, 132.6171, 35.1719, 0, 0, 0, 0, 0, 0, 0); AddPlayerClass(228, -2462.8484, 132.6171, 35.1719, 0, 0, 0, 0, 0, 0, 0);
    //Triaden AddPlayerClass(117, -2719.7712, -318.7074, 7.8438, 0, 0, 0, 0, 0, 0, 0); AddPlayerClass(120, -2719.7712, -318.7074, 7.8438, 0, 0, 0, 0, 0, 0, 0); AddPlayerClass(169, -2719.7712, -318.7074, 7.8438, 0, 0, 0, 0, 0, 0, 0); AddPlayerClass(203, -2719.7712, -318.7074, 7.8438, 0, 0, 0, 0, 0, 0, 0); AddPlayerClass(294, -2719.7712, -318.7074, 7.8438, 0, 0, 0, 0, 0, 0, 0); //GSF AddPlayerClass(105, -2119.6999, -195.0000, 35.0000, 0, 0, 0, 0, 0, 0, 0); AddPlayerClass(106, -2119.6999, -195.0000, 35.0000, 0, 0, 0, 0, 0, 0, 0); AddPlayerClass(107, -2119.6999, -195.0000, 35.0000, 0, 0, 0, 0, 0, 0, 0); AddPlayerClass(269, -2119.6999, -195.0000, 35.0000, 0, 0, 0, 0, 0, 0, 0); AddPlayerClass(271, -2119.6999, -195.0000, 35.0000, 0, 0, 0, 0, 0, 0, 0);


    Also die GSF Skins spawnen nicht an den Koordinaten, wo angegeben, sondern an den Triadenspawns


    Vllt kann man das auch noch brauchen


    public OnPlayerRequestClass(playerid, classid){ SetPlayerPos(playerid, 487.9458, -5.9515, 1002.0867); SetPlayerFacingAngle(playerid, 180); SetPlayerInterior(playerid, 17); SetPlayerCameraPos(playerid, 487.8283, -11.4869, 1001.7832); SetPlayerCameraLookAt(playerid, 487.8446, -10.4885, 1001.7479); switch(classid) { case 0,1,2,3,4: Team[playerid] = 1; default: Team[playerid] = 0; }
    if(classid == 0 || classid == 1 || classid == 2 || classid == 3 || classid == 4) { SetPlayerColor(playerid, COLOR_GREY); GameTextForPlayer(playerid, "~w~Yakuza", 1500, 6); } else if(classid == 5 || classid == 6 || classid == 7 || classid == 8 || classid == 9) { SetPlayerColor(playerid, COLOR_BLUE); GameTextForPlayer(playerid, "~b~Triaden", 1500, 6); } else if(classid == 10 || classid == 11 || classid == 12 || classid == 13 || classid == 14) { SetPlayerColor(playerid, COLOR_GSF); GameTextForPlayer(playerid, "~g~Grove Street", 1500, 6); } return 1;}


  • public OnPlayerRequestClass(playerid, classid)
    {
    SetPlayerPos(playerid, 487.9458, -5.9515, 1002.0867);
    SetPlayerFacingAngle(playerid, 180); SetPlayerInterior(playerid, 17);
    SetPlayerCameraPos(playerid, 487.8283, -11.4869, 1001.7832);
    SetPlayerCameraLookAt(playerid, 487.8446, -10.4885, 1001.7479);
    switch(classid) {
    case 0,1,2,3,4: Team[playerid] = 1;
    default: Team[playerid] = 0;
    }
    if(classid == 0 || classid == 1 || classid == 2 || classid == 3 || classid == 4)
    {
    SetPlayerColor(playerid, COLOR_GREY);
    GameTextForPlayer(playerid, "~w~Yakuza", 1500, 6);
    }
    else if(classid == 5 || classid == 6 || classid == 7 || classid == 8 || classid == 9)
    {
    SetPlayerColor(playerid, COLOR_BLUE);
    GameTextForPlayer(playerid, "~b~Triaden", 1500, 6);
    }
    else if(classid == 10 || classid == 11 || classid == 12 || classid == 13 || classid == 14)
    {
    SetPlayerColor(playerid, COLOR_GSF);
    GameTextForPlayer(playerid, "~g~Grove Street", 1500, 6);
    }
    return 1;
    }

    1. Code mal übersichtlich.
    2. Hier ist kein SetPlayerPos bei den Triaden / Yakuza also ist hier auch nicht die festlegung der Spawn Position.


    Kuck mal unter "OnPlayerSpawn" bzw sende diesen an uns.

  • public OnPlayerSpawn(playerid)
    {
    switch(InDM[playerid])
    {
    case 0:
    {
    if(Team[playerid] == 0)//Yakuza
    {
    SetPlayerPos(playerid, -2719.7712, -318.7074, 7.8438);
    }
    else if(Team[playerid] == 1)//Triaden
    {
    SetPlayerPos(playerid, -2462.8484, 132.6171, 35.1719);
    }
    else if(Team[playerid] == 2)//GSF
    {
    SetPlayerPos(playerid, -2119.6999, -195.0000, 35.0000);
    }
    SetPlayerInterior(playerid, 0);
    }
    case 1:
    {
    GivePlayerWeapon(playerid, 25, 300);
    GivePlayerWeapon(playerid, 24, 500);
    GivePlayerWeapon(playerid, 33, 150);
    new rand = random(sizeof(DM1Spawn));
    SetPlayerPos(playerid, DM1Spawn[rand][0], DM1Spawn[rand][1], DM1Spawn[rand][2]);
    SetPlayerInterior(playerid, 1);
    }
    case 2:
    {
    GivePlayerWeapon(playerid, 24, 500);
    GivePlayerWeapon(playerid, 25, 300);
    GivePlayerWeapon(playerid, 31, 1500);
    GivePlayerWeapon(playerid, 34, 250);
    new rand = random(sizeof(DM2Spawn));
    SetPlayerPos(playerid, DM2Spawn[rand][0], DM2Spawn[rand][1], DM2Spawn[rand][2]);
    SetPlayerInterior(playerid, 0);
    }
    case 3:
    {
    GivePlayerWeapon(playerid, 24, 500);
    GivePlayerWeapon(playerid, 25, 300);
    GivePlayerWeapon(playerid, 31, 1500);
    GivePlayerWeapon(playerid, 34, 250);
    new rand = random(sizeof(DM3Spawn));
    SetPlayerPos(playerid, DM3Spawn[rand][0], DM3Spawn[rand][1], DM3Spawn[rand][2]);
    SetPlayerInterior(playerid, 2);
    }
    case 4:
    {
    GivePlayerWeapon(playerid, 24, 500);
    new rand = random(sizeof(DeagleSpawn));
    SetPlayerPos(playerid, DeagleSpawn[rand][0], DeagleSpawn[rand][1], DeagleSpawn[rand][2]);
    SetPlayerInterior(playerid, 10);
    }
    case 5:
    {
    GivePlayerWeapon(playerid, 24, 500);
    new rand = random(sizeof(Spawn1o1));
    SetPlayerPos(playerid, Spawn1o1[rand][0], Spawn1o1[rand][1], Spawn1o1[rand][2]);
    SetPlayerInterior(playerid, 0);
    }
    }
    return 1;
    }