Beiträge von core_61

    Hi leude ;)


    ComaCrew.pwn(60) : warning 202: number of arguments does not match definition


    Die zeile:


    public OnGameModeInit()
    {
    AllowAdminTeleport(1);
    SetTimer("timer",100,1);
    UsePlayerPedAnims();
    ShowPlayerMarkers(0);
    SetGameModeText("RealLife 0.01a");
    AddPlayerClass(28,2505.5557,-1666.7076,13.3802,94.3235,0,0,0,0,0,0); // Nigga

    GANG1 = GangZoneCreate(2421,56, -1733,182, 2535,645, -1634,489);

    return 1;
    }


    weiß nicht warum die warnings kommen, gesammt 4 davon ;) alle die zeile.


    MfG

    Hi leude,
    ich zeig euch mal wie ihr Weapon Drop in eurem Script eibauen könnt :thumbup: .


    1.Die Includes
    #include <a_samp>
    #include <core>
    #include <float>


    2.Forwards
    forward DropPlayerWeapons(playerid);
    forward DeletePickup(pickupid);
    forward GetWeaponModel(weaponid);


    3.New's

    new DropLimit=6;
    new DeleteTime=10;


    DropLimit=X = wieviele Waffen gedropt werden
    DeleteTime=x = wieviele Sekunden die Waffe/n liegen bleiben


    4.Publics
    public OnPlayerDeath(playerid, killerid, reason)
    {
    DropPlayerWeapons(playerid);
    return 1;
    }


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


    public DropPlayerWeapons(playerid)
    {
    new playerweapons[13][2];
    new Float:x,Float:y,Float:z;
    GetPlayerPos(playerid, x, y, z);


    for(new i=0;i<13;i++){
    GetPlayerWeaponData(playerid, i, playerweapons[i][0], playerweapons[i][1]);
    new model=GetWeaponModel(playerweapons[i][0]);
    new times=floatround(playerweapons[i][1]/10.0001);
    new string[256];
    format(string, sizeof(string), "%d", times);
    times=strval(string);
    new Float:X=x+(random(3)-random(3));
    new Float:Y=y+(random(3)-random(3));
    if(playerweapons[i][1]!=0)
    {
    if(times>DropLimit) times=DropLimit;
    for(new a=0;a<times;a++)
    {
    if(model!=-1)
    {
    new pickupid=CreatePickup(model, 3, X, Y, z);
    SetTimerEx("DeletePickup", DeleteTime*1000, false, "d", pickupid);
    }
    }
    }
    }
    return 1;
    }


    public DeletePickup(pickupid)
    {
    DestroyPickup(pickupid);
    return 1;
    }


    public GetWeaponModel(weaponid)
    {
    new model;


    switch(weaponid)
    {
    case 1: model=331; case 2: model=333; case 3: model=334;
    case 4: model=335; case 5: model=336; case 6: model=337;
    case 7: model=338; case 8: model=339; case 9: model=341;
    case 10: model=321; case 11: model=322; case 12: model=323;
    case 13: model=324; case 14: model=325; case 15: model=326;
    case 16: model=342; case 17: model=343; case 18: model=344;
    case 22: model=346; case 23: model=347; case 24: model=348;
    case 25: model=349; case 26: model=350; case 27: model=351;
    case 28: model=352; case 29: model=353; case 30: model=355;
    case 31: model=356; case 32: model=372; case 33: model=357;
    case 34: model=358; case 35: model=359; case 36: model=360;
    case 37: model=361; case 38: model=362; case 39: model=363;
    case 41: model=365; case 42: model=366; case 46: model=371;
    }
    if(model<300) return -1;


    return model;
    }



    soo beschreiben werd ich's später vllt nochmal besser x)


    MfG

    Hi leute,


    ich möchte jetzt mal anfangen aus diesem copy&paste rauszukommen. :P


    nun möchte ich anfangen selber zu scripten.


    Was meint ihr? womit zuerst anfangen?


    was muss ich lernen?


    MfG

    hab schon einen tipp bekommen.. das es mit login system nicht sogut klappt.. muss man was umschreiben oder so :P


    public OnPlayerConnect(playerid)
    {
    new name[MAX_PLAYER_NAME];
    GetPlayerName(playerid, name, sizeof(name));
    new string[128];
    format(string, sizeof(string), ACCOUNTS_FOLDER, name);
    if (AccountInfo[playerid][aLogged] == 0)
    {


    if (!fexist(string))
    {
    new kayitmsg[256];
    format(kayitmsg,256,"Willkommen\n\n%s bitte öffnen Sie ein neues Konto\n\nNeues Passwort eingeben:",name);
    ShowPlayerDialog(playerid,0,DIALOG_STYLE_INPUT,"Registrieren",kayitmsg,"Registrieren"," Abbrechen");
    register[playerid] = 1;
    login[playerid] = 0;
    }
    else if (fexist(string))
    {
    new girismsg[256];
    format(girismsg,256,"Willkommen bei der ComaCrew\n\nBenutzername: %s\n\nBitte geben Sie ihr password ein:",name);
    ShowPlayerDialog(playerid,1,DIALOG_STYLE_INPUT,"Login",girismsg,"Login","Abbrechen");
    register[playerid] = 0;
    login[playerid] = 1;
    }
    }
    return 1;
    }


    da muss jetzt rein das der bot sich nicht reggen muss :P.. aber wie ?(

    Bot connectet, aber kommt nicht auf der map :(


    Infos:


    Selfmadescript
    Login system


    Script schnipsel:


    public OnGameModeInit()
    {
    LimitGlobalChatRadius(20);
    ConnectNPC("NUTTE","NUTTE");


    public OnPlayerSpawn(playerid)
    {
    if(IsPlayerNPC(playerid))
    {
    new botname[MAX_PLAYER_NAME];
    GetPlayerName(playerid, botname, sizeof(botname));
    if(!strcmp(botname, "NUTTE", true))
    {
    }
    }
    return 1;
    }


    MfG

    achso okay ;D


    ehm jaa, ins login system (GUI system)


    public OnPlayerConnect(playerid)
    {


    new name[MAX_PLAYER_NAME];
    GetPlayerName(playerid, name, sizeof(name));
    new string[128];
    format(string, sizeof(string), ACCOUNTS_FOLDER, name);
    if (AccountInfo[playerid][aLogged] == 0)
    {
    if (!fexist(string))
    {
    new kayitmsg[256];
    format(kayitmsg,256,"Willkommen\n\n%s bitte öffnen Sie ein neues Konto\n\nNeues Passwort eingeben:",name);
    ShowPlayerDialog(playerid,0,DIALOG_STYLE_INPUT,"Registrieren",kayitmsg,"Registrieren"," Abbrechen");
    register[playerid] = 1;
    login[playerid] = 0;
    }
    else if (fexist(string))
    {
    new girismsg[256];
    format(girismsg,256,"Willkommen bei der ComaCrew\n\nBenutzername: %s\n\nBitte geben Sie ihr password ein:",name);
    ShowPlayerDialog(playerid,1,DIALOG_STYLE_INPUT,"Login",girismsg,"Login","Abbrechen");
    register[playerid] = 0;
    login[playerid] = 1;
    }
    }
    return 1;
    }


    public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
    {
    if (response == 1)
    {
    if(dialogid == 0)
    {
    Encrypt(inputtext);
    new player[MAX_PLAYER_NAME];
    GetPlayerName(playerid, player, 50);
    new string3[32];
    new playername3[MAX_PLAYER_NAME];
    GetPlayerName(playerid, playername3, sizeof(playername3));
    format(string3, sizeof(string3), ACCOUNTS_FOLDER, playername3);
    new ip[20];
    GetPlayerIp(playerid,ip,sizeof(ip));
    new File: hFile = fopen(string3, io_write);
    if (hFile)
    {
    strmid(AccountInfo[playerid][aPasswort], inputtext, 0, strlen(inputtext), 255);
    new var[128];
    format(var, 128, "Passwort=%s\n", AccountInfo[playerid][aPasswort]);fwrite(hFile, var);
    format(var, 128, "IP=%s\n",ip);fwrite(hFile, var);
    fclose(hFile);
    printf("%s is signed up.",playername3);
    SendClientMessage(playerid, GREEN, "|- Die Registrierung war erfolgreich. Du kannst dich jetzt einloggen. -|");
    GivePlayerMoney(playerid,50000);
    new girismsg[256];
    format(girismsg,256,"Willkommen bei der ComaCrew\n\nBenutzername: %s\n\nBitte geben Sie ihr password ein:",playername3);
    ShowPlayerDialog(playerid,1,DIALOG_STYLE_INPUT,"Login",girismsg,"Login","Abbrechen");
    register[playerid] = 0;
    login[playerid] = 1;
    }
    }
    if(dialogid == 1)
    {
    Encrypt(inputtext);
    new string2[128];
    new playername2[MAX_PLAYER_NAME];
    GetPlayerName(playerid, playername2, sizeof(playername2));
    format(string2, sizeof(string2), ACCOUNTS_FOLDER, playername2);
    new File: UserFile = fopen(string2, io_read);
    if ( UserFile )
    {
    new PassData[256];
    new keytmp[256], valtmp[256];
    fread( UserFile , PassData , sizeof( PassData ) );
    keytmp = ini_GetKey( PassData );
    if( strcmp( keytmp , "Passwort" , true ) == 0 )
    {
    valtmp = ini_GetValue( PassData );
    strmid(AccountInfo[playerid][aPasswort], valtmp, 0, strlen(valtmp)-1, 255);
    }
    if(strcmp(AccountInfo[playerid][aPasswort],inputtext, true ) == 0 )
    {
    for(new p = 0; p < strlen(AccountInfo[playerid][aPasswort]); p++)
    {
    inputtext[p] = '?';
    }
    SetTimerEx("LogIn", LOGIN_DELAY*1000, 0, "d", playerid);
    printf("%s is logged in.",playername2);
    new key[256] , val[256];
    new Data[256];
    while ( fread( UserFile , Data , sizeof( Data ) ) )
    {
    key = ini_GetKey( Data );
    }
    fclose(UserFile);


    }
    else
    {
    new girismsg[256];
    printf("%s falsches Passwort verwendet wurde.",playername2);
    format(girismsg,256,"FALSCHES PASSWORT\n\nGeben Sie das Passwort:");
    ShowPlayerDialog(playerid,2,DIALOG_STYLE_INPUT,"Anmeldung",girismsg,"Anmeldung","Abbrechen");
    login[playerid] = 1;
    register[playerid] = 0;
    fclose(UserFile);
    return 1;
    }
    }
    }
    if(dialogid == 2)
    {
    Encrypt(inputtext);
    new string2[128];
    new playername2[MAX_PLAYER_NAME];
    GetPlayerName(playerid, playername2, sizeof(playername2));
    format(string2, sizeof(string2), ACCOUNTS_FOLDER, playername2);
    new File: UserFile = fopen(string2, io_read);
    if ( UserFile )
    {
    new PassData[256];
    new keytmp[256], valtmp[256];
    fread( UserFile , PassData , sizeof( PassData ) );
    keytmp = ini_GetKey( PassData );
    if( strcmp( keytmp , "Passwort" , true ) == 0 )
    {
    valtmp = ini_GetValue( PassData );
    strmid(AccountInfo[playerid][aPasswort], valtmp, 0, strlen(valtmp)-1, 255);
    }
    if(strcmp(AccountInfo[playerid][aPasswort],inputtext, true ) == 0 )
    {
    for(new p = 0; p < strlen(AccountInfo[playerid][aPasswort]); p++)
    {
    inputtext[p] = '?';
    }
    SetTimerEx("LogIn", LOGIN_DELAY*1000, 0, "d", playerid);
    printf("%s is logged in.",playername2);
    new key[256] , val[256];
    new Data[256];
    while ( fread( UserFile , Data , sizeof( Data ) ) )
    {
    key = ini_GetKey( Data );
    }
    fclose(UserFile);


    }
    else
    {
    new girismsg[256];
    printf("%s falsches Passwort verwendet wurde.",playername2);
    format(girismsg,256,"FALSCHES PASSWORT\n\nGeben Sie das Passwort:");
    ShowPlayerDialog(playerid,2,DIALOG_STYLE_INPUT,"Anmeldung",girismsg,"Anmeldung","Abbrechen");
    login[playerid] = 1;
    register[playerid] = 0;
    fclose(UserFile);
    return 1;
    }
    }
    }
    }
    else return Kick(playerid);
    return 0;
    }



    MfG

    Hi leude,


    hab hier im Forum ne skinauswahl gefunden,
    klappt auch nur es ist nur 1 skin drinn..


    public OnPlayerRequestClass(playerid, classid)
    {
    SetPlayerPos(playerid, 2032.2887,1544.8514,10.8203);
    SetPlayerCameraPos(playerid, 2037.3260,1544.8792,10.8203);
    SetPlayerCameraLookAt(playerid, 2032.2887,1544.8514,10.8203);
    SetPlayerFacingAngle(playerid, 270.0);


    new string[128];
    if (classid == 0)
    {
    format(string, sizeof(string), "~y~CJ - Gang : Grooves");
    }
    if (classid == 1)
    {
    format(string, sizeof(string), "~y~Folgt");
    }
    GameTextForPlayer(playerid,string,3500,6);
    return 1;
    }


    Wo kann ich neue hinzufügen? weil, ich seh keine skin id..

    public OnPlayerSpawn(playerid)
    {
    ShowPlayerDialog(playerid,0,DIALOG_STYLE_MSGBOX,"Info:","Dies ist ein Reallife-server!\nBitte achte darauf das du jeden Spieler so behandelst,\nwie du selber behandelt werden willst!\nWenn du nicht weiterkommst ist der befehl /help sehr nützlich!\n\n Viel spaß wünscht das ComaCrew Team:)","Okay","Cancel");
    }




    public OnPlayerSpawn(playerid)
    {
    ShowPlayerDialog(playerid,1,DIALOG_STYLE_MSGBOX,"Info:","Dies ist ein Reallife-server!\nBitte achte darauf das du jeden Spieler so behandelst,\nwie du selber behandelt werden willst!\nWenn du nicht weiterkommst ist der befehl /help sehr nützlich!\n\n Viel spaß wünscht das ComaCrew Team:)","Okay","Cancel");
    }


    habs :)