Beiträge von Jony_King

    Einfache Lösung.


    new DMspawn[MAX_PLAYERS];


    public OnPlayerConnect(playerid)


    DMspawn[playerid] = 0;


    public OnPlayerDeath(playerid, killerid, reason)


    DMspawn[playerid] = 1;


    public OnPlayerSpawn(playerid)


    if(DMspawn[playerid] == 1)
    {
    //do somehting
    }
    //house spawn

    public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
    {
    new sendername[MAX_PLAYER_NAME];
    new string[128];
    if(response)
    {
    if(dialogid == 12346 || dialogid == 12347)
    {
    if(strlen(inputtext))
    {
    //new tmppass[64];
    //strmid(tmppass, inputtext, 0, strlen(inputtext), 255);
    //Encrypt(tmppass);
    OnPlayerLogin(playerid,inputtext);
    }
    else
    {
    new loginstring[128];
    new loginname[64];
    GetPlayerName(playerid,loginname,sizeof(loginname));
    format(loginstring,sizeof(loginstring),"Falsches Passwort\nBitte gebe dein Richtiges ein:",loginname);
    ShowPlayerDialog(playerid,12347,DIALOG_STYLE_INPUT,"Login",loginstring,"Login","Exit");
    gPlayerLogTries[playerid] += 1;
    if(gPlayerLogTries[playerid] == 5) { Ban(playerid); }
    }
    }
    if(dialogid == 12345)
    {
    if(strlen(inputtext))
    {
    GetPlayerName(playerid, sendername, sizeof(sendername));
    format(string, sizeof(string), "%s.ini", sendername);
    new File: hFile = fopen(string, io_read);
    if (hFile)
    {
    SendClientMessage(playerid, COLOR_YELLOW, "Dieser Benutzername ist bereits vergeben bitte benutze ein anderes.");
    fclose(hFile);
    return 1;
    }
    //new tmppass[64];
    //strmid(tmppass, inputtext, 0, strlen(inputtext), 255);
    //Encrypt(tmppass);
    OnPlayerRegister(playerid,inputtext);
    }
    else
    {
    new regstring[128];
    new regname[64];
    GetPlayerName(playerid,regname,sizeof(regname));
    format(regstring,sizeof(regstring),"Willkommen, %s\nDu hast keinen Account.\nBitte registriere dich:",regname);
    ShowPlayerDialog(playerid,12345,DIALOG_STYLE_INPUT,"Register",regstring,"Register","Exit");
    }
    }
    }
    else
    {
    Kick(playerid);
    }
    return 1;
    }

    public OnPlayerSpawn(playerid)
    {
    new playa[MAX_PLAYER_NAME];
    new string[256], string2[256], string3[256];
    GetPlayerName(playerid, playa, sizeof(playa));
    format(string3, sizeof(string3), "~y~Willkommen ~r~%s",
    playa);
    GameTextForPlayer(playerid,string, 5000, 1);
    if(AccountInfo[playerid][aAdmin] >= 1331)
    {
    format(string, sizeof(string), "SERVER: Du hast dich als %d Admin eingeloggt.", AccountInfo[playerid][aAdmin]);
    format(string2, sizeof(string2), "SERVER: You logged in as an %d Admin.", AccountInfo[playerid][aAdmin]);
    SendLanguageMessage(playerid, COLOR_WHITE,string, string2);
    }
    Spawn(playerid);
    return 1;
    }


    public Spawn(playerid)
    {
    if(IsPlayerNPC(playerid))
    {
    new npcname[MAX_PLAYER_NAME];
    GetPlayerName(playerid, npcname, sizeof(npcname));
    if(!strcmp(npcname, "David", true))
    {
    PutPlayerInVehicle(playerid, Train, 0);
    SetPlayerColor(playerid,COLOR_GREY);
    SetPlayerSkin(playerid, 61);
    Attach3DTextLabelToVehicle(trainname, Train, 0, 0, 2);
    print("NPC David spawned succesfully");
    }
    if(!strcmp(npcname, "Curtis", true))
    {
    SetPlayerPos(playerid, -1981.9558,216.5025,27.6875);
    SetPlayerSkin(playerid, 19);
    SetPlayerColor(playerid,COLOR_GREY);
    print("NPC Curtis spawned succesfully");
    return 1;
    }
    if(!strcmp(npcname, "Hans", true))
    {
    PutPlayerInVehicle(playerid, Bus, 0);
    SetPlayerColor(playerid,COLOR_GREY);
    SetPlayerSkin(playerid, 61);
    Attach3DTextLabelToVehicle(busname, Bus, 0, 0, 2);
    print("NPC Hans spawned succesfully");
    }
    if(!strcmp(npcname, "Mike", true))
    {
    SetPlayerColor(playerid,COLOR_GREY);
    SetPlayerSkin(playerid, 28);
    SetPlayerPos(playerid, -2130.2844,118.7224,35.3203);
    print("NPC Mike spawned succesfully");
    Attach3DTextLabelToPlayer(mike, playerid, 0,0,2);
    }
    if(!strcmp(npcname, "Tempenny", true))
    {
    SetPlayerColor(playerid,COLOR_GREY);
    SetPlayerSkin(playerid, 280);
    PutPlayerInVehicle(playerid, SFPDCAR, 0);
    SetPlayerHealth(playerid, 200);
    print("NPC Tempenny spawned succesfully");
    }
    if(!strcmp(npcname, "Crank", true))
    {
    SetPlayerColor(playerid,COLOR_GREY);
    SetPlayerSkin(playerid, 20);
    SetPlayerPos(playerid, -2076.9883,90.5159,32.5000);
    print("NPC Crank spawned succesfully");
    }
    if(!strcmp(npcname, "Peter", true))
    {
    SetPlayerColor(playerid,COLOR_GREY);
    SetPlayerSkin(playerid, 67);
    SetPlayerPos(playerid, -2661.6501,1487.7900,7.1875);
    print("NPC Peter spawned succesfully");
    }
    return 1;
    }


    if(AccountInfo[playerid][aMember] == 0 || AccountInfo[playerid][aLeader] == 0)
    {
    SetPlayerPos(playerid, -1753.7471,957.9511,24.8828);
    SetPlayerFacingAngle(playerid, 184);
    SetPlayerInterior(playerid, 0);
    SetPlayerVirtualWorld(playerid, 0);
    AccountInfo[playerid][aSpawned] = 1;
    SetCameraBehindPlayer(playerid);
    return 1;
    }
    if(IsAStateMember(playerid))
    {
    StateSpawn(playerid);
    }
    //PlayerMoney[playerid] = AccountInfo[playerid][aCash];
    return 1;
    }

    Ich hab hier nen SA:MP Bug. Nachdem wir unseren Selfmade GM mit Punkbuster Anti-Cheat ausgestattet habe, kommt immer diese Meldung (auch nach löschen von Junkbuster).


    Du meinst du wärst was bessers, und das finde ich scheiße. Ich lästere auch nicht +ber Noobs ab und zeig dene das ich was besseres bin (wenn es so wäre). Wir sind alle gleichgestellet, und dass solltest du dir mal durch deinen Kopf gehene lassen. Und desweiteren hab ich dsa Gefühl, das Projekte der Moderatoren total bevorzugt wird o.Ä..

    Speicher einfach wie du auch deine SpielerDaten speicherst ab.


    if(strcmp(cmd, "/savespawn", true) == 0 || strcmp(cmd, "/sv", true) == 0)
    {
    if(IsPlayerConnected(playerid))
    {
    tmp = strtok(cmdtext, idx);
    if(!strlen(tmp))
    {
    SendClientMessage(playerid, COLOR_WHITE, "/savespawn [id]");
    return 1;
    }
    new giveplayerid = ReturnUser(tmp);
    if(IsPlayerConnected(giveplayerid))
    {
    new Float:SVx, Float:SVy, Float:SVz;
    GetPlayerPos(giveplayerid, SVx, SVy, SVz);
    SpielerInfo[giveplayerid][pSpawnSaveX] = SVx;
    SpielerInfo[giveplayerid][pSpawnSaveY] = SVy;
    SpielerInfo[giveplayerid][pSpawnSaveZ] = SVz;
    return 1;
    }
    return 1;
    }


    Gilt nur als BEISPIEL !