SERVER crasht

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 leute ich hab ein problem immer wenn ich mich einlloge crash mein spiel wieso??




    //includes
    #include <a_samp>
    #include C:\Users\alexw_000\Desktop\Tuts\pawno\include\ocmd
    #include C:\Users\alexw_000\Desktop\Tuts\pawno\include\dini
    //Farben
    #define grau 0xAFAFAFAA
    #define grün 0x33AA33AA
    #define rot 0xAA3333AA
    #define gelb 0xFFFF00AA
    #define weis 0xFFFFFFFF
    #define blau 0x0A00FFFF
    #define hellblau 0x00F5FFFF


    //Dialoge
    #define DIALOG_REGISTER 1
    #define DIALOG_LOGIN 2
    #define DIALOG_TEAM 3
    #define EQUIP 4
    #define DIALOG_FIGHT 5
    //enum
    enum SInfo
    {
    Adminlevel,
    Banned,
    Geld,
    Level,
    Team,
    RG,
    loggedin
    }
    new SpielerInfo[MAX_PLAYERS][SInfo];


    //Variablen


    new spawnskins[30]={1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30};



    //Timer


    //Forwards




    main()
    {
    print("\n----------------------------------");
    print(" Blank Gamemode by your name here");
    print("----------------------------------\n");
    }




    public OnGameModeInit()
    {
    //===============objecte==============


    CreateObject(3749, 1276.09998, -1269.19995, 18.4, 0, 0, 0);
    CreateObject(980, 1276.09998, -1271, 15.3, 0, 0, 0);
    CreateObject(985, 1254.30005, -1158.40002, 22.8, 0, 0, 178);

    //=============object ende============


    //==============Normale Pickups==============//
    CreatePickup(1239,1,1279.6877,-1211.7955,13.6797,0);
    CreatePickup(1239,1,501.9218,-67.5644,998.7578,0);
    CreatePickup(1240,2,508.2881,-86.7710,998.9609,0);
    CreatePickup(1254,1,488.3940,-83.0638,998.7578,0);
    //=============Pickup ende===================//

    //=============3DTextLabel==========
    Create3DTextLabel("Gib /enter ein wenn du zum Roten Team Gehörst",weis,1279.6877,-1211.7955,13.6797,10,0,0);
    Create3DTextLabel("wenn du dich heilen willst und zum roten Team gehörst dann gib bitte /heilen ein",weis,508.2881,-86.7710,998.9609,10,0,0);
    Create3DTextLabel(" /equip",weis,488.3940,-83.0638,998.7578,10,0,0);
    DisableInteriorEnterExits();
    SendRconCommand("mapname SFDG");
    SetGameModeText("[ToT]DM v0.1");
    AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
    SetTimer("Sname",10000,true);
    return 1;
    }


    public OnGameModeExit()
    {
    return 1;
    }


    public OnPlayerRequestClass(playerid, classid)
    {
    SetSpawnInfo(playerid,0,spawnskins[random(sizeof(spawnskins))],1958.3783, 1343.1572, 15.3746,0,0,0,0,0,0,0);
    SpawnPlayer(playerid);
    return 1;
    }


    public OnPlayerConnect(playerid)
    {
    new Spielerdatei[64];
    new name[MAX_PLAYER_NAME];
    GetPlayerName(playerid,name,sizeof(name));
    format(Spielerdatei,sizeof(Spielerdatei),"/Accounts/%s.ini",name);
    if(dini_Exists(Spielerdatei))
    {
    ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_PASSWORD,"Login","Hallo dein Account wurde gefunden, bitte lgge dich mit deinem Passwort ein","Login","Abbrechen");


    }
    else
    {


    ShowPlayerDialog(playerid,DIALOG_REGISTER,DIALOG_STYLE_INPUT,"Regestrieren","Hallo dein Account wurde nicht gefunden, bitte gebe ein passwort um dich Rgestrieren","Regestrieren","Abbrechen");
    }
    return 1;
    }


    public OnPlayerDisconnect(playerid, reason)
    {
    SpielerSpeichern(playerid);
    return 1;
    }


    public OnPlayerSpawn(playerid)
    {
    if(SpielerInfo[playerid][RG] == 1)
    {
    if(SpielerInfo[playerid][Team] == 0)
    {
    ShowPlayerDialog(playerid,DIALOG_TEAM,DIALOG_STYLE_LIST,"Wähle ein Team aus","RED_TEAM\nBLUE_TEAM\nBLACK_TEAM\nUNDERCOVER","Wählen","Abbrechen");
    }
    else
    {


    }
    if(SpielerInfo[playerid][Team] == 0)
    {
    new team0;
    team0=(SetPlayerFacingAngle(playerid,173.2616));
    SetPlayerPos(playerid,1726.6128,-1635.5125,20.2167);
    SetPlayerFacingAngle(playerid,team0);
    }
    if(SpielerInfo[playerid][Team] == 1)
    {
    SetPlayerPos(playerid,1279.6877,-1211.7955,13.6797);
    SetPlayerFacingAngle(playerid,355.1736);
    SetPlayerInterior(playerid,0);
    SendClientMessage(playerid,rot,"Du bist im Roten Team");
    SetPlayerSkin(playerid,411); // join halt ma per teamviewer ins ingame!
    }
    }
    return 1;
    }


    public OnPlayerDeath(playerid, killerid, reason)
    {
    return 1;
    }


    public OnVehicleSpawn(vehicleid)
    {
    return 1;
    }


    public OnVehicleDeath(vehicleid, killerid)
    {
    return 1;
    }


    public OnPlayerText(playerid, text[])
    {
    return 1;
    }


    public OnPlayerCommandText(playerid, cmdtext[])
    {
    if (strcmp("/mycommand", cmdtext, true, 10) == 0)
    {
    // Do something here
    return 1;
    }
    return 0;
    }


    public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
    {
    return 1;
    }


    public OnPlayerExitVehicle(playerid, vehicleid)
    {
    return 1;
    }


    public OnPlayerStateChange(playerid, newstate, oldstate)
    {
    return 1;
    }


    public OnPlayerEnterCheckpoint(playerid)
    {
    return 1;
    }


    public OnPlayerLeaveCheckpoint(playerid)
    {
    return 1;
    }


    public OnPlayerEnterRaceCheckpoint(playerid)
    {
    return 1;
    }


    public OnPlayerLeaveRaceCheckpoint(playerid)
    {
    return 1;
    }


    public OnRconCommand(cmd[])
    {
    return 1;
    }


    public OnPlayerRequestSpawn(playerid)
    {
    return 1;
    }


    public OnObjectMoved(objectid)
    {
    return 1;
    }


    public OnPlayerObjectMoved(playerid, objectid)
    {
    return 1;
    }


    public OnPlayerPickUpPickup(playerid, pickupid)
    {
    return 1;
    }


    public OnVehicleMod(playerid, vehicleid, componentid)
    {
    return 1;
    }


    public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
    {
    return 1;
    }


    public OnVehicleRespray(playerid, vehicleid, color1, color2)
    {
    return 1;
    }


    public OnPlayerSelectedMenuRow(playerid, row)
    {
    return 1;
    }


    public OnPlayerExitedMenu(playerid)
    {
    return 1;
    }


    public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
    {
    return 1;
    }


    public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
    {
    return 1;
    }


    public OnRconLoginAttempt(ip[], password[], success)
    {
    return 1;
    }


    public OnPlayerUpdate(playerid)
    {
    return 1;
    }


    public OnPlayerStreamIn(playerid, forplayerid)
    {
    return 1;
    }


    public OnPlayerStreamOut(playerid, forplayerid)
    {
    return 1;
    }


    public OnVehicleStreamIn(vehicleid, forplayerid)
    {
    return 1;
    }


    public OnVehicleStreamOut(vehicleid, forplayerid)
    {
    return 1;
    }


    public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
    {
    if(dialogid == DIALOG_FIGHT)
    {
    if(response == 0)
    {
    return 1;
    }
    if(response == 1)
    {
    return 0;
    }
    if(listitem == 0)
    {
    SetPlayerFightingStyle(playerid,FIGHT_STYLE_NORMAL);
    }
    if(listitem == 1)
    {
    SetPlayerFightingStyle(playerid,FIGHT_STYLE_BOXING);
    }
    if(listitem == 2)
    {
    SetPlayerFightingStyle(playerid,FIGHT_STYLE_KUNGFU);
    }
    if(listitem == 3)
    {
    SetPlayerFightingStyle(playerid,FIGHT_STYLE_KNEEHEAD);
    }
    if(listitem == 4)
    {
    SetPlayerFightingStyle(playerid,FIGHT_STYLE_GRABKICK);
    }
    if(listitem == 5)
    {
    SetPlayerFightingStyle(playerid,FIGHT_STYLE_ELBOW);
    }
    }
    if(dialogid == EQUIP)
    {
    if(response == 0)
    {
    return 1;
    }
    if(response == 1)
    {
    if(listitem == 0)
    {
    GivePlayerWeapon(playerid,24,300);
    }
    if(listitem == 1)
    {
    GivePlayerWeapon(playerid,31,250);
    }
    }
    }
    if(dialogid == DIALOG_TEAM)
    {
    if(response == 0)
    {
    return 1;
    }
    if(response == 1)
    {


    }
    if(listitem == 0)
    {
    SpielerInfo[playerid][Team] =1;
    SendClientMessage(playerid,rot,"Du hast das Rote Team gewählt");
    SpielerSpeichern(playerid);
    }
    if(listitem == 1)
    {
    SpielerInfo[playerid][Team] =2;
    SendClientMessage(playerid,rot,"Du hast das Blaue Team gewählt");
    SpielerSpeichern(playerid);
    }
    if(listitem == 2)
    {
    SpielerInfo[playerid][Team] = 3;
    SendClientMessage(playerid,rot,"Du hast das Schwarze Team gewählt");
    SpielerSpeichern(playerid);
    }
    if(listitem == 3)
    {
    SpielerInfo[playerid][Team] = 4;
    SendClientMessage(playerid,rot,">>>Du bist nun dein eigener Chef<<<");
    SendClientMessage(playerid,rot,">>>Pass auf das dich keiner sieht<<<");
    SpielerSpeichern(playerid);
    }
    }
    if(dialogid == DIALOG_LOGIN)
    {
    if(response == 0)
    {
    SendClientMessage(playerid,rot,"Du hast den LOGIN Vorgang abgebrochen!!!");
    Kick(playerid);
    }
    if(response == 1)
    {
    if(!strlen(inputtext))
    {
    SendClientMessage(playerid,rot,"Das Passwort war nicht lang genug!");
    ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_INPUT,"LOGIN","Das von dir eingegebene Passwort war nicht lang genug!\nEs muss mindesten 1 Buchstabe sein!","Login","Abbrechen");
    return 1;
    }
    else
    {
    Login(playerid,inputtext);//Kurz meine oizza holn :D pizza? :DD // ich bin aufm klo so xD
    return 1;
    }
    }
    }
    if(dialogid == DIALOG_REGISTER)
    {
    if(response == 0)
    {
    SendClientMessage(playerid,rot,"Du hast den Regestrier vorgang auf unserem server abbgebrochen!");
    SendClientMessage(playerid,weis,"Du wurdest gekickt!");
    Kick(playerid);
    return 1;
    }
    if(response == 1)
    {
    if(!strlen(inputtext))
    {
    SendClientMessage(playerid,rot,"Das Passwort war nicht lang genug!");
    ShowPlayerDialog(playerid,DIALOG_REGISTER,DIALOG_STYLE_PASSWORD,"Regestrieren","Das von dir eingegebene Passwort war nicht lang genug!\nEs muss mindesten 1 Buchstabe sein!","Regestrieren","Abbrechen");
    return 1;
    }
    else
    {
    Register(playerid,inputtext);
    return 1;
    }
    }
    }
    return 0;


    }


    public OnPlayerClickPlayer(playerid, clickedplayerid, source)
    {
    return 1;
    }


    stock Register(playerid,key[])
    {
    new Spielerdatei[64];
    new name[MAX_PLAYER_NAME];
    GetPlayerName(playerid,name,sizeof(name));
    format(Spielerdatei,sizeof(Spielerdatei),"/Accounts/%s.ini",name);
    dini_Create(Spielerdatei);
    dini_Set(Spielerdatei,"Passwort",key);
    SendClientMessage(playerid,blau,"Du hast dich Bei [Tot]DM Regestriert!");
    SpawnPlayer(playerid);
    ResetVariablen(playerid);
    return 1;
    }
    stock Login(playerid,key[])
    {
    new Spielerdatei[64];
    new name[MAX_PLAYER_NAME];
    GetPlayerName(playerid,name,sizeof(name));
    format(Spielerdatei,sizeof(Spielerdatei),"/Accounts/%s.ini",name);
    if(!strcmp(key,dini_Get(Spielerdatei,"Passwort"),true))
    {
    LoadAccount(playerid);
    SendClientMessage(playerid,blau,"Willkommen zurück auf [ToT]Dm!");
    SpawnPlayer(playerid);
    return 1;
    }
    else
    {
    SendClientMessage(playerid,rot,"Das passwort ist inkorrekt!");
    ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_PASSWORD,"einloggen","Hallo und Herzlichen Willkommen bei [ToT]Dm","LoGIN","abbrechen");
    }
    return 1;
    }
    stock LoadAccount(playerid)
    {
    new Spielerdatei[64];
    new name[MAX_PLAYER_NAME];
    GetPlayerName(playerid,name,sizeof(name));
    format(Spielerdatei,sizeof(Spielerdatei),"/Accounts/%s.ini",name);
    SetPlayerScore(playerid,dini_Int(Spielerdatei,"Level"));
    GivePlayerMoney(playerid,dini_Int(Spielerdatei,"Geld"));


    SpielerInfo[playerid][Adminlevel]=dini_Int(Spielerdatei,"Adminlevel");
    SpielerInfo[playerid][Team]=dini_Int(Spielerdatei,"Team");
    SpielerInfo[playerid][Banned] = dini_Int(Spielerdatei,"Banned");
    SpielerInfo[playerid][RG] = dini_Int(Spielerdatei,"RG");
    return 1;
    }


    stock SpielerSpeichern(playerid)
    {
    new Spielerdatei[64];
    new name[MAX_PLAYER_NAME];
    GetPlayerName(playerid,name,sizeof(name));
    format(Spielerdatei,sizeof(Spielerdatei),"/Accounts/%s.ini",name);
    dini_IntSet(Spielerdatei,"Level",GetPlayerScore(playerid));
    dini_IntSet(Spielerdatei,"Geld",GetPlayerMoney(playerid));
    dini_IntSet(Spielerdatei,"Adminlevel",SpielerInfo[playerid][Adminlevel]);
    dini_IntSet(Spielerdatei,"Team",SpielerInfo[playerid][Team]);
    dini_IntSet(Spielerdatei,"Banned",SpielerInfo[playerid][Banned]);
    dini_IntSet(Spielerdatei,"RG",SpielerInfo[playerid][RG]);
    return 1;
    }


    stock ResetVariablen(playerid)
    {
    SpielerInfo[playerid][Adminlevel]=0;
    SpielerInfo[playerid][Team]=0;
    SpielerInfo[playerid][Geld]=0;
    SpielerInfo[playerid][RG]=1;
    SetPlayerScore(playerid,1);
    SpielerSpeichern(playerid);
    return 1;
    }


    stock ReturnUser(text[], playerid = INVALID_PLAYER_ID)
    {
    new pos = 0;
    while (text[pos] < 0x21)
    {
    if (text[pos] == 0) return INVALID_PLAYER_ID;
    pos++;
    }
    new userid = INVALID_PLAYER_ID;
    if (IsNumeric(text[pos]))
    {
    userid = strval(text[pos]);
    if (userid >=0 && userid < MAX_PLAYERS)
    {
    if(!IsPlayerConnected(userid))
    {
    userid = INVALID_PLAYER_ID;
    }
    else
    {
    return userid;
    }
    }
    }
    new len = strlen(text[pos]);
    new count = 0;
    new name[MAX_PLAYER_NAME];
    for (new i = 0; i < MAX_PLAYERS; i++)
    {
    if (IsPlayerConnected(i))
    {
    GetPlayerName(i, name, sizeof (name));
    if (strcmp(name, text[pos], true, len) == 0)
    {
    if (len == strlen(name))
    {
    return i;
    }
    else
    {
    count++;
    userid = i;
    }
    }
    }
    }
    if (count != 1)
    {
    if (playerid != INVALID_PLAYER_ID)
    {
    if (count)
    {
    SendClientMessage(playerid, 0xFF0000AA, "Multiple users found, please narrow search.");
    }
    else
    {
    SendClientMessage(playerid, 0xFF0000AA, "No matching user found.");
    }
    }
    userid = INVALID_PLAYER_ID;
    }
    return userid;
    }



    stock Spielername(playerid)
    {
    new name[MAX_PLAYERS];
    GetPlayerName(playerid,name,sizeof(name));
    return name;
    }



    ocmd:enter(playerid)
    {
    if(IsPlayerInRangeOfPoint(playerid,3,1279.6877,-1211.7955,13.6797))
    {
    if(SpielerInfo[playerid][Team] == 1 || SpielerInfo[playerid][loggedin] == 1 || SpielerInfo[playerid][RG] == 1)
    {
    SetPlayerPos(playerid,502.6786,-70.8577,998.7578);
    SetPlayerFacingAngle(playerid,180.8051);
    SetPlayerInterior(playerid,11);
    }
    else
    {
    SendClientMessage(playerid,rot,"Du bist nicht im Roten Team!");
    SendClientMessage(playerid,rot,"Du bist ja noch nicht mal eingeloggt??");
    SendClientMessage(playerid,rot,"Und regestriert bist du auch nicht!");
    }
    }

    return 1;
    }


    ocmd:exit(playerid)
    {
    if(IsPlayerInRangeOfPoint(playerid,2,501.9218,-67.5644,998.7578))
    {
    SetPlayerPos(playerid,1279.7738,-1214.9801,13.6797);
    SetPlayerInterior(playerid,0);
    }
    else
    {
    SendClientMessage(playerid,rot,"Du bist an keinem Ausgang!");
    }
    return 1;
    }


    ocmd:equip(playerid)
    {
    if(IsPlayerInRangeOfPoint(playerid,3,488.3940,-83.0638,998.7578))
    {
    ShowPlayerDialog(playerid,EQUIP,DIALOG_STYLE_LIST,"Ausrüsten","Deagle\nM4","Wählen","Abbrechen");
    }
    }


    ocmd:style(playerid)
    {
    if(SpielerInfo[playerid][Adminlevel] == 3 || SpielerInfo[playerid][Adminlevel] == 4 || SpielerInfo[playerid][Adminlevel] == 5 || SpielerInfo[playerid][Adminlevel] == 6)
    {
    ShowPlayerDialog(playerid,DIALOG_FIGHT,DIALOG_STYLE_LIST,"Fight Style","Normal\r\nBoxing\r\nKungfu\r\nKneehead\r\nGrabkick\r\nElbow","Wählen","Abbrechen");
    }
    else
    {
    SendClientMessage(playerid,rot,"Du bist kein Admin=?");
    }


    }


    public Sname()
    {
    SendRconCommand("hostname German DM");
    SetTimer("sname",5000,true);
    }


    public sname()
    {
    SendRconCommand("hostname DM CITY");
    }