Jump to content

Pinki950

Membru
  • Posts

    31
  • Joined

  • Last visited

    Never

Posts posted by Pinki950

  1. Nick: Pinki95

    Problema: Salutare, am pe serverul meu un oras undeva deasupra apei si daca creez un pickup in orasul respectiv nu mi-l arata, dar daca il creez undeva in san andreas (LS, LV, SF) merge pickup-ul. Se poate face ceva in privinta asta?

    Erori / warnings: -

    Lini/script: -

    Ai incercat sa rezolvi singur ?: Da, dar fara reusite!

  2. Nick: Pinki950

    Problema: Imi da Warning 213 si nu stiu cum sa o rezolv la linia:      if (doors == true)

    Erori / warnings: Warning 213

    Lini/script: [pawn]CMD:lock(playerid, params[])

    {

    new engine, lights, alarm, doors, bonnet, boot, objective;

    new vehicleid = GetPlayerVehicleID(playerid);//defining vehicleid is = to GetPlayerVehicleID.

    SendAdminText(playerid, "/lock", params);

    if(IsPlayerInAnyVehicle(playerid))//Thsi will check that is a player In a vehcile or not.

    {

    if (AVehicleData[GetPlayerVehicleID(playerid)][Owned] == true)

    {

    if(GetPlayerState(playerid)==PLAYER_STATE_DRIVER)

    {

    GetVehicleParamsEx(vehicleid,engine,lights,alarm,doors,bonnet,boot,objective);//will check that what is the state of the vehicle lock.

    if (doors == true)

    {

    SetVehicleParamsEx(vehicleid, engine, lights, alarm, false, bonnet, boot, objective);

    GameTextForPlayer(playerid,"~r~Masina descuiata!",3000,4);

    }

    else

    {

    SetVehicleParamsEx(vehicleid, engine, lights, alarm, true, bonnet, boot, objective);

    GameTextForPlayer(playerid,"~b~Masina incuiata!",3000,4);

    }

    }

    else

    SendClientMessage(playerid, 0xFFFFFFFF, "{FF0000}Nu esti soferul masinii");

    }

    else

    SendClientMessage(playerid, 0xFFFFFFFF, "{FF0000}Nu este masina ta");

    }

    else

    SendClientMessage(playerid,0xFFFFFFFF,"{FF0000}Trebuie sa te aflii intr-o masina");//the error message.

    return 1;

    }[/pawn]

    Ai incercat sa rezolvi singur ?: Da, dar nici o reusita!

  3. Nume: Pinki95

    Descriere Problema: Imi da Warning 213 si nu stiu cum sa o rezolv la linia:      if (doors == true)

    Pawno Code:

    [pawn]CMD:lock(playerid, params[])

    {

    new engine, lights, alarm, doors, bonnet, boot, objective;

    new vehicleid = GetPlayerVehicleID(playerid);//defining vehicleid is = to GetPlayerVehicleID.

    SendAdminText(playerid, "/lock", params);

    if(IsPlayerInAnyVehicle(playerid))//Thsi will check that is a player In a vehcile or not.

    {

    if (AVehicleData[GetPlayerVehicleID(playerid)][Owned] == true)

    {

    if(GetPlayerState(playerid)==PLAYER_STATE_DRIVER)

    {

    GetVehicleParamsEx(vehicleid,engine,lights,alarm,doors,bonnet,boot,objective);//will check that what is the state of the vehicle lock.

    if (doors == true)

    {

    SetVehicleParamsEx(vehicleid, engine, lights, alarm, false, bonnet, boot, objective);

    GameTextForPlayer(playerid,"~r~Masina descuiata!",3000,4);

    }

    else

    {

    SetVehicleParamsEx(vehicleid, engine, lights, alarm, true, bonnet, boot, objective);

    GameTextForPlayer(playerid,"~b~Masina incuiata!",3000,4);

    }

    }

    else

    SendClientMessage(playerid, 0xFFFFFFFF, "{FF0000}Nu esti soferul masinii");

    }

    else

    SendClientMessage(playerid, 0xFFFFFFFF, "{FF0000}Nu este masina ta");

    }

    else

    SendClientMessage(playerid,0xFFFFFFFF,"{FF0000}Trebuie sa te aflii intr-o masina");//the error message.

    return 1;

    }[/pawn]

  4. Nick: Pinki950

    Problema: Cum as putea pune la comanda de mai jos si Interiorul  (X, Y, Z, Interior-ID)

    [pawn]COMMAND:portloc(playerid, params[])

    {

    // Setup local variables

    new Float:x, Float:y, Float:z, PortMsg[128];

    // Send the command to all admins so they can see it

    SendAdminText(playerid, "/portloc", params);

    // Check if the player has logged in

    if (APlayerData[playerid][LoggedIn] == true)

    {

    // Check if the player's admin-level is at least 1

    if (APlayerData[playerid][PlayerLevel] >= 1)

    {

    // Check if the player has a wanted level of less than 3

    if (GetPlayerWantedLevel(playerid) < 3)

    {

    // Check if the player is not jailed

    if (APlayerData[playerid][PlayerJailed] == 0)

    {

    if (sscanf(params, "fff", x, y, z)) SendClientMessage(playerid, 0xFF0000AA, "Ex: \"/portloc <x> <y> <z>\"");

    else

    {

    // Port the player to the given location

    SetPlayerPos(playerid, x, y, z);

    // Let the player know about it

    format(PortMsg, 128, "Te-ai teleportat la locatia: %4.2f, %4.2f, %4.2f", x, y, z);

    SendClientMessage(playerid, 0x00FF00FF, PortMsg);

    }

    }

    else

        SendClientMessage(playerid, 0xFFFFFFFF, "{FF0000}Nu poti utiliza /portloc at cand esti in inchisoare");

    }

    else

        SendClientMessage(playerid, 0xFFFFFFFF, "{FF0000}Nu poti utiliza /portloc at cand esti urmarit");

    }

    else

        return 0;

    }

    else

        return 0;

    // Let the server know that this was a valid command

    return 1;

    }[/pawn]

  5. Topic Solved!

    [pawn]#define FILTERSCRIPT

    #include <a_samp>

    #include <Dini>

    #include <dudb>

    new Float:positionx;

    new Float:positiony;

    new Float:positionz;

    #if defined FILTERSCRIPT

    public OnFilterScriptInit()

    {

            print("\n--------------------------------------");

            print(" De la Alexica721 pt voi                  ");

            print("--------------------------------------\n");

            return 1;

    }

    public OnPlayerConnect(playerid)

    {

            LoadStats(playerid);

            return 1;

    }

    public OnPlayerDisconnect(playerid, reason)

    {

            new Float:x;

            new Float:y;

            new Float:z;

            GetPlayerPos(playerid,x,y,z);

            positionx = x;

            positiony = y;

            positionz = z;

            if (!dini_Exists(Pos(playerid)))

            {

                    dini_Create(Pos(playerid));

            }

            SaveStats(playerid);

            return 1;

    }

    public OnPlayerSpawn(playerid)

    {

            if (!dini_Exists(Pos(playerid))) {

            SetPlayerPos(playerid, 1676.8462, 1447.7908, 10.7833);

            }

            else

            {

            SetPlayerPos(playerid, positionx,positiony,positionz);

            }

            return 1;

    }

    Player(playerid)

    {

    new player[MAX_PLAYER_NAME];

    GetPlayerName(playerid, player, sizeof(player));

    return player;

    }

    Pos(playerid)

    {

      new a[256]; format(a, sizeof(a), "%s.ini",udb_encode(Player(playerid)));

      return a;

    }

    SaveStats(playerid)

    {

      dini_IntSet(Pos(playerid), "PositionX", floatround(positionx));

      dini_IntSet(Pos(playerid), "PositionY", floatround(positiony));

      dini_IntSet(Pos(playerid), "PositionZ", floatround(positionz));

    }

    LoadStats(playerid)

    {

      positionx = dini_Int(Pos(playerid), "PositionX");

      positiony = dini_Int(Pos(playerid), "PositionY");

      positionz = dini_Int(Pos(playerid), "PositionZ");

    }

    public OnFilterScriptExit()

    {

            return 1;

    }

    #else

    main()

    {

            print("\n----------------------------------");

            print(" Nimic de spus");

            print("----------------------------------\n");

    }

    #endif[/pawn]

  6. Am o problema in loc sa cante radioul in zona respectiva x, y, z imi face spam de "N" ori cu radioul!

    Ex: PlayAudioStream http....

    PlayAudioStream http....

    PlayAudioStream http....

    PlayAudioStream http....

    [pawn]public OnPlayerUpdate( playerid )

    {

    new

    bool: bPlay = false;

        for( new i = 0; i < MAX_PLAYERS; i++ )

    {

        if( IsPlayerInRangeOfPoint( i, 7.0, -2293.3921, -1632.9829, 485.1299) && bPlay == false )

        {

            bPlay = true;

            PlayAudioStreamForPlayer( i, "http://www.radiowish.ro/live.m3u" );

    }

    else if( bPlay == true )

    {

    StopAudioStreamForPlayer( i );

    bPlay = false;

    }

    }

    return 1;

    }[/pawn]

  7. Am aceasta comanda:

    [pawn]// Refuel the player's vehicle

    COMMAND:fuel(playerid, params[])

    {

    // Setup local variables

    new vID;

    // Send the command to all admins so they can see it

    SendAdminText(playerid, "/fuel", params);

    // Check if the player has logged in

    if (APlayerData[playerid][LoggedIn] == true)

    {

    // Check if the player's admin-level is at least 1

    if (APlayerData[playerid][PlayerLevel] >= 1)

    {

    // Check if the player is inside a vehicle

    if (IsPlayerInAnyVehicle(playerid))

    {

        // Get the vehicleid

        vID = GetPlayerVehicleID(playerid);

        // Refuel the vehicle

        AVehicleData[vID][Fuel] = MaxFuel;

    // Let the player know about it

    SendClientMessage(playerid, 0x00FF00FF, "Your vehicle is refuelled");

    }

    else

    SendClientMessage(playerid, 0x00FF00FF, "You're not driving a vehicle");

    }

    else

        return 0;

    }

    else

        return 0;

    // Let the server know that this was a valid command

    return 1;

    }[/pawn]

    si vreau sa o modific sa alimenteze toate masinile de pe server, cum procedez?

×
×
  • 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.