Beiträge von Mendez.

    Ja Moin,
    wenn ich Spawne ist alles Grau und wenn ich /deagle o.Ä eingebe steht da du bist bereits in einer Arena 8|


    OnPlayerSpawn:


    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 - /GANGFIGHT: %d - /SNIPER: %d - /TEAMDM: %d - /INSEL: %d - /CBUG: %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][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;
    }

    loose indentation brauchst du eigentlich nicht zu beachten, außer du möchtest ein perfekt aussehendes Script :saint:
    benutze dafür dat hier:
    public OnPlayerSpawn(playerid){ if(deagl[playerid] == 1) { new rand = random(sizeof(DeagleSpawns)); SetPlayerPos(playerid, DeagleSpawns[rand][0], DeagleSpawns[rand][1] , DeagleSpawns[rand][2]); SetPlayerFacingAngle(playerid, DeagleSpawns[rand][3]); SetPlayerInterior(playerid, 1);} return 1;}


    Zu den anderen Sachen, @Kaliber , übernimm mal bitte :whistling:

    Leider ohne erfolg

    Guten Tag,
    erstmal zu denn Warning:


    C:\Users\sd\Desktop\DM Self\gamemodes\self.pwn(59) : warning 217: loose indentation
    Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


    1 Warning.



    public OnPlayerSpawn(playerid)
    {
    if(deagl[playerid] == 1) { new rand = random(sizeof(DeagleSpawns));
    SetPlayerPos(playerid, DeagleSpawns[rand][0], DeagleSpawns[rand][1] , DeagleSpawns[rand][2]);
    SetPlayerFacingAngle(playerid, DeagleSpawns[rand][3]);
    SetPlayerInterior(playerid, 1);}
    return 1;
    }


    Und jetzt zum Exit,
    also wenn ich /exit eingebe steht da du bist in keiner Arena


    ocmd:exit(playerid, params[])
    {
    if(PlayerInArena[playerid] != true)return SendClientMessage(playerid, COLOR_GREY, "Du bist in keiner Arena.");
    PlayerInArena[playerid] = false;
    ResetPlayerWeapons(playerid);
    SetPlayerPos(playerid, 0.0, 0.0, 0.0); // Ändern
    SetPlayerVirtualWorld(playerid, 0);


    new name[MAX_PLAYER_NAME];
    GetPlayerName(playerid, name, MAX_PLAYER_NAME);
    new str[145];
    format(str, sizeof(str), "Spieler %s hat die Deagle Arena verlassen.", name), SendClientMessageToAll(COLOR_BETRETEN, str);
    return 1;
    }


    /deagle Befehl


    ocmd:deagle(playerid,params[])
    {
    if(Deagle[playerid] ==0)
    {
    new rand = random(sizeof(DeagleSpawns));
    SetPlayerPos(playerid,DeagleSpawns[rand][0],DeagleSpawns[rand][1],DeagleSpawns[rand][2]);
    SetPlayerFacingAngle(playerid,DeagleSpawns[rand][3]);
    new pName[MAX_PLAYER_NAME];
    new string[128];
    GetPlayerName(playerid, pName, sizeof(pName));
    format(string, sizeof(string), "%s hat die Deagle Arena betreten.", pName);
    SendClientMessageToAll(COLOR_BETRETEN, string);
    Deagle[playerid] = 1;
    ResetPlayerWeapons(playerid);
    GivePlayerWeapon(playerid,24,500);
    SetPlayerHealth(playerid, 100);
    SetPlayerArmour(playerid, 100);
    SetPlayerInterior(playerid,1);
    }
    else if(Deagle[playerid] == 1)
    {
    SendClientMessage(playerid,COLOR_BETRETEN,"Du bist bereits in einer Arena Tippe /exit um sie zu verlassen");
    }
    return 1;
    }