Jump to content

IosifR

Membru
  • Posts

    107
  • Joined

  • Last visited

Posts posted by IosifR

  1. Acum 10 minute, Sebi wepos a spus:

     

    1. mergi pe sub toate include urile  si pune asta new playerSpawned[MAX_PLAYERS]

    2. mergi la linia public OnPlayerConnect(playerid) {
    si pune public playerVehicle[playerid] = -1;

    3. mergi la linia public OnPlayerDisconnect(playerid, reason)

    si pune if(playerSpawned[playerid] != -1) playerSpawned[playerid] != -1;

    4.  aici unde ai pus 

    
    case 0: CreateVehicle(411, pPos[0], pPos[1], pPos[2] + 5.0, pPos[3], 1, 1, -1, 0);
    case 1: CreateVehicle(560, pPos[0], pPos[1], pPos[2] + 5.0, pPos[3], 1, 1, -1, 0);

      

    pui asa

     

    
    case 0: {
       CreateVehicle(411, pPos[0], pPos[1], pPos[2] + 5.0, pPos[3], 1, 1, -1, 0);
       playerSpawned[playerid] = 1;
    }
    case 1: {
       CreateVehicle(560, pPos[0], pPos[1], pPos[2] + 5.0, pPos[3], 1, 1, -1, 0);
    playerSpawned[playerid] = 1; 
    }
     
    

    5.  la comanda asta CMD:GetVeh(playerid) {

    pui CMD:GetVeh(playerid) {

      if(playerSpawned[playerid] == 1) return SendPlayerMessage(playerid, -1, "ai deja o masina spawnata!");

     

    Am rezolvat problema asta. Mulțumesc oricum!

  2. Am FilterScriptul asta(facut de Flowmen, putin editat textele de mine):

    Citat

    #include <a_samp>
    #include <Dini>

    #define Register 0
    #define Logged 1

    new Login[MAX_PLAYERS];

    public OnPlayerConnect(playerid)
    {
        Login[playerid] = 0;
        new nombre[MAX_PLAYER_NAME], archivo[256];
        GetPlayerName(playerid, nombre, sizeof(nombre));
        format(archivo, sizeof(archivo), "/Users/%s.ini", nombre);
        if (!dini_Exists(archivo))
    {
        ShowPlayerDialog(playerid, Register, DIALOG_STYLE_PASSWORD, "Register", "Bine ai venit pe ExtraGaming\nIntrodu o parola pentru a te inregistra!", "Enter", "Cancel");
    }
        else
    {
        ShowPlayerDialog(playerid, Logged, DIALOG_STYLE_PASSWORD, "Login", "Bine ai revenit!\nIntrodu parola pentru a te loga!", "Enter", "Cancel");
    }
        return 1;
    }

    public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
    {
        if (dialogid == Register)
    {
        new nombrejugador[MAX_PLAYER_NAME], archivo[256];
        if (!strlen(inputtext)) return ShowPlayerDialog(playerid, Register, DIALOG_STYLE_PASSWORD, "Register", "Bine ai venit pe ExtraGaming\nInregistreaza-te!", "Register", "Cancel");
        if (!response) return ShowPlayerDialog(playerid, Register, DIALOG_STYLE_PASSWORD, "Register", "Bine ai venit pe ExtraGaming\nInregistreaza-te!", "Register", "Cancel");
        GetPlayerName(playerid, nombrejugador, sizeof(nombrejugador));
        format(archivo, sizeof(archivo), "/Users/%s.ini", nombrejugador);
        dini_Create(archivo);
        dini_Set(archivo, "User", nombrejugador);
        dini_Set(archivo, "Password", inputtext);
        ShowPlayerDialog(playerid, Logged, DIALOG_STYLE_PASSWORD, "Login", "Bine ai revenit!\nIntrodu-ti parola mai jos pentru a te loga!", "Login", "Cancel");
    }

        if (dialogid == Logged)
    {
        new nombrejugador[MAX_PLAYER_NAME], archivo[256], comprobante[256];
        if (!strlen(inputtext)) return ShowPlayerDialog(playerid, Logged, DIALOG_STYLE_PASSWORD, "Login", "Bine ai revenit!\nLogheaza-te!", "Login", "Cancel");
        if (!response) return ShowPlayerDialog(playerid, Logged, DIALOG_STYLE_PASSWORD, "Login", "Bine ai revenit!\nLogheaza-te!", "Login", "Cancel");
        GetPlayerName(playerid, nombrejugador, sizeof(nombrejugador));
        format(archivo, sizeof(archivo), "/Users/%s.ini", nombrejugador);
        format(comprobante, sizeof(comprobante), "%s", dini_Get(archivo, "Password"));
        if (!strcmp (inputtext, comprobante))
        {
            Login[playerid] = 1;
        }
        else
        {
            ShowPlayerDialog(playerid, Logged, DIALOG_STYLE_PASSWORD, "Login", "Bine ai revenit!\nLogheaza-te!", "Login", "Cancel");
        }
    }
        return 1;
    }
     

     

  3. Salut. Am serverul făcut pe Dini și nu știu cum să fac sa salveze bani și levelul înafara de parola și numele salvat in folderul Utilizatori/&s.ini,  sper că înțelegeți ce vreau sa zis. As rămâne recunoscător dacă mă ți ajuta!👐🙏

     

  4. Am facut ceas si data si imi arata asa de ce?

    Citat

    forward settime(playerid);
    new Text:Time, Text:Date;

    Citat

    public settime(playerid)
    {
        new string[256],hours,minutes,seconds,year,month,day;
        gettime(hours, minutes, seconds), getdate(year, month, day);
        format(string, sizeof string, "%s%d:%s%d:%s%d", (hours < 10) ? ("0") : (""), hours, (minutes < 10) ? ("0") : (""), minutes, (seconds < 10) ? ("0") : (""), seconds);
        TextDrawSetString(Time, string);
        format(string, sizeof string, "%d-%s%d-%s%d", day, ((month < 10) ? ("0") : ("")), month, (year < 10) ? ("0") : (""), year);
        TextDrawSetString(Date, string);
    }

    Citat

    public OnGameModeInit()
    {
        SetGameModeText("GM2k20");
        AddPlayerClass(60, 2127.8657,2379.1455,10.8203,179.0282, 0, 0, 0, 0, 0, 0);
        //CEAS SI DATA 
        Time = TextDrawCreate(546.000000,28.000000,"--");
        TextDrawAlignment(Time,0);
        TextDrawBackgroundColor(Time,0x000000ff);
        TextDrawFont(Time,2);
        TextDrawLetterSize(Time,0.370000,1.800000);
        TextDrawColor(Date,0xFF0606AA);//0xFF0606AA
        TextDrawSetOutline(Time,1);
        TextDrawSetProportional(Time,1);
        TextDrawSetShadow(Time,1);
        SetTimer("settime",1000,true);

        Date = TextDrawCreate(543.000000,15.000000,"--");
        TextDrawAlignment(Date,0);
        TextDrawBackgroundColor(Date,0x000000ff);
        TextDrawFont(Date,2);
        TextDrawLetterSize(Date,0.370000,1.800000);
        TextDrawColor(Time,0xFF0606AA); //0xFF0606AA
        TextDrawSetOutline(Date,1);
        TextDrawSetProportional(Date,1);
        TextDrawSetShadow(Date,1);
        SetTimer("settime",1000,true);
        return 1;

     

    ce.png

  5. Citat

    modules/PizzaChelner.pwn(35) : warning 202: number of arguments does not match definition
    modules/PizzaChelner.pwn(35) : warning 202: number of arguments does not match definition
    modules/PizzaChelner.pwn(35) : warning 202: number of arguments does not match definition
    modules/PizzaChelner.pwn(81) : error 021: symbol already defined: "OnPlayerPickUpPickup"
    modules/PizzaChelner.pwn(92) : error 021: symbol already defined: "OnDialogResponse"
    modules/PizzaChelner.pwn(98) : warning 202: number of arguments does not match definition
    modules/PizzaChelner.pwn(98) : warning 202: number of arguments does not match definition
    modules/PizzaChelner.pwn(98) : warning 202: number of arguments does not match definition
    modules/PizzaChelner.pwn(109) : warning 217: loose indentation
    modules/PizzaChelner.pwn(118) : warning 217: loose indentation
    modules/PizzaChelner.pwn(121) : error 021: symbol already defined: "OnPlayerLeaveCheckpoint"
    modules/PizzaChelner.pwn(143) : warning 217: loose indentation
    modules/PizzaChelner.pwn(146) : error 021: symbol already defined: "OnPlayerEnterCheckpoint"
    modules/PizzaChelner.pwn(158) : error 021: symbol already defined: "_y_utils_OnPlayerConnect"
    modules/PizzaChelner.pwn(178) : error 021: symbol already defined: "_y_utils_OnPlayerDisconnect"

    ajutoooooooooooooooooooooooooooooooooooooooooooooor

  6. Salut, cum pot sa rezolv erorile astea?

    Deci, primadata am facut comanda. A iesit cam asa:

    Citat

    CMD:gps(playerid, parmas[])
    {
        ShowPlayerDialog(playerid, DIALOG_GPS, DIALOG_STYLE_LIST, "Locations of server", "Locatia1\n Locatiea2\n Locatiea3", "Select", "Canecel")
        return 1;
    }

    Dupa la OnDialogResponse pentru a ne pune un checkpoint:

    Citat

        case DIALOG_GPS:
        {
            switch(listitem)
            {
                case 0:
                {
                    SetPlayerCheckpoint(playerid, 2141.6711,2358.8105,10.8203)
                }
                case 1:
                {
                    SetPlayerCheckpoint(playerid, 2150.1887,2359.1458,10.8203)
                }
                case 2:
                {
                    SetPlayerCheckpoint(playerid, 2156.0879,2354.8503,10.8203);
                }
        return 1;

    }

    Si imi da erorilea astea:

    Citat

    C:\Users\h\Desktop\un nou inceput\gamemodes\TutorialGM.pwn(325) : error 029: invalid expression, assumed zero
    C:\Users\h\Desktop\un nou inceput\gamemodes\TutorialGM.pwn(325) : error 029: invalid expression, assumed zero
    C:\Users\h\Desktop\un nou inceput\gamemodes\TutorialGM.pwn(325) : error 029: invalid expression, assumed zero
    C:\Users\h\Desktop\un nou inceput\gamemodes\TutorialGM.pwn(325) : fatal error 107: too many error messages on one line

    Ce sa fac ?:(

  7. Am facut un texdraw speedometer pt masina dar nu stiu cum sa il pun

    Acesta este scriptul:

    Citat

        Speed[0] = TextDrawCreate(563.000000, 295.000000, "_");
        TextDrawFont(Speed[0], 0);
        TextDrawLetterSize(Speed[0], 0.600000, 7.850000);
        TextDrawTextSize(Speed[0], 308.000000, 132.000000);
        TextDrawSetOutline(Speed[0], 1);
        TextDrawSetShadow(Speed[0], 0);
        TextDrawAlignment(Speed[0], 2);
        TextDrawColor(Speed[0], -1);
        TextDrawBackgroundColor(Speed[0], 16711746);
        TextDrawBoxColor(Speed[0], 1296911682);
        TextDrawUseBox(Speed[0], 1);
        TextDrawSetProportional(Speed[0], 1);
        TextDrawSetSelectable(Speed[0], 0);

        Speed[1] = TextDrawCreate(589.000000, 314.000000, "~y~Speed: 100km/h");
        TextDrawFont(Speed[1], 1);
        TextDrawLetterSize(Speed[1], 0.324999, 1.949998);
        TextDrawTextSize(Speed[1], 400.000000, 17.000000);
        TextDrawSetOutline(Speed[1], 1);
        TextDrawSetShadow(Speed[1], 0);
        TextDrawAlignment(Speed[1], 3);
        TextDrawColor(Speed[1], -1);
        TextDrawBackgroundColor(Speed[1], 255);
        TextDrawBoxColor(Speed[1], 50);
        TextDrawUseBox(Speed[1], 0);
        TextDrawSetProportional(Speed[1], 1);
        TextDrawSetSelectable(Speed[1], 0);

        Speed[2] = TextDrawCreate(558.000000, 334.000000, "~r~Fuel: 100L");
        TextDrawFont(Speed[2], 1);
        TextDrawLetterSize(Speed[2], 0.333332, 1.999997);
        TextDrawTextSize(Speed[2], 400.000000, 17.000000);
        TextDrawSetOutline(Speed[2], 1);
        TextDrawSetShadow(Speed[2], 0);
        TextDrawAlignment(Speed[2], 3);
        TextDrawColor(Speed[2], -1);
        TextDrawBackgroundColor(Speed[2], 255);
        TextDrawBoxColor(Speed[2], 50);
        TextDrawUseBox(Speed[2], 0);
        TextDrawSetProportional(Speed[2], 1);
        TextDrawSetSelectable(Speed[2], 0);

        Speed[3] = TextDrawCreate(499.000000, 294.000000, "~b~Infernus");
        TextDrawFont(Speed[3], 1);
        TextDrawLetterSize(Speed[3], 0.324999, 2.000000);
        TextDrawTextSize(Speed[3], 400.000000, 17.000000);
        TextDrawSetOutline(Speed[3], 1);
        TextDrawSetShadow(Speed[3], 2);
        TextDrawAlignment(Speed[3], 1);
        TextDrawColor(Speed[3], -1);
        TextDrawBackgroundColor(Speed[3], 255);
        TextDrawBoxColor(Speed[3], 50);
        TextDrawUseBox(Speed[3], 0);
        TextDrawSetProportional(Speed[3], 1);
        TextDrawSetSelectable(Speed[3], 0);

     

  8. Help:

    C:\Users\h\Desktop\un nou inceput\gamemodes\TutorialGM.pwn(313) : error 014: invalid statement; not in switch

    Citat

    case DIALOG_JOBS:
            {
                switch(listitem) // in functie de ce alege
                {
                    case 0: // am facut doar un caz, caz-ul 'Fish'
                    {
                        SetPlayerCheckpoint(playerid, 2380.9233, 548.5172, 7.7802, 5.0); // Daca apasa pe el ii seteaza checkpoint la job.
                        new string[60];
                        format(string, sizeof(string), "Ti-am pus un checkpoint pe harta (%0.2f m).", GetPlayerDistanceFromPoint(playerid, 2380.9233, 548.5172, 7.7802)); 
                    }
                }
            }
        return 1;
    }

    Linia 313 este prima 'case DIALOG_JOBS:'

  9. De ce?

    C:\Users\h\Desktop\un nou inceput\gamemodes\TutorialGM.pwn(313) : error 014: invalid statement; not in switch

    Linia 313:

    case DIALOG_JOBS:

    Tot scriptul

    Citat

    case DIALOG_JOBS:
            {
                switch(listitem) // in functie de ce alege
                {
                    case 0: // am facut doar un caz, caz-ul 'Fish'
                    {
                        SetPlayerCheckpoint(playerid, 2380.9233, 548.5172, 7.7802, 5.0); // Daca apasa pe el ii seteaza checkpoint la job.
                        new string[60];
                        format(string, sizeof(string), "Ti-am pus un checkpoint pe harta (%0.2f m).", GetPlayerDistanceFromPoint(playerid, 2380.9233, 548.5172, 7.7802)); 
                    }
                }
            }
        return 1;
    }
     

     

    Ce sa fac? Va rog sa ajutati-ma

  10. Cum rezolv aceasta eroare??

    Citat

    C:\Users\h\Desktop\un nou inceput\gamemodes\TutorialGM.pwn(193) : error 010: invalid function or declaration

    Linie 193:

    Citat

    if(pickupid == iesire)

    Script:

    Citat

        if(pickupid == iesire)
            GameTextForPlayer(playerid, "~r~You exit the house", 6000, 1);
            SetPlayerPos(playerid, 235.3858,1187.5261,1080.2578);
            SetPlayerInterior(playerid, 0)

     

     

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.