Deathmatch Arena

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


    Ich hätte mir es ganz gerne so vorgestellt Spieler A ist in einer DM Arena Spieler B kommt nach
    Spieler A will die DM Arena Leaven doch Spieler B drückte ihm beispielsweise Deagle hits nun hätte ich es ganz gerne das Spieler A
    nicht Direkt Leaven kann sonder Spieler A muss meinetwegen 3 - 4 Sekunden warten könne mir einer dabei helfen ich bedanke mich im vorraus







    Mit Freundlichen Grüßen ,


    Toastiie1337.

  • Unter den Includes:
    new lastDamage[MAX_PLAYERS];


    Bei OnPlayerTakeDamage:
    if(issuerid != INVALID_PLAYER_ID) lastDamage[playerid] = gettime();


    Beim /leave Befehl:
    if(lastDamage[playerid] + 4 > gettime()) return SendClientMessage(playerid, 0xFF0000FF, "Error: Du bist im Kampf!");

  • Danke ,


    wenn du mir Jetzt noch helfen könntest bei der Dm Arena erstellen wäre das Super Gut ich definiere mal dm arena erstellen
    du hast sicher im Script gesehen das ich einige DM Arenen habe ich wollt mir eine weitere erstellen da klappts aber mit dem Random Pos nicht :/ wenn ich das mit dem Random Position mache
    Buggen einige andere dm Arenen rum aus dem Grund habe ich das vorzeitig weggelassen so dass, ich nur an der SetPlayerPos Stelle Spawne.

  • Selbst verständlich , so sehen alle anderen DM Arenen aus


    if(DM[playerid][8] == 1){
    SetPlayerInterior(playerid,0);
    SetPlayerVirtualWorld(playerid,0);
    }else if(DM[playerid][0] == 1){
    new rand = random(4);
    SetPlayerInterior(playerid,1);
    GivePlayerWeapon(playerid,24,500);
    SetPlayerPos(playerid,RandomSpawn[rand][rX],RandomSpawn[rand][rY],RandomSpawn[rand][rZ]);
    SetPlayerFacingAngle(playerid,RandomSpawn[rand][rA]);
    }else if(DM[playerid][1] == 1){
    new rand = 4+random(4);
    SetPlayerInterior(playerid,10);
    GivePlayerWeapon(playerid,24,500);
    GivePlayerWeapon(playerid,25,500);
    GivePlayerWeapon(playerid,34,500);
    SetPlayerPos(playerid,RandomSpawn[rand][rX],RandomSpawn[rand][rY],RandomSpawn[rand][rZ]);
    SetPlayerFacingAngle(playerid,RandomSpawn[rand][rA]);
    }else if(DM[playerid][2] == 1){
    SetPlayerInterior(playerid,0);
    GivePlayerWeapon(playerid,24,500);
    SetPlayerPos(playerid,-2223.0037,1217.4150,87.2109);
    SetPlayerFacingAngle(playerid,0);
    for(new i = 0; 4 > i;i++){
    if(one[playerid][i] == 1){
    SetPlayerVirtualWorld(playerid,i+1);
    }
    }
    }else if(DM[playerid][5] != 0){
    new rand = 12+random(6);
    SetPlayerInterior(playerid,3);
    GivePlayerWeapon(playerid,24,1337);
    GivePlayerWeapon(playerid,25,1337);
    SetPlayerPos(playerid,RandomSpawn[rand][rX],RandomSpawn[rand][rY],RandomSpawn[rand][rZ]);
    SetPlayerFacingAngle(playerid,RandomSpawn[rand][rA]);
    }else if(DM[playerid][4] == 1){
    new rand = 8+random(4);
    SetPlayerInterior(playerid,0);
    GivePlayerWeapon(playerid,34,500);
    SetPlayerPos(playerid,RandomSpawn[rand][rX],RandomSpawn[rand][rY],RandomSpawn[rand][rZ]);
    SetPlayerFacingAngle(playerid,RandomSpawn[rand][rA]);
    }else if(DM[playerid][6] == 1){
    new rand = 18+random(4);
    SetPlayerInterior(playerid,0);
    GivePlayerWeapon(playerid,24,250);
    GivePlayerWeapon(playerid,25,250);
    SetPlayerPos(playerid,RandomSpawn[rand][rX],RandomSpawn[rand][rY],RandomSpawn[rand][rZ]);
    SetPlayerFacingAngle(playerid,RandomSpawn[rand][rA]);
    }
    return 1;
    }


    das ist der code wenn man die Deagle Arena Beispielsweise betritt oder betreten möchte ,

    if(!strcmp("/deagle",cmdtext,true)){
    if(DM[playerid][8] == 0) return SendClientMessage(playerid,COLOR_YELLOW,"Du bist bereits in einer Arena. Benutze /leave");
    DM[playerid][0] = 1;
    DM[playerid][8] = 0;
    format(text,sizeof(text),"Spieler %s ist der Deagle Arena beigetreten!",PlayerName(playerid));
    SendClientMessageToAll(COLOR_ORANGE,text);
    SpawnPlayer(playerid);
    return 1;
    }

  • if(DM[playerid] == 0)
    {
    SetPlayerInterior(playerid,0);
    SetPlayerVirtualWorld(playerid,0);
    }
    else if(DM[playerid] == 1)
    {
    new rand = random(4);
    SetPlayerInterior(playerid,1);
    GivePlayerWeapon(playerid,24,500);
    SetPlayerPos(playerid,RandomSpawn[rand][rX],RandomSpawn[rand][rY],RandomSpawn[rand][rZ]);
    SetPlayerFacingAngle(playerid,RandomSpawn[rand][rA]);
    }
    else if(DM[playerid] == 2)
    {
    new rand = 4+random(4);
    SetPlayerInterior(playerid,10);
    GivePlayerWeapon(playerid,24,500);
    GivePlayerWeapon(playerid,25,500);
    GivePlayerWeapon(playerid,34,500);
    SetPlayerPos(playerid,RandomSpawn[rand][rX],RandomSpawn[rand][rY],RandomSpawn[rand][rZ]);
    SetPlayerFacingAngle(playerid,RandomSpawn[rand][rA]);
    }
    else if(DM[playerid] == 3)
    {
    SetPlayerInterior(playerid,0);
    GivePlayerWeapon(playerid,24,500);
    SetPlayerPos(playerid,-2223.0037,1217.4150,87.2109);
    SetPlayerFacingAngle(playerid,0);
    for(new i = 0; 4 > i;i++)
    {
    if(one[playerid][i] == 1)
    {
    SetPlayerVirtualWorld(playerid,i+1);
    }
    }
    }
    else if(DM[playerid] == 5)
    {
    new rand = 12+random(6);
    SetPlayerInterior(playerid,3);
    GivePlayerWeapon(playerid,24,1337);
    GivePlayerWeapon(playerid,25,1337);
    SetPlayerPos(playerid,RandomSpawn[rand][rX],RandomSpawn[rand][rY],RandomSpawn[rand][rZ]);
    SetPlayerFacingAngle(playerid,RandomSpawn[rand][rA]);
    }
    else if(DM[playerid] == 4)
    {
    new rand = 8+random(4);
    SetPlayerInterior(playerid,0);
    GivePlayerWeapon(playerid,34,500);
    SetPlayerPos(playerid,RandomSpawn[rand][rX],RandomSpawn[rand][rY],RandomSpawn[rand][rZ]);
    SetPlayerFacingAngle(playerid,RandomSpawn[rand][rA]);
    }
    else if(DM[playerid] == 6)
    {
    new rand = 18+random(4);
    SetPlayerInterior(playerid,0);
    GivePlayerWeapon(playerid,24,250);
    GivePlayerWeapon(playerid,25,250);
    SetPlayerPos(playerid,RandomSpawn[rand][rX],RandomSpawn[rand][rY],RandomSpawn[rand][rZ]);
    SetPlayerFacingAngle(playerid,RandomSpawn[rand][rA]);
    }
    return 1;
    }


    if(!strcmp("/deagle",cmdtext,true))
    {
    if(DM[playerid] != 0) return SendClientMessage(playerid,COLOR_YELLOW,"Du bist bereits in einer Arena. Benutze /leave");
    DM[playerid] = 1;
    format(text,sizeof(text),"Spieler %s ist der Deagle Arena beigetreten!",PlayerName(playerid));
    SendClientMessageToAll(COLOR_ORANGE,text);
    SpawnPlayer(playerid);
    return 1;
    }


    Außerdem sieht das new zu DM dann so aus:
    new DM[MAX_PLAYERS];


    Überall wo du dann einen Error bekommst, musst du die zweiten [ ] Klammern entfernen, und anstatt = 1; eben die ID des DMs eintrage (Deagle = 1).


    Dann kannst du wesentlich leichter neue hinzufügen, ohne alles zu ändern.
    DM verlassen => DM[playerid] zu 0 setzen.

  • Ne das war Ja so an sich alles richtig wollte Ja nur ne arena erstellen aber buggt dann rum wenn ich random possitionen erstellen will ?


    so sehen alle random possitionen aus ,


    new RandomSpawn[][rpos]={
    //Deagle Arena
    {2170.1455,1619.1500,999.9766,268.7325},
    {2173.8379,1578.2926,999.9676,355.0020},
    {2206.3252,1551.2097,1008.0002,275.0152},
    {2197.7476,1611.7670,999.9689,270.7063},
    //Deathmatch Arena
    {-973.5314,1098.0420,1344.9725,152.0461},
    {-1069.3160,1094.3376,1343.0927,114.9785},
    {-1134.2878,1020.9984,1345.7385,331.2432},
    {-1032.9974,1082.2256,1343.1140,253.8179},
    //Sniper Arena
    {2258.8872,1013.1470,79.5547,40.021},
    {2319.2756,1112.1581,79.5546,107.0825},
    {2240.9902,1152.4130,79.5547,204.9767},
    {2184.8640,1044.0034,79.5547,270.9966},
    //teamdm Arena
    {362.0883,184.5245,1008.3828,179.6812},
    {370.6522,185.8935,1014.1797,194.5972},
    {367.1571,158.4084,1014.1875,14.6715},
    {365.9490,158.6305,1019.9844,57.1881},
    {371.4884,172.9320,1019.9844,31.9283},
    {355.1946,188.9884,1019.9844,276.3385},
    //insel Arena
    {-2472.5017,1928.1299,1.8585,230.6389},
    {-2476.0938,1860.8207,3.1238,313.5476},
    {-2406.3843,1856.7988,2.7644,39.0885},
    {-2404.9927,1933.2521,2.8361,136.2540}
    };


    doch wenn ich eine mit drunter schreibe weiss ich nicht warum die anderen dann buggen ?

  • Das kann ich dir nicht direkt sagen, weil ich zum einen nicht weiß was buggt, und zum anderen der Code ziemlich verwirrend geschrieben ist, mit dem zweidimensionalen Array. Ändere das zu dem was ich dir gegeben habe, dann kann ich dir sagen, wie du weiter machen musst, damit du auch neue hinzufügen kannst. Aber schau erst mal, dass du es so kompiliert bekommst, ohne an sich ein neues DM hinzuzufügen.

  • Hey Ho Jeffry hab mal den Code und die Variable so umgeschrieben wie du sagtest allerdings bekomme ich Jetz errors angezeigt ich zeige dir die zeilen inclusiv die errors :


    public OnPlayerDisconnect(playerid, reason){
    SavePlayer(playerid);
    ResetPlayer(playerid);
    for(new i = 0; 9 > i; i++){
    DM[playerid][i] = 0; ( Zeile 401 )
    }
    return 1;
    }


    public OnPlayerSpawn(playerid){
    new String[128],Dm[9];
    for(new i = 0; MAX_PLAYERS > i; i++){
    for(new ii = 0; 9 > ii; ii++){
    if(DM[i][ii] == 1){
    Dm[ii]++;
    }
    }
    }


    und die errors die der compiler ausspuckt:


    C:\Users\Toastie\Documents\Test Server\gamemodes\FDM.pwn(401) : warning 215: expression has no effect
    C:\Users\Toastie\Documents\Test Server\gamemodes\FDM.pwn(401) : error 001: expected token: ";", but found "["
    C:\Users\Toastie\Documents\Test Server\gamemodes\FDM.pwn(401) : error 029: invalid expression, assumed zero
    C:\Users\Toastie\Documents\Test Server\gamemodes\FDM.pwn(401) : warning 215: expression has no effect
    C:\Users\Toastie\Documents\Test Server\gamemodes\FDM.pwn(401) : error 001: expected token: ";", but found "]"
    C:\Users\Toastie\Documents\Test Server\gamemodes\FDM.pwn(401) : fatal error 107: too many error messages on one line


    Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase



    4 Errors.

  • public OnPlayerDisconnect(playerid, reason)
    {
    SavePlayer(playerid);
    ResetPlayer(playerid);
    DM[playerid]= 0;
    return 1;
    }


    public OnPlayerSpawn(playerid)
    {
    new String[128];
    //Hier geht's weiter nehme ich an...


    Schreibe es so (ja bei OnPlayerSpawn den ganzen Teil weg, der bringt nichts).

  • do.de - Domain-Offensive - Domains für alle und zu super Preisen
  • habs entfernt bekomme in der Zeile 407 errors :D


    public OnPlayerSpawn(playerid){
    new String[128],Dm[9];
    for(new i = 0; MAX_PLAYERS > i; i++){
    for(new ii = 0; 9 > ii; ii++){
    if(DM[i][ii] == 1){ // Zeile 407
    Dm[ii]++;
    }
    }
    }


    C:\Users\Toastie\Documents\TestServer\gamemodes\FDM.pwn(407) : error 001: expected token: ")", but found "["
    C:\Users\Toastie\Documents\Test Server\gamemodes\FDM.pwn(407) : error 029: invalid expression, assumed zero
    C:\Users\Toastie\Documents\Test Server\gamemodes\FDM.pwn(407) : warning 215: expression has no effect
    C:\Users\Toastie\Documents\Test Server\gamemodes\FDM.pwn(407) : error 001: expected token: ";", but found "]"
    C:\Users\Toastie\Documents\Test Server\gamemodes\FDM.pwn(407) : fatal error 107: too many error messages on one line


    Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase



    4 Errors.


    und wenn ich das lösche Funktionier mein Compiler nicht mehr sprich : der stürzt ab / reagiert nicht mehr :/

  • OnPlayerSpawn Code:


    public OnPlayerSpawn(playerid){
    new String[128],Dm[9];
    for(new i = 0; MAX_PLAYERS > i; i++){
    for(new ii = 0; 9 > ii; ii++){
    if(DM[i][ii] == 1){
    Dm[ii]++;
    }
    }
    }
    SetPlayerSkin(playerid,PlayerInfo[playerid][pSkin]);
    format(String,sizeof(String),"/DEAGLE: %d - /DM: %d - /1O1: %d - /Test Arena: %d - /SNIPER: %d - /TEAMDM: %d - /INSEL: %d - KEIN MODUS: %d",Dm[0],Dm[1],Dm[2],Dm[3],Dm[4],Dm[5],Dm[6],Dm[7],Dm[8]);
    TextDrawSetString(Textdraw[3],String);
    if(DM[playerid] == 0)
    {
    SetPlayerInterior(playerid,0);
    SetPlayerVirtualWorld(playerid,0);
    }
    else if(DM[playerid] == 1)
    {
    new rand = random(4);
    SetPlayerInterior(playerid,1);
    GivePlayerWeapon(playerid,24,500);
    SetPlayerPos(playerid,RandomSpawn[rand][rX],RandomSpawn[rand][rY],RandomSpawn[rand][rZ]);
    SetPlayerFacingAngle(playerid,RandomSpawn[rand][rA]);
    }
    else if(DM[playerid] == 2)
    {
    new rand = 4+random(4);
    SetPlayerInterior(playerid,10);
    GivePlayerWeapon(playerid,24,500);
    GivePlayerWeapon(playerid,25,500);
    GivePlayerWeapon(playerid,34,500);
    SetPlayerPos(playerid,RandomSpawn[rand][rX],RandomSpawn[rand][rY],RandomSpawn[rand][rZ]);
    SetPlayerFacingAngle(playerid,RandomSpawn[rand][rA]);
    }
    else if(DM[playerid] == 3)
    {
    SetPlayerInterior(playerid,0);
    GivePlayerWeapon(playerid,24,500);
    SetPlayerPos(playerid,-2223.0037,1217.4150,87.2109);
    SetPlayerFacingAngle(playerid,0);
    for(new i = 0; 4 > i;i++)
    {
    if(one[playerid][i] == 1)
    {
    SetPlayerVirtualWorld(playerid,i+1);
    }
    }
    }
    else if(DM[playerid] == 5)
    {
    new rand = 12+random(6);
    SetPlayerInterior(playerid,3);
    GivePlayerWeapon(playerid,24,1337);
    GivePlayerWeapon(playerid,25,1337);
    SetPlayerPos(playerid,RandomSpawn[rand][rX],RandomSpawn[rand][rY],RandomSpawn[rand][rZ]);
    SetPlayerFacingAngle(playerid,RandomSpawn[rand][rA]);
    }
    else if(DM[playerid] == 4)
    {
    new rand = 8+random(4);
    SetPlayerInterior(playerid,0);
    GivePlayerWeapon(playerid,34,500);
    SetPlayerPos(playerid,RandomSpawn[rand][rX],RandomSpawn[rand][rY],RandomSpawn[rand][rZ]);
    SetPlayerFacingAngle(playerid,RandomSpawn[rand][rA]);
    }
    else if(DM[playerid] == 6)
    {
    new rand = 18+random(4);
    SetPlayerInterior(playerid,0);
    GivePlayerWeapon(playerid,24,250);
    GivePlayerWeapon(playerid,25,250);
    SetPlayerPos(playerid,RandomSpawn[rand][rX],RandomSpawn[rand][rY],RandomSpawn[rand][rZ]);
    SetPlayerFacingAngle(playerid,RandomSpawn[rand][rA]);
    }
    return 1;
    }

  • Dann kannst du es auch so machen:
    public OnPlayerSpawn(playerid)
    {
    new String[128],Dm[9];
    for(new i = 0; MAX_PLAYERS > i; i++)
    {
    if(IsPlayerConnected(i) && DM[i] >= 0)
    {
    Dm[DM[i]]++;
    }
    }
    SetPlayerSkin(playerid,PlayerInfo[playerid][pSkin]);
    format(String,sizeof(String),"/DEAGLE: %d - /DM: %d - /1O1: %d - /Test Arena: %d - /SNIPER: %d - /TEAMDM: %d - /INSEL: %d - KEIN MODUS: %d",Dm[1],Dm[2],Dm[3],Dm[4],Dm[5],Dm[6],Dm[7],Dm[0]);
    TextDrawSetString(Textdraw[3],String);
    if(DM[playerid] == 0)
    {
    SetPlayerInterior(playerid,0);
    SetPlayerVirtualWorld(playerid,0);
    }
    else if(DM[playerid] == 1)
    {
    new rand = random(4);
    SetPlayerInterior(playerid,1);
    GivePlayerWeapon(playerid,24,500);
    SetPlayerPos(playerid,RandomSpawn[rand][rX],RandomSpawn[rand][rY],RandomSpawn[rand][rZ]);
    SetPlayerFacingAngle(playerid,RandomSpawn[rand][rA]);
    }
    else if(DM[playerid] == 2)
    {
    new rand = 4+random(4);
    SetPlayerInterior(playerid,10);
    GivePlayerWeapon(playerid,24,500);
    GivePlayerWeapon(playerid,25,500);
    GivePlayerWeapon(playerid,34,500);
    SetPlayerPos(playerid,RandomSpawn[rand][rX],RandomSpawn[rand][rY],RandomSpawn[rand][rZ]);
    SetPlayerFacingAngle(playerid,RandomSpawn[rand][rA]);
    }
    else if(DM[playerid] == 3)
    {
    SetPlayerInterior(playerid,0);
    GivePlayerWeapon(playerid,24,500);
    SetPlayerPos(playerid,-2223.0037,1217.4150,87.2109);
    SetPlayerFacingAngle(playerid,0);
    for(new i = 0; 4 > i;i++)
    {
    if(one[playerid][i] == 1)
    {
    SetPlayerVirtualWorld(playerid,i+1);
    }
    }
    }
    else if(DM[playerid] == 5)
    {
    new rand = 12+random(6);
    SetPlayerInterior(playerid,3);
    GivePlayerWeapon(playerid,24,1337);
    GivePlayerWeapon(playerid,25,1337);
    SetPlayerPos(playerid,RandomSpawn[rand][rX],RandomSpawn[rand][rY],RandomSpawn[rand][rZ]);
    SetPlayerFacingAngle(playerid,RandomSpawn[rand][rA]);
    }
    else if(DM[playerid] == 4)
    {
    new rand = 8+random(4);
    SetPlayerInterior(playerid,0);
    GivePlayerWeapon(playerid,34,500);
    SetPlayerPos(playerid,RandomSpawn[rand][rX],RandomSpawn[rand][rY],RandomSpawn[rand][rZ]);
    SetPlayerFacingAngle(playerid,RandomSpawn[rand][rA]);
    }
    else if(DM[playerid] == 6)
    {
    new rand = 18+random(4);
    SetPlayerInterior(playerid,0);
    GivePlayerWeapon(playerid,24,250);
    GivePlayerWeapon(playerid,25,250);
    SetPlayerPos(playerid,RandomSpawn[rand][rX],RandomSpawn[rand][rY],RandomSpawn[rand][rZ]);
    SetPlayerFacingAngle(playerid,RandomSpawn[rand][rA]);
    }
    return 1;
    }

  • if(!strcmp("/deagle",cmdtext,true)){
    if(DM[playerid] != 0) return SendClientMessage(playerid,COLOR_YELLOW,"Du bist bereits in einer Arena. Benutze /leave");
    DM[playerid] = 1;
    DM[playerid] = 0;
    format(text,sizeof(text),"Spieler %s ist der Deagle Arena beigetreten!",PlayerName(playerid));
    SendClientMessageToAll(COLOR_ORANGE,text);
    SpawnPlayer(playerid);
    return 1;
    }


    ohne das zu testen schick ich dir den code muss es do so machen oder nicht bekomme zumindest erstmal keine Errors ich kann doch so die abfrage machen oder nicht?


    if(DM[playerid] != 0) return SendClientMessage(playerid,COLOR_YELLOW,"Du bist bereits in einer Arena. Benutze /leave");

  • ah oke und das bei jedem dm befehl womit ich die dm arena Betrete alles Klar ^^ wäre es vielleicht möglich eine If abfrage zu machen
    wenn der spieler im car sitz das er die dm arena nicht betreten kann ?


    //Edit du wolltes mir noch helfen wegen neuer dm arena :D

  • Das kannst du dann so machen, angenommen, dass das neue DM die ID 7 hat (das letzte in der Reihe hatte ja 6).


    public OnPlayerSpawn(playerid)
    {
    //Wenn du 7 DMs hast, dann >muss< bei "Dm" eine 8 (oder höher) rein:
    new String[128],Dm[8]; //<- Hier
    for(new i = 0; MAX_PLAYERS > i; i++)
    {
    if(IsPlayerConnected(i) && DM[i] >= 0)
    {
    Dm[DM[i]]++;
    }
    }
    SetPlayerSkin(playerid,PlayerInfo[playerid][pSkin]);
    format(String,sizeof(String),"/DEAGLE: %d - /DM: %d - /Test Arena: %d - /SNIPER: %d - /TEAMDM: %d - /INSEL: %d - /NEU %d - KEIN MODUS: %d",Dm[1],Dm[2],Dm[3],Dm[4],Dm[5],Dm[6],Dm[7],Dm[0]);
    TextDrawSetString(Textdraw[3],String);
    if(DM[playerid] == 0)
    {
    SetPlayerInterior(playerid,0);
    SetPlayerVirtualWorld(playerid,0);
    }
    else if(DM[playerid] == 1)
    {
    new rand = random(4);
    SetPlayerInterior(playerid,1);
    GivePlayerWeapon(playerid,24,500);
    SetPlayerPos(playerid,RandomSpawn[rand][rX],RandomSpawn[rand][rY],RandomSpawn[rand][rZ]);
    SetPlayerFacingAngle(playerid,RandomSpawn[rand][rA]);
    }
    else if(DM[playerid] == 2)
    {
    new rand = 4+random(4);
    SetPlayerInterior(playerid,10);
    GivePlayerWeapon(playerid,24,500);
    GivePlayerWeapon(playerid,25,500);
    GivePlayerWeapon(playerid,34,500);
    SetPlayerPos(playerid,RandomSpawn[rand][rX],RandomSpawn[rand][rY],RandomSpawn[rand][rZ]);
    SetPlayerFacingAngle(playerid,RandomSpawn[rand][rA]);
    }
    else if(DM[playerid] == 3)
    {
    SetPlayerInterior(playerid,0);
    GivePlayerWeapon(playerid,24,500);
    SetPlayerPos(playerid,-2223.0037,1217.4150,87.2109);
    SetPlayerFacingAngle(playerid,0);
    for(new i = 0; 4 > i;i++)
    {
    if(one[playerid][i] == 1)
    {
    SetPlayerVirtualWorld(playerid,i+1);
    }
    }
    }
    else if(DM[playerid] == 5)
    {
    new rand = 12+random(6);
    SetPlayerInterior(playerid,3);
    GivePlayerWeapon(playerid,24,1337);
    GivePlayerWeapon(playerid,25,1337);
    SetPlayerPos(playerid,RandomSpawn[rand][rX],RandomSpawn[rand][rY],RandomSpawn[rand][rZ]);
    SetPlayerFacingAngle(playerid,RandomSpawn[rand][rA]);
    }
    else if(DM[playerid] == 4)
    {
    new rand = 8+random(4);
    SetPlayerInterior(playerid,0);
    GivePlayerWeapon(playerid,34,500);
    SetPlayerPos(playerid,RandomSpawn[rand][rX],RandomSpawn[rand][rY],RandomSpawn[rand][rZ]);
    SetPlayerFacingAngle(playerid,RandomSpawn[rand][rA]);
    }
    else if(DM[playerid] == 6)
    {
    new rand = 18+random(4);
    SetPlayerInterior(playerid,0);
    GivePlayerWeapon(playerid,24,250);
    GivePlayerWeapon(playerid,25,250);
    SetPlayerPos(playerid,RandomSpawn[rand][rX],RandomSpawn[rand][rY],RandomSpawn[rand][rZ]);
    SetPlayerFacingAngle(playerid,RandomSpawn[rand][rA]);
    }
    else if(DM[playerid] == 7) //Angenommen das neue DM hat die Nummer 7
    {
    new rand = 22+random(4); //Im Array, Position 23 bis 26 (entsprechend Array-Index 22 - 25)
    SetPlayerInterior(playerid,0);
    GivePlayerWeapon(playerid,16,250);
    GivePlayerWeapon(playerid,17,250);
    SetPlayerPos(playerid,RandomSpawn[rand][rX],RandomSpawn[rand][rY],RandomSpawn[rand][rZ]);
    SetPlayerFacingAngle(playerid,RandomSpawn[rand][rA]);
    }
    return 1;
    }


    Und:
    new RandomSpawn[][rpos] = {
    //Deagle Arena
    {2170.1455,1619.1500,999.9766,268.7325},
    {2173.8379,1578.2926,999.9676,355.0020},
    {2206.3252,1551.2097,1008.0002,275.0152},
    {2197.7476,1611.7670,999.9689,270.7063},
    //Deathmatch Arena
    {-973.5314,1098.0420,1344.9725,152.0461},
    {-1069.3160,1094.3376,1343.0927,114.9785},
    {-1134.2878,1020.9984,1345.7385,331.2432},
    {-1032.9974,1082.2256,1343.1140,253.8179},
    //Sniper Arena
    {2258.8872,1013.1470,79.5547,40.021},
    {2319.2756,1112.1581,79.5546,107.0825},
    {2240.9902,1152.4130,79.5547,204.9767},
    {2184.8640,1044.0034,79.5547,270.9966},
    //teamdm Arena
    {362.0883,184.5245,1008.3828,179.6812},
    {370.6522,185.8935,1014.1797,194.5972},
    {367.1571,158.4084,1014.1875,14.6715},
    {365.9490,158.6305,1019.9844,57.1881},
    {371.4884,172.9320,1019.9844,31.9283},
    {355.1946,188.9884,1019.9844,276.3385},
    //insel Arena
    {-2472.5017,1928.1299,1.8585,230.6389},
    {-2476.0938,1860.8207,3.1238,313.5476},
    {-2406.3843,1856.7988,2.7644,39.0885},
    {-2404.9927,1933.2521,2.8361,136.2540},
    //NEU
    {-2472.5017,1928.1299,1.8585,230.6389},
    {-2476.0938,1860.8207,3.1238,313.5476},
    {-2406.3843,1856.7988,2.7644,39.0885},
    {-2404.9927,1933.2521,2.8361,136.2540} //Nur die letzte Zeile im ganzen Array hat kein Komma!
    };


    Die Koordinaten im Array unter NEU musst du natürlich entsprechend zu den Koordinaten in der NEU-Area ändern.