problem beim Paintball

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


    ich habe ein problem undzwar wenn ich in die paintballarena gehe und sterbe spawne ich wieder in der base.Habe variablen eingesezt das wenn er in der PB ist wieder da spawnt aber leider funktionierts nicht habe es einmal in onplayerspawn gemacht und in onplayerdeath. bitte um hilfe


    es ist ein GF edit


    MfG


    Master

  • ist leider immer noch so :(


    OnPlayerDeath:

    Spoiler anzeigen
    public OnPlayerDeath(playerid, killerid, reason)
    {
    GW_OnPlayerDeath(playerid, killerid, reason);
    new name[MAX_PLAYER_NAME];
    GetPlayerName(playerid, name, sizeof(name));
    new string[256];
    new playercash;
    new victimteam;
    new Float:px,Float:py,Float:pz;
    GetPlayerPos(playerid, px, py, pz);
    new killerteam;
    TextDrawHideForPlayer(playerid,txtTimeDisp);
    if(Deagle[playerid] != 0)
    {
    PlayerInfo[playerid][pTot] = 0;
    SetPlayerHealth(playerid,100);
    SetPlayerArmour(playerid,100);
    GivePlayerWeapon(playerid,24,500);
    SetPlayerPos(playerid,-1401.829956,107.051300,1032.273437);
    SetPlayerInterior(playerid,1);
    }
    /*if(PlayerPaintballing[playerid] == 1)
    {

    Spoiler anzeigen
    GetPlayerPos(playerid,PlayerInfo[playerid][pTx],PlayerInfo[playerid][pTy],PlayerInfo[playerid][pTz]);
    CreatePickup(1254,1,PlayerInfo[playerid][pTx],PlayerInfo[playerid][pTy],PlayerInfo[playerid][pTz]);
    PlayerInfo[playerid][pTot] = 1;
    ClearCrime(playerid);
    PlayerInfo[playerid][pTot] = 1;
    SetPlayerInterior(playerid, 0);
    Clear5Text(playerid);
    Clear5Text(playerid);
    SetPlayerHealth(playerid, 100);
    SendClientMessage(playerid,COLOR_LIGHTBLUE, "Du wurdest schwer verletzt ins Krankenhaus gebracht!");
    GameTextForPlayer(playerid, "~w~IN BEHANDLUNG ~n~~r~ DAUER CA. 60 SEKUNDEN", 5000, 3);
    SetPlayerPos(playerid,1162.871704, -1339.109619, 14.297291);
    SetPlayerCameraPos(playerid, 1223.379028, -1333.354126, 33.809105);
    SetPlayerCameraLookAt(playerid, 1178.824829, -1325.804077, 13.284119);
    if(PlayerInfo[playerid][pJailed] == 2)
    {
    PlayerInfo[playerid][pTot] = 0;
    //SpawnPlayer(playerid);
    }
    }*/
    if(Deagle[playerid] == 0)
    {
    PlayerInfo[playerid][pTot] = 1;
    new Float:pX,Float:pY,Float:pZ;
    GetPlayerPos(playerid, pX, pY, pZ);
    TotenKopf[playerid] = CreatePickup(1254,1, pX, pY, pZ);
    PlayerInfo[playerid][pTx] = pX;
    PlayerInfo[playerid][pTy] = pY;
    PlayerInfo[playerid][pTz] = pZ;
    }
    if(PlayerInfo[playerid][pTot] == 1)
    {
    SendClientMessage(playerid, COLOR_LIGHTRED, " ");
    SendClientMessage(playerid, COLOR_LIGHTRED, " ");
    SendClientMessage(playerid, COLOR_LIGHTRED, " ");
    SendClientMessage(playerid, COLOR_LIGHTRED, " ");
    SendClientMessage(playerid, COLOR_LIGHTRED, " ");
    SendClientMessage(playerid, COLOR_LIGHTRED, " ");
    SendClientMessage(playerid, COLOR_LIGHTRED, " ");
    SendClientMessage(playerid, COLOR_LIGHTRED, " ");
    SendClientMessage(playerid, COLOR_LIGHTRED, " ");
    SendClientMessage(playerid, COLOR_YELLOW, "|________ Am Krankenhaus ________|");
    SendClientMessage(playerid, COLOR_LIGHTRED, "Durch deine schweren Verletzungen liegst du im Koma!");
    SendClientMessage(playerid, COLOR_LIGHTBLUE, "Sie sind fü 2-3 Minuten im Krankenhaus! In 2-3 Minuten kommen Sie wieder raus, da Sie gearde behandelt werden!");
    ResetPlayerWeapons(playerid);
    return 1;
    }
    if(FirstSpawn[playerid] == 1)
    {
    FirstSpawn[playerid] = 0;
    }

    Spoiler anzeigen
    if(IsAtNoDm(playerid))
    {
    new kickname[MAX_PLAYER_NAME];
    new nn[MAX_PLAYER_NAME], str[150];
    GetPlayerName(playerid, nn, MAX_PLAYER_NAME);
    GetPlayerName(killerid, kickname, sizeof(kickname));
    format(str, 150, "AdmCmd: %s wurde vom System gekickt, Grund: DM in einer NO-DM Zone", kickname);
    SendClientMessageToAll(COLOR_LIGHTRED, str);
    Kick(killerid);
    }

    Spoiler anzeigen
    if(InGangJail[playerid] == 1)
    {
    format(string,sizeof(string),"AdmCmd: %s ist im Gangjail gestorben! Er wird automatisch zurück teleportiert.",PlayerName(playerid));
    ABroadCast(COLOR_LIGHTRED,string,1);
    SetPlayerInterior(playerid, 0);
    SetPlayerPos(playerid,-1634.9923,-2239.2424,31.4766);
    UnFreezePlayer(playerid);
    PlayerTied[playerid] = 0;
    InGangJail[playerid] = 1;
    }
    RobTime[playerid] = 0;
    InCargo[playerid] = 0; InLevi[playerid] = 0;
    victimteam = gTeam[playerid];
    killerteam = gTeam[killerid];
    gPlayerSpawned[playerid] = 0;
    GetPlayerName(playerid, name, sizeof(name));
    PlayerInfo[playerid][pLocal] = 255;

    Spoiler anzeigen
    if (gPlayerCheckpointStatus[playerid] > 4 && gPlayerCheckpointStatus[playerid] < 11)
    {
    DisablePlayerCheckpoint(playerid);
    gPlayerCheckpointStatus[playerid] = CHECKPOINT_NONE;
    }
    new caller = Mobile[playerid];
    if(caller != 255)
    {
    if(caller < 255)
    {
    SendClientMessage(caller, COLOR_GRAD2, " Die Verbindung wurde unterbrochen....");
    CellTime[caller] = 0;
    CellTime[playerid] = 0;
    Mobile[caller] = 255;
    }
    Mobile[playerid] = 255;
    CellTime[playerid] = 0;
    }
    if(PlayerPaintballing[playerid] != 0)
    {
    PlayerPaintballKills[killerid] ++;
    if(PlayerPaintballKills[killerid] > PaintballWinnerKills)
    {
    new killer[MAX_PLAYER_NAME];
    PaintballWinner = killerid;
    PaintballWinnerKills = PlayerPaintballKills[killerid];
    GetPlayerName(killerid, killer, sizeof(killer));
    ClearCrime(playerid);
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
    if(IsPlayerConnected(i))
    {
    if(PlayerPaintballing[i] != 0)
    {

    Spoiler anzeigen
    format(string, sizeof(string), "* %s ist mit %d Punkten in Führung.",killer,PaintballWinnerKills);
    SendClientMessage(i, COLOR_WHITE, string);
    }
    }
    }
    }
    return 1;
    }
    if(IsBlacklist[playerid]==1)
    {
    ClearBlack(playerid);
    IsBlacklist[playerid]=0;
    }
    if(GettingCK[playerid] < 999 || OnCK[playerid] < 999)
    {
    if(IsPlayerConnected(killerid))
    {
    if(GettingCK[killerid] < 999 || OnCK[playerid] < 999)
    {
    new killer[MAX_PLAYER_NAME];
    new dier[MAX_PLAYER_NAME];
    GetPlayerName(playerid, dier, sizeof(dier));
    GetPlayerName(killerid, killer, sizeof(killer));
    format(string, sizeof(string), "* %s hat deinen Charakter gesperrt, du kannst nun mit diesem Charakter nicht mehr Spielen.",killer);
    SendClientMessage(playerid, COLOR_LIGHTRED, string);
    format(string, sizeof(string), "** %s hat den Spieler %s erledigt**",killer,dier);
    CKLog(string);
    PlayerInfo[playerid][pCK] = 1;
    if(GettingCK[playerid] < 999) { GettingCK[playerid] = 999; }
    else if(OnCK[playerid] < 999) { OnCK[playerid] = 999; }
    if(GettingCK[killerid] < 999) { GettingCK[killerid] = 999; }
    else if(OnCK[killerid] < 999) { OnCK[killerid] = 999; }
    KickPlayer[playerid] = 1;
    }
    }
    }
    if(PlayerInfo[playerid][pHeadValue] > 0)
    {
    if(IsPlayerConnected(killerid))
    {
    if(PlayerInfo[killerid][pMember] == 8 || PlayerInfo[killerid][pLeader] == 8)
    {
    if(GoChase[killerid] == playerid)
    {
    ConsumingMoney[killerid] = 1;
    new killer[MAX_PLAYER_NAME];
    GetPlayerName(killerid, killer, sizeof(killer));
    GivePlayerMoney(killerid, PlayerInfo[playerid][pHeadValue]);
    format(string,128,"<< Hitman %s hat den Auftrag an %s erfüllt und bekommt: $%d >>",killer,name,PlayerInfo[playerid][pHeadValue]);
    SendFamilyMessage(8, COLOR_YELLOW, string);
    PlayerInfo[playerid][pHeadValue] = 0;
    GotHit[playerid] = 0;
    GetChased[playerid] = 999;
    GoChase[killerid] = 999;
    }
    }
    }
    }
    if(victimteam >= 4)
    {
    if(IsPlayerConnected(killerid))
    {
    new slice = 100; //$100
    playercash = GetPlayerMoney(playerid);
    if(gTeam[killerid] != 2 && PlayerInfo[killerid][pMember] != 7) { WantedPoints[killerid] += 2; } //+ 2 wanted points
    if(SafeTime[playerid] <= 0)
    {
    if(gTeam[killerid] != gTeam[playerid])
    {
    if(GetPlayerState(killerid) == 1)
    {
    PlayerInfo[killerid][pKills] = PlayerInfo[killerid][pKills] + 2;
    }
    else
    {
    PlayerInfo[killerid][pKills]++;
    }
    PlayerInfo[playerid][pKills]--;
    }
    }
    if (((gTeam[killerid]) == 1) || ((gTeam[killerid]) == 3 && civnokill) || (gTeam[killerid] == gTeam[playerid] && gTeam[playerid] != 4))
    {
    slice = 0;
    }
    if (((gTeam[killerid]) != 4) && ((gTeam[killerid]) == gTeam[playerid]))//no team kill
    {
    slice = 0;
    }
    if (playercash > 0)
    {
    GivePlayerMoney(playerid, -slice);
    }
    else
    {
    slice = slice+500;
    }
    GivePlayerMoney(killerid, slice);
    PlayerPlaySound(killerid, 1083, 0.0, 0.0, 0.0);
    if (((gTeam[killerid]) == 3) && reason == 49)
    {
    SetPlayerCriminal(killerid,255, "Fahrerflucht");
    }
    }
    }
    else if (victimteam == 2)
    {
    if(IsPlayerConnected(killerid))
    {
    // Cop kill
    PlayerInfo[playerid][pKills]--;
    if (gTeam[killerid] == 2)//cops kill cop
    {
    PlayerPlaySound(killerid, 1084, 0.0, 0.0, 0.0);
    GivePlayerMoney(killerid, -suecost);
    GivePlayerMoney(playerid, suecost+100);//+100pays hospital bill
    }
    if (gTeam[killerid] >= 3)
    {
    // WantedPoints[killerid] += 1; //+ 2 wanted points

    Spoiler anzeigen
    if (reason == 49)
    {
    SetPlayerCriminal(killerid,255, "Fahrerflucht");
    }
    }
    if(gTeam[killerid] >= 5 && SafeTime[playerid] <= 0)
    {
    if(GetPlayerState(killerid) == 1)
    {
    PlayerInfo[killerid][pKills] = PlayerInfo[killerid][pKills]+2;
    }
    else
    {
    PlayerInfo[killerid][pKills]++;
    }
    WantedPoints[killerid]+=2;
    }
    }
    }
    else if (victimteam == 3)
    {
    if(IsPlayerConnected(killerid))
    {
    // Civ kill
    if ((gTeam[killerid]) == 2 || PlayerInfo[killerid][pMember] == 7)//cops kill civ
    {
    if(WantedLevel[playerid] < 1)
    {
    PlayerPlaySound(killerid, 1084, 0.0, 0.0, 0.0);
    GivePlayerMoney(killerid, -suecost);
    GivePlayerMoney(playerid, suecost+100);//+100pays hospital bill
    }
    }
    else
    {
    }

    Spoiler anzeigen
    }
    }
    else if (victimteam == 1)
    {
    if(IsPlayerConnected(killerid))
    {
    // Civ kill
    if ((gTeam[killerid]) == 2)//cops kill civ
    {
    PlayerPlaySound(killerid, 1084, 0.0, 0.0, 0.0);
    GivePlayerMoney(killerid, -suecost);
    GivePlayerMoney(playerid, suecost+100);//+100pays hospital bill
    }
    else if ((gTeam[killerid]) == 1)//med kill civ
    {
    PlayerPlaySound(killerid, 1084, 0.0, 0.0, 0.0);
    GivePlayerMoney(killerid, -suecost);
    GivePlayerMoney(playerid, suecost+100);//+100pays hospital bill
    }
    else if (((gTeam[killerid]) == 3) && reason == 49)
    {
    SetPlayerCriminal(killerid,255, "Fahrerflucht");
    }
    }
    }
    if (victimteam >= 3 && WantedPoints[playerid] > 0 && killerteam == 2)
    {
    SetPlayerFree(playerid,killerid, "Gekillt");
    }
    if(reauber[playerid] == 1)
    {
    new s[100];
    GetPlayerName(playerid,name,sizeof(name));
    reauber[playerid] = 0;
    glav = 1800;
    KillTimer(bankcountdown1);
    KillTimer(bankcountdown2);
    KillTimer(bankcountdown3);
    KillTimer(bankcountdown4);
    KillTimer(bankcountdown5);
    KillTimer(ausgeraubt1);
    SetTimer("rauberlauben1", 1800000, 0);
    format(s,sizeof(s),"%s ist gestorben. Bankrob gescheitert.",name);
    SendClientMessageToAll(COLOR_YELLOW,s);
    }
    if(reaubersf[playerid] == 1)
    {
    new s[100];
    GetPlayerName(playerid,name,sizeof(name));
    reaubersf[playerid] = 0;
    glavsf = 1800;
    KillTimer(bankcountdown1sf);
    KillTimer(bankcountdown2sf);
    KillTimer(bankcountdown3sf);
    KillTimer(bankcountdown4sf);
    KillTimer(bankcountdown5sf);
    KillTimer(ausgeraubt1sf);
    SetTimer("rauberlauben1sf", 1800000, 0);
    format(s,sizeof(s),"%s ist gestorben. Bankrob gescheitert.",name);
    SendClientMessageToAll(COLOR_YELLOW,s);
    }
    ImShamalInterior[playerid] = 0;
    ShamalID[playerid] = -1;
    killerid = INVALID_PLAYER_ID;
    SetPlayerColor(playerid,COLOR_GRAD2);
    return 1;
    }


    //edit
    brauche immer noch hilfe man spawnt trotzdem wieder in der base :(

    Einmal editiert, zuletzt von Master147 ()