OnPlayerSpawn Buggt

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 Community,


    Seit 2-3 Tagen beim Einloggen spawne ich auf der Farm in Blueberry, obwohl das nicht der Spawnpunkt ist. Wenn ich in einer Fraktion bin ist es genauso. Wie kann ich das beheben ?
    Ich poste mal mein OnPlayerSpawn.


    mfg Fabian_DeSanta



    public OnPlayerSpawn(playerid)
    {
    new string[128];
    SendClientMessage(playerid, GRÜN, "");
    SendClientMessage(playerid, GRÜN, "--------------------------------------------------------------------------------");
    format(string, sizeof(string), "Willkommen auf {FFCC00}Hollywood Street of Life{FFFFFF}, {FFFFFF}%s.",SpielerName(playerid));
    SendClientMessage(playerid, GELB,string);
    if(sSpieler[playerid][Adminlevel] == 1)
    {
    format(string, sizeof(string), "Suppoter: {FFFFFF}%s",SpielerName(playerid));
    SendClientMessage(playerid, GELB,string);
    }
    if(sSpieler[playerid][Adminlevel] == 2)
    {
    format(string, sizeof(string), "Moderator: {FFFFFF}%s",SpielerName(playerid));
    SendClientMessage(playerid, GELB,string);
    }
    if(sSpieler[playerid][Adminlevel] == 3)
    {
    format(string, sizeof(string), "Admin: {FFFFFF}%s",SpielerName(playerid));
    SendClientMessage(playerid, GELB,string);
    }
    if(sSpieler[playerid][Adminlevel] == 4)
    {
    format(string, sizeof(string), "Head-Admin: {FFFFFF}%s",SpielerName(playerid));
    SendClientMessage(playerid, GELB,string);
    }
    if(sSpieler[playerid][Adminlevel] == 5)
    {
    format(string, sizeof(string), "Projektleiter: {FFFFFF}%s",SpielerName(playerid));
    SendClientMessage(playerid, GELB,string);
    }
    if(sSpieler[playerid][Vipzeit] > 0 && sSpieler[playerid][Vip] > 0)
    {
    new days,hours,mins;
    new premiumzeit = sSpieler[playerid][Vipzeit];
    new restzeit= premiumzeit -gettime();
    days = floatround(restzeit / 86400,floatround_floor);
    hours = restzeit - (days * 86400);
    hours = floatround(hours / 3600,floatround_floor);
    mins = restzeit - ( (days * 86400) + (hours * 3600) );
    mins = floatround(mins / 60,floatround_floor);
    format(string, sizeof(string), "Verbleibende Premiumzeit: %d {FFFFFF}Tage.",days);
    SendClientMessage(playerid, GELB,string);
    }
    SendClientMessage(playerid, GRÜN, "---------------------------------------------------------------------------------");
    new house = sSpieler[playerid][Haus];
    if(sSpieler[playerid][Haus] == 255 && sSpieler[playerid][SpawnChange] == 1 && neuerspieler[playerid] == 1)
    {
    sSpieler[playerid][SpawnChange] = 0;
    }
    if(sSpieler[playerid][SpawnChange] == 1 && sSpieler[playerid][Haus] != 255 && neuerspieler[playerid] == 1 && InBehandlung[playerid] == 0 && sSpieler[playerid][Knast] == 0)
    {
    SetPlayerInterior(playerid,HouseInt_Interior[HouseInfo[house][hInteriorID]]);
    SetPlayerPos(playerid, HouseInt_Spawn_X[HouseInfo[house][hInteriorID]],HouseInt_Spawn_Y[HouseInfo[house][hInteriorID]],HouseInt_Spawn_Z[HouseInfo[house][hInteriorID]]);
    SetPlayerVirtualWorld(playerid, house);
    return 1;
    }
    if(sSpieler[playerid][Paintball] == 1)
    {
    SetPlayerPos(playerid,-975.975708,1060.983032,1345.671875);
    SetPlayerInterior(playerid,10);
    InBehandlung[playerid] = 0;
    GivePlayerWeapon(playerid,22,100);
    GivePlayerWeapon(playerid,25,100);
    GivePlayerWeapon(playerid,34,100);
    }
    if(InBehandlung[playerid] == 1)
    {
    TogglePlayerControllable(playerid, 0);
    SetPlayerPos(playerid, 50.2555,-190.4380,1404.8246);
    SetCameraBehindPlayer(playerid);
    SetPlayerFacingAngle(playerid,134.7829);
    SetTimerEx("BehandlungsInfo", 1000, false, "d", playerid);
    }
    if(sSpieler[playerid][Gangjail] == 1)
    {
    SetPlayerInterior(playerid, 0);
    SetPlayerPos(playerid, -230.5179,1506.8551,75.5625);
    SetCameraBehindPlayer(playerid);
    TogglePlayerControllable(playerid, 1);
    SendClientMessage(playerid, BLAU, " Du befindest dich noch im GangJail!");
    return 1;
    }
    if(sSpieler[playerid][Geschlecht] == 1)
    {
    SetPlayerSkin(playerid,29);
    sSpieler[playerid][Skin] = 29;
    SetPlayerColor(playerid,WEIS);
    return 1;
    }
    if(sSpieler[playerid][Geschlecht] == 2)
    {
    SetPlayerSkin(playerid,211);
    sSpieler[playerid][Skin] = 211;
    SetPlayerColor(playerid,WEIS);
    return 1;
    }
    if(pFirstLog[playerid] == true || neuerspieler[playerid] != 0)
    {
    SetPlayerPos(playerid,839.3776,-2062.0535,12.8672); // Tutorial Position
    SetPlayerCameraPos(playerid,794.2142,-2184.9741,31.8352);
    SetPlayerCameraLookAt(playerid,839.3776,-2062.0535,12.8672);
    SetPlayerFacingAngle(playerid,179.0452);
    TogglePlayerControllable(playerid,false);
    TutTime[playerid] = 1;
    TutTimer[playerid] = SetTimerEx("Tutorial",1000,1,"i",playerid);
    return 1;
    }
    if(sSpieler[playerid][Knast] == 1)
    {
    SendClientMessage(playerid,ROT,"Haftstrafe noch nicht abgessen!");
    SetPlayerPos(playerid,197.8290,161.8141,1003.0300);
    SetPlayerInterior(playerid,3);
    ResetPlayerWeapons(playerid);
    SetTimerEx("Gefaengnis",60000,0,"i",playerid);
    return 1;
    }
    if(sSpieler[playerid][Prison] == 1)
    {
    SendClientMessage(playerid,ROT,"Prisonzeit noch nicht abgessen!");
    SetPlayerPos(playerid, 271.1351,1858.3071,8.7578);
    SetPlayerInterior(playerid,0);
    ResetPlayerWeapons(playerid);
    SetTimerEx("Prisonzeit",60000,0,"i",playerid);
    return 1;
    }
    if(sSpieler[playerid][Leader] == 14 || sSpieler[playerid][Member] == 14) //Taxifahrer
    {
    SetPlayerPos(playerid,2564.0449,1044.0701,10.8203);
    SetPlayerFacingAngle(playerid,266.5267);
    SetCameraBehindPlayer(playerid);
    SetPlayerColor(playerid,GELB);
    SetPlayerSkin(playerid,189);
    GivePlayerWeapon(playerid,3,1);
    return 1;
    }
    if(sSpieler[playerid][Leader] == 6) //LSRD
    {
    if(sSpieler[playerid][Rank] == 13 || sSpieler[playerid][Rank] == 12)
    {
    SetPlayerColor(playerid,ROT);
    SetPlayerSkin(playerid,70);
    SetPlayerPos(playerid,34.0039,-200.8683,1404.8246);
    SetCameraBehindPlayer(playerid);
    GivePlayerWeapon(playerid,41,500);
    return 1;
    }
    }
    if(sSpieler[playerid][Member] == 6) //LSRD
    {
    if(sSpieler[playerid][Rank] == 1)
    {
    SetPlayerSkin(playerid,274);
    SetPlayerColor(playerid,ROT);
    SetPlayerPos(playerid,34.0039,-200.8683,1404.8246);
    SetCameraBehindPlayer(playerid);
    GivePlayerWeapon(playerid,41,500);
    return 1;
    }
    else if(sSpieler[playerid][Rank] == 2)
    {
    SetPlayerSkin(playerid,275);
    SetPlayerColor(playerid,ROT);
    SetPlayerPos(playerid,34.0039,-200.8683,1404.8246);
    SetCameraBehindPlayer(playerid);
    GivePlayerWeapon(playerid,41,500);
    return 1;
    }
    }
    if(sSpieler[playerid][Leader] == 1) //LSPD
    {
    if(sSpieler[playerid][Rank] == 13)
    {
    SetPlayerColor(playerid,BLAU);
    GivePlayerWeapon(playerid,24,250);
    GivePlayerWeapon(playerid,3,0);
    SetPlayerPos(playerid,219.5771,69.6547,1005.0391);
    SetCameraBehindPlayer(playerid);
    SetPlayerSkin(playerid,283);
    SetPlayerInterior(playerid,6);
    return 1;
    }
    else if(sSpieler[playerid][Rank] == 12)
    {
    SetPlayerSkin(playerid, 288);
    SetPlayerInterior(playerid,6);
    SetPlayerColor(playerid,BLAU);
    GivePlayerWeapon(playerid,24,250);
    GivePlayerWeapon(playerid,3,0);
    SetPlayerPos(playerid,219.5771,69.6547,1005.0391);
    SetCameraBehindPlayer(playerid);
    return 1;
    }
    }
    if(sSpieler[playerid][Member] == 1) //LSPD
    {
    if(sSpieler[playerid][Rank] == 1)
    {
    SetPlayerSkin(playerid, 281);
    SetPlayerInterior(playerid,6);
    SetPlayerColor(playerid,BLAU);
    GivePlayerWeapon(playerid,24,250);
    GivePlayerWeapon(playerid,3,0);
    SetPlayerPos(playerid,219.5771,69.6547,1005.0391);
    SetCameraBehindPlayer(playerid);
    return 1;
    }
    else if(sSpieler[playerid][Rank] == 2)
    {
    SetPlayerSkin(playerid, 280);
    SetPlayerInterior(playerid,6);
    SetPlayerColor(playerid,BLAU);
    GivePlayerWeapon(playerid,24,250);
    GivePlayerWeapon(playerid,3,0);
    SetPlayerPos(playerid,219.5771,69.6547,1005.0391);
    SetCameraBehindPlayer(playerid);
    return 1;
    }
    else if(sSpieler[playerid][Rank] == 3)
    {
    SetPlayerSkin(playerid, 267);
    SetPlayerInterior(playerid,6);
    SetPlayerColor(playerid,BLAU);
    GivePlayerWeapon(playerid,24,250);
    GivePlayerWeapon(playerid,3,0);
    SetPlayerPos(playerid,219.5771,69.6547,1005.0391);
    SetCameraBehindPlayer(playerid);
    return 1;
    }
    }
    if(sSpieler[playerid][Leader] == 5 || sSpieler[playerid][Member] == 5) //San News
    {
    SetPlayerColor(playerid,ORANGE);
    GivePlayerWeapon(playerid,43,9999);
    SetPlayerSkin(playerid,187);
    SetPlayerPos(playerid,996.7645,-1460.3590,13.5469);
    SetCameraBehindPlayer(playerid);
    return 1;
    }
    if(sSpieler[playerid][Leader] == 9) //Grove Street
    {
    SetPlayerColor(playerid,WEIS);
    GivePlayerWeapon(playerid,22,50);
    SetPlayerSkin(playerid,269);
    SetPlayerPos(playerid,2496.049804,-1695.238159,1014.742187);
    SetCameraBehindPlayer(playerid);
    SetPlayerInterior(playerid,3);
    return 1;
    }
    if(sSpieler[playerid][Leader] == 9 || sSpieler[playerid][Rank] == 12) //Grove Street
    {
    SetPlayerPos(playerid,2496.1577,-1709.3999,1014.7422);
    SetCameraBehindPlayer(playerid);
    SetPlayerInterior(playerid,3);
    SetPlayerColor(playerid,WEIS);
    GivePlayerWeapon(playerid,22,50);
    SetPlayerSkin(playerid, 270);
    return 1;
    }
    if(sSpieler[playerid][Member] == 9) //Grove Street
    {
    if(sSpieler[playerid][Rank] == 1)
    {
    SetPlayerSkin(playerid, 105);
    SetPlayerPos(playerid,2496.1577,-1709.3999,1014.7422);
    SetCameraBehindPlayer(playerid);
    SetPlayerInterior(playerid,3);
    SetPlayerColor(playerid,WEIS);
    GivePlayerWeapon(playerid,22,50);
    return 1;
    }
    else if(sSpieler[playerid][Rank] == 2)
    {
    SetPlayerSkin(playerid, 106);
    SetPlayerPos(playerid,2496.1577,-1709.3999,1014.7422);
    SetCameraBehindPlayer(playerid);
    SetPlayerInterior(playerid,3);
    SetPlayerColor(playerid,WEIS);
    GivePlayerWeapon(playerid,22,50);
    return 1;
    }
    else if(sSpieler[playerid][Rank] == 3)
    {
    SetPlayerPos(playerid,2496.1577,-1709.3999,1014.7422);
    SetCameraBehindPlayer(playerid);
    SetPlayerInterior(playerid,3);
    SetPlayerColor(playerid,WEIS);
    GivePlayerWeapon(playerid,22,50);
    SetPlayerSkin(playerid, 107);
    return 1;
    }
    else if(sSpieler[playerid][Rank] == 4)
    {
    SetPlayerPos(playerid,2496.1577,-1709.3999,1014.7422);
    SetCameraBehindPlayer(playerid);
    SetPlayerInterior(playerid,3);
    SetPlayerColor(playerid,WEIS);
    GivePlayerWeapon(playerid,22,50);
    SetPlayerSkin(playerid, 270);
    return 1;
    }
    else if(sSpieler[playerid][Geschlecht] == 2)
    {
    SetPlayerPos(playerid,2496.1577,-1709.3999,1014.7422);
    SetCameraBehindPlayer(playerid);
    SetPlayerInterior(playerid,3);
    SetPlayerColor(playerid,WEIS);
    GivePlayerWeapon(playerid,22,50);
    return 1;
    }
    }
    if(sSpieler[playerid][Leader] == 8) //Ballas
    {
    SetPlayerColor(playerid,WEIS);
    GivePlayerWeapon(playerid,22,50);
    SetPlayerSkin(playerid,104);
    SetPlayerPos(playerid,2809.1396,-1162.2145,1029.1646);
    SetCameraBehindPlayer(playerid);
    SetPlayerInterior(playerid,8);
    return 1;
    }
    if(sSpieler[playerid][Member] == 8) //Ballas
    {
    if(sSpieler[playerid][Rank] == 1)
    {
    SetPlayerPos(playerid,2809.1396,-1162.2145,1029.1646);
    SetCameraBehindPlayer(playerid);
    SetPlayerInterior(playerid,8);
    SetPlayerColor(playerid,WEIS);
    GivePlayerWeapon(playerid,22,50);
    SetPlayerSkin(playerid,66);
    return 1;
    }
    else if(sSpieler[playerid][Rank] == 2)
    {
    SetPlayerPos(playerid,2809.1396,-1162.2145,1029.1646);
    SetCameraBehindPlayer(playerid);
    SetPlayerInterior(playerid,8);
    SetPlayerColor(playerid,WEIS);
    GivePlayerWeapon(playerid,22,50);
    SetPlayerSkin(playerid,102);
    return 1;
    }
    else if(sSpieler[playerid][Rank] == 3)
    {
    SetPlayerSkin(playerid,104);
    SetPlayerPos(playerid,2809.1396,-1162.2145,1029.1646);
    SetCameraBehindPlayer(playerid);
    SetPlayerInterior(playerid,8);
    SetPlayerColor(playerid,WEIS);
    GivePlayerWeapon(playerid,22,50);
    return 1;
    }
    else if(sSpieler[playerid][Rank] == 4)
    {
    SetPlayerPos(playerid,2809.1396,-1162.2145,1029.1646);
    SetCameraBehindPlayer(playerid);
    SetPlayerInterior(playerid,8);
    SetPlayerColor(playerid,WEIS);
    GivePlayerWeapon(playerid,22,50);
    SetPlayerSkin(playerid, 176);
    return 1;
    }
    else if(sSpieler[playerid][Geschlecht] == 2)
    {
    SetPlayerPos(playerid,2809.1396,-1162.2145,1029.1646);
    SetCameraBehindPlayer(playerid);
    SetPlayerInterior(playerid,8);
    SetPlayerColor(playerid,WEIS);
    GivePlayerWeapon(playerid,22,50);
    SetPlayerSkin(playerid,103);
    return 1;
    }
    }
    if(sSpieler[playerid][Leader] == 11) //Hitman
    {
    SetPlayerColor(playerid,WEIS);
    GivePlayerWeapon(playerid,22,50);
    GivePlayerWeapon(playerid,34,150);
    SetPlayerSkin(playerid,165);
    SetPlayerPos(playerid,2449.3853,-1689.1703,1013.5078);
    SetCameraBehindPlayer(playerid);
    SetPlayerInterior(playerid,2);
    return 1;
    }
    if(sSpieler[playerid][Leader] == 11) //Hitman
    {
    SetPlayerPos(playerid,2449.3853,-1689.1703,1013.5078);
    SetCameraBehindPlayer(playerid);
    SetPlayerInterior(playerid,2);
    SetPlayerColor(playerid,WEIS);
    GivePlayerWeapon(playerid,22,50);
    GivePlayerWeapon(playerid,34,150);
    SetPlayerSkin(playerid,166);
    return 1;
    }
    if(sSpieler[playerid][Member] == 11) //Hitman
    {
    if(sSpieler[playerid][Rank] == 1)
    {
    SetPlayerPos(playerid,2449.3853,-1689.1703,1013.5078);
    SetCameraBehindPlayer(playerid);
    SetPlayerInterior(playerid,2);
    SetPlayerColor(playerid,WEIS);
    GivePlayerWeapon(playerid,22,50);
    GivePlayerWeapon(playerid,34,150);
    SetPlayerSkin(playerid,122);
    return 1;
    }
    else if(sSpieler[playerid][Rank] == 2)
    {
    SetPlayerPos(playerid,2449.3853,-1689.1703,1013.5078);
    SetCameraBehindPlayer(playerid);
    SetPlayerInterior(playerid,2);
    SetPlayerColor(playerid,WEIS);
    GivePlayerWeapon(playerid,22,50);
    GivePlayerWeapon(playerid,34,150);
    SetPlayerSkin(playerid,117);
    return 1;
    }
    else if(sSpieler[playerid][Rank] == 3)
    {
    SetPlayerPos(playerid,2449.3853,-1689.1703,1013.5078);
    SetCameraBehindPlayer(playerid);
    SetPlayerInterior(playerid,2);
    SetPlayerColor(playerid,WEIS);
    GivePlayerWeapon(playerid,22,50);
    GivePlayerWeapon(playerid,34,150);
    SetPlayerSkin(playerid,120);
    return 1;
    }
    else if(sSpieler[playerid][Rank] == 4)
    {
    SetPlayerPos(playerid,2449.3853,-1689.1703,1013.5078);
    SetCameraBehindPlayer(playerid);
    SetPlayerInterior(playerid,2);
    SetPlayerColor(playerid,WEIS);
    GivePlayerWeapon(playerid,22,50);
    GivePlayerWeapon(playerid,34,150);
    SetPlayerSkin(playerid,164);
    return 1;
    }
    }
    if(sSpieler[playerid][Leader] == 10) //Los Santos Vagos
    {
    SetPlayerColor(playerid,WEIS);
    GivePlayerWeapon(playerid,22,50);
    SetPlayerSkin(playerid,109);
    SetPlayerPos(playerid,322.9197,1119.7819,1083.8828);
    SetCameraBehindPlayer(playerid);
    SetPlayerInterior(playerid,5);
    return 1;
    }
    if(sSpieler[playerid][Leader] == 10) //Los Sanots Vagos
    {
    SetPlayerColor(playerid,WEIS);
    GivePlayerWeapon(playerid,31,999);
    GivePlayerWeapon(playerid,29,999);
    SetPlayerPos(playerid,1290.2834,-797.2609,1089.9375);
    SetCameraBehindPlayer(playerid);
    SetPlayerInterior(playerid,5);
    SetPlayerSkin(playerid,110);
    return 1;
    }
    if(sSpieler[playerid][Member] == 10)
    {
    if(sSpieler[playerid][Rank] == 1)
    {
    SetPlayerSkin(playerid,30);
    SetPlayerColor(playerid,WEIS);
    GivePlayerWeapon(playerid,31,999);
    GivePlayerWeapon(playerid,29,999);
    SetPlayerPos(playerid,1290.2834,-797.2609,1089.9375);
    SetCameraBehindPlayer(playerid);
    SetPlayerInterior(playerid,5);
    return 1;
    }
    else if(sSpieler[playerid][Rank] == 2)
    {
    SetPlayerSkin(playerid,108);
    SetPlayerColor(playerid,WEIS);
    GivePlayerWeapon(playerid,31,999);
    GivePlayerWeapon(playerid,29,999);
    SetPlayerPos(playerid,1290.2834,-797.2609,1089.9375);
    SetCameraBehindPlayer(playerid);
    SetPlayerInterior(playerid,5);
    return 1;
    }
    else if(sSpieler[playerid][Rank] == 3)
    {
    SetPlayerSkin(playerid,292);
    SetPlayerColor(playerid,WEIS);
    GivePlayerWeapon(playerid,31,999);
    GivePlayerWeapon(playerid,29,999);
    SetPlayerPos(playerid,1290.2834,-797.2609,1089.9375);
    SetCameraBehindPlayer(playerid);
    SetPlayerInterior(playerid,5);
    return 1;
    }
    }
    if(sSpieler[playerid][Leader] == 4) //President
    {
    SetPlayerColor(playerid,WEIS);
    SetPlayerSkin(playerid,295);
    GivePlayerWeapon(playerid,31,999);
    GivePlayerWeapon(playerid,29,999);
    SetPlayerPos(playerid,1290.2834,-797.2609,1089.9375);
    SetCameraBehindPlayer(playerid);
    SetPlayerInterior(playerid,5);
    return 1;
    }
    if(sSpieler[playerid][Member] == 4)
    {
    if(sSpieler[playerid][Rank] == 1)
    {
    SetPlayerColor(playerid,WEIS);
    GivePlayerWeapon(playerid,31,999);
    GivePlayerWeapon(playerid,29,999);
    SetPlayerPos(playerid,1290.2834,-797.2609,1089.9375);
    SetCameraBehindPlayer(playerid);
    SetPlayerInterior(playerid,5);
    SetPlayerSkin(playerid,163);
    return 1;
    }
    else if(sSpieler[playerid][Rank] == 2)
    {
    SetPlayerSkin(playerid,166);
    SetPlayerColor(playerid,WEIS);
    GivePlayerWeapon(playerid,31,999);
    GivePlayerWeapon(playerid,29,999);
    SetPlayerPos(playerid,1290.2834,-797.2609,1089.9375);
    SetCameraBehindPlayer(playerid);
    SetPlayerInterior(playerid,5);
    return 1;
    }
    }
    if(sSpieler[playerid][Leader] == 7 || sSpieler[playerid][Member] == 7) //Oamt
    {
    SetPlayerColor(playerid,HELLBLAU);
    GivePlayerWeapon(playerid,41,2000);
    GivePlayerWeapon(playerid,3,0);
    SetPlayerPos(playerid,1511.0232,-1461.5570,9.5000);
    SetCameraBehindPlayer(playerid);
    SetPlayerSkin(playerid,71);
    return 1;
    }
    if(sSpieler[playerid][Leader] == 2 || sSpieler[playerid][Member] == 2) //FBI
    {
    SetPlayerColor(playerid,WEIS);
    SetPlayerSkin(playerid,286);
    GivePlayerWeapon(playerid,29,999);
    GivePlayerWeapon(playerid,30,999);
    SetPlayerPos(playerid,216.4731,113.5795,1003.2188);
    SetCameraBehindPlayer(playerid);
    SetPlayerInterior(playerid,10);
    return 1;
    }
    if(sSpieler[playerid][Leader] == 12 || sSpieler[playerid][Member] == 12) //Feuerwehr
    {
    SetPlayerColor(playerid,DUNKELROT);
    SetCameraBehindPlayer(playerid);
    SetPlayerPos(playerid,1390.0193,-1637.1361,13.5469);
    GivePlayerWeapon(playerid,42,3000);
    SetPlayerSkin(playerid,277);
    return 1;
    }
    if(sSpieler[playerid][Leader] == 3 || sSpieler[playerid][Member] == 3) //Army
    {
    SetPlayerColor(playerid,GRÜN);
    SetCameraBehindPlayer(playerid);
    SetPlayerPos(playerid,-1345.9232,491.7726,11.2027);
    GivePlayerWeapon(playerid,24,500);
    GivePlayerWeapon(playerid,31,500);
    GivePlayerWeapon(playerid,29,500);
    SetPlayerSkin(playerid,287);
    return 1;
    }
    if(sSpieler[playerid][Leader] == 13 || sSpieler[playerid][Member] == 13) //HSB
    {
    SetPlayerColor(playerid,WEIS);
    SetCameraBehindPlayer(playerid);
    SetPlayerPos(playerid,2324.3286,-1143.7377,1050.4922);
    GivePlayerWeapon(playerid,22,50);
    GivePlayerWeapon(playerid,5,1);
    SetPlayerSkin(playerid,24);
    SetPlayerInterior(playerid,12);
    return 1;
    }
    RemovePlayerAttachedObject(playerid,1);
    return 1;
    }

  • Der Gamemode funktioniert an sich schon.



    Loaded log file: "server_log.txt".
    ----------



    SA-MP Dedicated Server
    ----------------------
    v0.3.7-R2, (C)2005-2015 SA-MP Team



    [17:08:26]
    [17:08:26] Server Plugins
    [17:08:26] --------------
    [17:08:26] Loading plugin: streamer
    [17:08:26]



    *** Streamer Plugin v2.7.5.2 by Incognito loaded ***



    [17:08:26] Loaded.
    [17:08:26] Loading plugin: sscanf
    [17:08:26]



    [17:08:26] ===============================



    [17:08:26] sscanf plugin loaded.



    [17:08:26] Version: 2.8.1



    [17:08:26] (c) 2012 Alex "Y_Less" Cole



    [17:08:26] ===============================



    [17:08:26] Loaded.
    [17:08:26] Loaded 2 plugins.



    [17:08:26]
    [17:08:26] Filterscripts
    [17:08:26] ---------------
    [17:08:26] Loading filterscript 'hsolmap.amx'...
    [17:08:26] Loading filterscript 'ls_elevator.amx'...
    [17:08:26] Loaded 2 filterscripts.



    [17:08:27]
    ----------------------------------
    [17:08:27] Hollywood street of Life
    [17:08:27] ----------------------------------



    [17:08:27] Number of vehicle models: 129

    • Offizieller Beitrag

    White. Nein OnplayerSpawn wird sonst nirgendswo aufgerufen.
    @shoxinat0r Des mit den Debugnachrichten.. sorry des raffe ich ned ganz

    Schau sonst einfach mal ob deine Grüne Nachricht wenn du connectest erscheint. [INGAME] (Ist das was ich meine und dir shoxinat0r versucht zu erklären)

    • SendClientMessage(playerid, GRÜN, "--------------------------------------------------------------------------------");
    • format(string, sizeof(string), "Willkommen auf {FFCC00}Hollywood Street of Life{FFFFFF}, {FFFFFF}%s.",SpielerName(playerid));
  • Ich hab den Code mal kurz überflogen. Bist du den in einer Fraktion?
    Wenn ich es jetzt nicht überlesen habe, setzt du nirgendwo den Spawn für einen Zivilisten, ausser er ist im Gangjail/Knast/InBehandlung/Spawnchange=1


    Grüße

    • Offizieller Beitrag

    Dann versuch es mal so:


    • Offizieller Beitrag

    Guten Morgen,


    @Whice.e. das habe ich so übernommen ändert leider trotzdem nix :(

    Versuche es doch mal so, und lösche dafür 171-231 die du hier geschrieben hast

  • Sry für die späte antwort. Ich habe es so übernommen und es funktioniert immer noch nicht .


    Ich habe noch ein Problem, mein 3DLabel am Auto verschwindet nach ca 45sec. Es soll aber dauerhaft dran bleiben bis ich das auto wieder lösche.



    ocmd:veh(playerid,params[])
    {
    if(IsPlayerConnected(playerid))
    {
    if(sSpieler[playerid][Adminlevel] >= 3)
    {
    new Text3D:adminveh[MAX_VEHICLES],string[128];
    new ModelID, color[2],Float:VehPos[4], vehicleid;
    if(GetPlayerState(playerid)!=PLAYER_STATE_ONFOOT) return SendClientMessage(playerid,0xB0AFB0FF,"Du bist nicht zu Fuß unterwegs");
    if(sscanf(params, "ddd",ModelID,color[0],color[1])) return SendClientMessage(playerid,0xB0AFB0FF, "Befehl: /veh [ModellID] [Farbe 1] [Farbe 2]");
    if(ModelID < 400 || ModelID > 611) return SendClientMessage(playerid,0xB0AFB0FF, "Die Anzahl muss zwischen 400 - 611 liegen");
    if(color[0] < 0 || color[0] > 255 || color[1] < 0 || color[1] > 255) return SendClientMessage(playerid,0xB0AFB0FF, "Die FarbID muss zwischen 0 - 255 liegen");
    GetPlayerPos(playerid, VehPos[0],VehPos[1],VehPos[2]);
    GetPlayerFacingAngle(playerid, VehPos[3]);
    LinkVehicleToInterior(vehicleid,GetPlayerInterior(playerid));
    SetVehicleVirtualWorld(vehicleid,GetPlayerVirtualWorld(playerid));
    vehicleid = CreateVehicle(ModelID,VehPos[0],VehPos[1],VehPos[2],VehPos[3],color[0],color[1],-1);
    format(string,sizeof(string),"Admin-Fahrzeug von %s",SpielerName(playerid));
    adminveh[vehicleid] = Create3DTextLabel(string, GOLD,0,0,0.0, 2.5,0,1);
    Attach3DTextLabelToVehicle(adminveh[vehicleid],vehicleid,0.0,0.0,2.0);
    SetVehicleNumberPlate(vehicleid,"HSOL");
    PutPlayerInVehicle(playerid,vehicleid,0);
    for(new c=0;c<CAR_AMOUNT;c++)
    {
    Gas[c] = GetGasMax(GetVehicleModel(c));
    }
    return 1;
    }
    else
    {
    SendClientMessage(playerid,ROT,"Du bist kein Admin oder hast nicht den benötigten Rang dazu!");
    }
    }
    return 1;
    }

  • Kann verschiedene Ursachen haben, eventuell sprengst du auch irgendwo einen Array und beendest dadurch frühzeitig den Ablauf des Codes oder eine anderer Vergleich entspricht true und der weitere Ablauf wird durch ein return abgebrochen. Beispielsweise in Zeile 85 & 92 fragst du schlichtweg das Geschlecht ab und sofern es 1 oder 2 entspricht, brichst du den weiteren Verlauf ab. So gewollt? Verstehe allgemein auch den Sinn nicht wirklich, warum man nur zwei Skins haben kann (pro Geschlecht 1), da du dort einen Skin setzt. Eventuell sollte das untergeordnet sein, sprich in einer anderen Abfrage verschachtelt sein? Sonst kommentiere diese Vergleiche einmal aus und probier es dann noch mal. Eventuell macht auch der Einsatz von crashdetect Sinn um auszuschließen, dass kein Array gesprengt wird.

  • do.de - Domain-Offensive - Domains für alle und zu super Preisen