Fraktions spawns

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
  • Unter OnPlayerSpawn
    if(/*Die Variable*/[playerid]==1)
    {
    SetPlayerPos(playerid,...
    SetPlayerFacingAngle(playerid,...
    }

  • habe das da schon so gemacht :




    public OnPlayerSpawn(playerid)
    {
    new mname[128], vsave[128];// Gleiche
    new Float:X, Float:Y, Float:Z;
    GetPlayerName(playerid,mname,sizeof(mname)); // wie
    format(vsave,sizeof(vsave),"/Spieler/%s.ini",mname);
    SetPlayerTeam(playerid,dini_Int(vsave,"TTeam"));
    if(gTeam[playerid] == 1) { SetPlayerPos(playerid,253.8068,79.2205,1003.6406); }
    if(gTeam[playerid] == 2) { SetPlayerPos(playerid,1134.1123,-1489.1073,22.7690); }//NoobSpawn
    if(gTeam[playerid] == 3) { SetPlayerPos(playerid,1127.3398,-2036.7174,69.8838); }
    if(gTeam[playerid] == 4) { SetPlayerPos(playerid,2498.0481,-1687.6194,13.5077); }
    if(gTeam[playerid] == 5) { SetPlayerPos(playerid,1285.8136,-1328.4764,13.5505); }
    if(gTeam[playerid] == 6) { SetPlayerPos(playerid,912.2949,-1234.8835,17.2109); }
    if(gTeam[playerid] == 7) { SetPlayerPos(playerid,1217.9827,-1655.2643,11.7969); }
    if(gTeam[playerid] == 8) { SetPlayerPos(playerid,1173.0217,-1321.4728,15.3975); }
    if(gTeam[playerid] == 10) { SetPlayerPos(playerid,1751.8295,-2058.5327,13.5897); }
    if(gTeam[playerid] == 11) { SetPlayerPos(playerid,2151.1687,-1796.4095,13.5403); }
    if(gTeam[playerid] == 12) { SetPlayerPos(playerid,1134.1123,-1489.1073,22.7690); }//NoobSpawn
    if(gTeam[playerid] == 13) { SetPlayerPos(playerid,1209.5637,-1746.5167,13.5936); }
    if(gTeam[playerid] == 14) { SetPlayerPos(playerid,1767.9934,-1896.5092,13.5636); }
    if(gTeam[playerid] == 15) { SetPlayerPos(playerid,2340.9934,-2233.8037,6.0625); }
    if(gTeam[playerid] == 16) { SetPlayerPos(playerid,841.2684,-1471.6641,14.1687); }
    if(gTeam[playerid] == 17) { SetPlayerPos(playerid,1285.8136,-1328.4764,13.5505); }
    if(gTeam[playerid] == 18) { SetPlayerPos(playerid,2754.8660,-1400.5059,39.3738); }


  • also erstmal wirds hier gespeichert :
    enum Register
    {
    passwort[128],
    Score,
    skin,
    wanteds,
    BankGeld,
    Team,
    TeamLeader,
    TeamRang,
    TTeam,
    Farbe,
    Adminlevel,
    Aschein,
    Fschein,
    Bschein,
    Wscehin,
    };


    hier wird er zum Team gemacht :nach /makeleader
    if(fraktion == 1)
    {
    SetPlayerTeam(target, 1);
    SetPlayerColor(target, Polizei);
    SetPlayerSkin(target, 288);
    SendClientMessage(target, Rot, "Du wurdest zum Cheef der Polizei gemacht");
    pInfo[target][TeamLeader] = fraktion;
    dini_IntSet(save,"TTeam",GetPlayerTeam(target));
    dini_IntSet(save,"TeamLeader",pInfo[target][TeamLeader]);
    dini_IntSet(save,"Skin",pInfo[target][skin]);


    und hier halt spawn
    public OnPlayerSpawn(playerid)
    {
    new mname[128], vsave[128];// Gleiche
    new Float:X, Float:Y, Float:Z;
    GetPlayerName(playerid,mname,sizeof(mname)); // wie
    format(vsave,sizeof(vsave),"/Spieler/%s.ini",mname);
    SetPlayerTeam(playerid,dini_Int(vsave,"TTeam"));
    if(pInfo[playerid][TTeam] == 1) { SetPlayerPos(playerid,253.8068,79.2205,1003.6406); }
    if(pInfo[playerid][TTeam] == 2) { SetPlayerPos(playerid,1134.1123,-1489.1073,22.7690); }//NoobSpawn
    if(pInfo[playerid][TTeam] == 3) { SetPlayerPos(playerid,1127.3398,-2036.7174,69.8838); }
    if(pInfo[playerid][TTeam] == 4) { SetPlayerPos(playerid,2498.0481,-1687.6194,13.5077); }
    if(pInfo[playerid][TTeam] == 5) { SetPlayerPos(playerid,1285.8136,-1328.4764,13.5505); }
    if(pInfo[playerid][TTeam] == 6) { SetPlayerPos(playerid,912.2949,-1234.8835,17.2109); }
    if(pInfo[playerid][TTeam] == 7) { SetPlayerPos(playerid,1217.9827,-1655.2643,11.7969); }
    if(pInfo[playerid][TTeam] == 8) { SetPlayerPos(playerid,1173.0217,-1321.4728,15.3975); }
    if(pInfo[playerid][TTeam] == 10) { SetPlayerPos(playerid,1751.8295,-2058.5327,13.5897); }
    if(pInfo[playerid][TTeam] == 11) { SetPlayerPos(playerid,2151.1687,-1796.4095,13.5403); }
    if(pInfo[playerid][TTeam] == 12) { SetPlayerPos(playerid,1134.1123,-1489.1073,22.7690); }//NoobSpawn
    if(pInfo[playerid][TTeam] == 13) { SetPlayerPos(playerid,1209.5637,-1746.5167,13.5936); }
    if(pInfo[playerid][TTeam] == 14) { SetPlayerPos(playerid,1767.9934,-1896.5092,13.5636); }
    if(pInfo[playerid][TTeam] == 15) { SetPlayerPos(playerid,2340.9934,-2233.8037,6.0625); }
    if(pInfo[playerid][TTeam] == 16) { SetPlayerPos(playerid,841.2684,-1471.6641,14.1687); }
    if(pInfo[playerid][TTeam] == 17) { SetPlayerPos(playerid,1285.8136,-1328.4764,13.5505); }
    if(pInfo[playerid][TTeam] == 18) { SetPlayerPos(playerid,2754.8660,-1400.5059,39.3738); }
    X = dini_Float(vsave, "F_X");
    Y = dini_Float(vsave, "F_Y");
    Z = dini_Float(vsave, "F_Z");
    SetPlayerPos(playerid, X, Y, Z);


    clock();

    new name[128], save[128];
    GetPlayerName(playerid,name,sizeof(name));
    format(save,sizeof(save),"/Spieler/%s.ini",name);
    SetPlayerSkin(playerid,dini_Int(save,"Skin"));
    if(loggedin[playerid] == false)
    {
    SendClientMessage(playerid, Rot, "Du musst dich Einloggen bevor du spawnst!");
    SendClientMessage(playerid, Rot, "Du wurdest gekickt!");
    Kick(playerid); // Kicke den Spieler
    }


    return 1;


    }


    und ich habe bei Gamemodeinit
    noch das gemacht :


    //Cops
    AddPlayerClassEx(1,280 ,253.8068,79.2205,1003.6406,184.5549,0,0,0,0,0,0);
    AddPlayerClassEx(1,281 ,253.8068,79.2205,1003.6406,184.5549,0,0,0,0,0,0);
    AddPlayerClassEx(1,282 ,253.8068,79.2205,1003.6406,184.5549,0,0,0,0,0,0);
    AddPlayerClassEx(1,283 ,253.8068,79.2205,1003.6406,184.5549,0,0,0,0,0,0);
    AddPlayerClassEx(1,284 ,253.8068,79.2205,1003.6406,184.5549,0,0,0,0,0,0);
    AddPlayerClassEx(1,265 ,253.8068,79.2205,1003.6406,184.5549,0,0,0,0,0,0);
    AddPlayerClassEx(1,266 ,253.8068,79.2205,1003.6406,184.5549,0,0,0,0,0,0);
    AddPlayerClassEx(1,267 ,253.8068,79.2205,1003.6406,184.5549,0,0,0,0,0,0);
    AddPlayerClassEx(1,288 ,253.8068,79.2205,1003.6406,184.5549,0,0,0,0,0,0);

    Einmal editiert, zuletzt von [GaS]Cloudy ()

  • if(pInfo[playerid][TTeam] == 17)
    und so immer zu
    if(pInfo[playerid][TTeam] == 17||pInfo[playerid][TeamLeader] == 17)

  • was soll das bringen er liest doch das team also TTeam ... TeamLeader und Team is einfach nur für mich um leader und member zu unterscheiden aber TTeam is das team und das brauch er doch nur oder was soll deine verbesserung nun bewirken?



    geht immer noch ned sieht nu so aus ;
    public OnPlayerSpawn(playerid)
    {
    new mname[128], vsave[128];
    GetPlayerName(playerid,mname,sizeof(mname));
    format(vsave,sizeof(vsave),"/Spieler/%s.ini",mname);
    SetPlayerTeam(playerid,dini_Int(vsave,"TTeam"));
    if(pInfo[playerid][TTeam] == 1 ||pInfo[playerid][TeamLeader] == 1) { SetPlayerPos(playerid, 253.8068, 79.2205, 1003.6406); }
    if(pInfo[playerid][TTeam] == 2 ||pInfo[playerid][TeamLeader] == 2) { SetPlayerPos(playerid, 1134.1123, 1489.1073, 22.7690); }//NoobSpawn
    if(pInfo[playerid][TTeam] == 3 ||pInfo[playerid][TeamLeader] == 3) { SetPlayerPos(playerid, 1127.3398, 2036.7174, 69.8838); }
    if(pInfo[playerid][TTeam] == 4 ||pInfo[playerid][TeamLeader] == 4) { SetPlayerPos(playerid, 2498.0481, 1687.6194, 13.5077); }
    if(pInfo[playerid][TTeam] == 5 ||pInfo[playerid][TeamLeader] == 5) { SetPlayerPos(playerid, 1285.8136, 1328.4764, 13.5505); }
    if(pInfo[playerid][TTeam] == 6 ||pInfo[playerid][TeamLeader] == 6) { SetPlayerPos(playerid, 912.2949, 1234.8835, 17.2109); }
    if(pInfo[playerid][TTeam] == 7 ||pInfo[playerid][TeamLeader] == 7) { SetPlayerPos(playerid, 1217.9827, 1655.2643, 11.7969); }
    if(pInfo[playerid][TTeam] == 8 ||pInfo[playerid][TeamLeader] == 8) { SetPlayerPos(playerid, 1173.0217, 1321.4728, 15.3975); }
    if(pInfo[playerid][TTeam] == 10 ||pInfo[playerid][TeamLeader] == 10) { SetPlayerPos(playerid, 1751.8295, 2058.5327, 13.5897); }
    if(pInfo[playerid][TTeam] == 11 ||pInfo[playerid][TeamLeader] == 11) { SetPlayerPos(playerid, 2151.1687, 1796.4095, 13.5403); }
    if(pInfo[playerid][TTeam] == 12 ||pInfo[playerid][TeamLeader] == 12) { SetPlayerPos(playerid, 1134.1123, 1489.1073, 22.7690); }//NoobSpawn
    if(pInfo[playerid][TTeam] == 13 ||pInfo[playerid][TeamLeader] == 13) { SetPlayerPos(playerid, 1209.5637, 1746.5167, 13.5936); }
    if(pInfo[playerid][TTeam] == 14 ||pInfo[playerid][TeamLeader] == 14) { SetPlayerPos(playerid, 1767.9934, 1896.5092, 13.5636); }
    if(pInfo[playerid][TTeam] == 15 ||pInfo[playerid][TeamLeader] == 15) { SetPlayerPos(playerid, 2340.9934, 2233.8037, 6.0625); }
    if(pInfo[playerid][TTeam] == 16 ||pInfo[playerid][TeamLeader] == 16) { SetPlayerPos(playerid, 841.2684, 1471.6641, 14.1687); }
    if(pInfo[playerid][TTeam] == 17 ||pInfo[playerid][TeamLeader] == 17) { SetPlayerPos(playerid, 1285.8136, 1328.4764, 13.5505); }
    if(pInfo[playerid][TTeam] == 18 ||pInfo[playerid][TeamLeader] == 18) { SetPlayerPos(playerid, 2754.8660, 1400.5059, 39.3738); }

    Einmal editiert, zuletzt von [GaS]Cloudy ()