SSGamers - 12 Anos online por você.

#SSGamers - A Comunidade que mais crescer no brasil!

Participe do fórum, é rápido e fácil

SSGamers - 12 Anos online por você.

#SSGamers - A Comunidade que mais crescer no brasil!

SSGamers - 12 Anos online por você.

Gostaria de reagir a esta mensagem? Crie uma conta em poucos cliques ou inicie sessão para continuar.
Chegou o novo tema 6.5.5 - SSGamers - Servidores online de qualidade - Aproveite e entre para nossa comunidade, inscreva-se já! - Ouça nossa web radio - Veja nossas novidades - Participe dos nossos setores de jogos online - Parcerias aberta fale já com um administrador.

    Samp-Object-Loader - Object Loader Filterscript (Southclaws)

    Weslley_Script
    Weslley_Script
    SS - Fundador
    SS - Fundador


    Steam Steam : WeslleySSGames
    Zello : WeslleySSGames
    Mensagens : 11378
    Moedas : 1031967
    Data de inscrição : 06/10/2011
    Idade : 28
    Localização : Brasil

    Samp-Object-Loader - Object Loader Filterscript (Southclaws) Empty Samp-Object-Loader - Object Loader Filterscript (Southclaws)

    Mensagem por Weslley_Script Qua 8 Fev 2023 - 17:18

    Southclaw's Simple Map Parser
    Loads .map files populated with CreateObject (or any variation) lines, supports materials and text.

    Default load directory: ./scriptfiles/Maps/

    Installation
    Código:
    Simply install to your project:

    sampctl package install Southclaws/samp-object-loader
    Código:
    Include in your code and begin using the library:


    Código:
    #include <object-loader>


    Supported Syntax
    Objects
    Código:
    CreateObject(1337, 5.0, -5.0, 3.0, 90.0, 90.0, 90.0);
    CreateDynamicObject(1337, 5.0, -5.0, 3.0, 90.0, 90.0, 90.0);
    Any string starting with 'Create' is parsed as a CreateObject line, this is also valid:

    Código:
    CreateCake(1337, 5.0, -5.0, 3.0, 90.0, 90.0, 90.0);
    Object Materials
    Código:
    CreateObject(1337, 5.0, -5.0, 3.0, 90.0, 90.0, 90.0);
    SetObjectMaterial(object, 0, 18837, "mickeytextures", "ws_gayflag1", 0);
    Any SetObjectMaterial or SetObjectMaterialText line will affect the last created object. The first parameter (objectid) is ignored and can be any string for flexibility.

    Object Removal
    Código:
    RemoveBuildingForPlayer(playerid, 615, 0.0, 0.0, 0.0, 200.0);
    'playerid' is ignored, but still valid to allow flexibility when copying from .pwn source code.

    When a player connects (or when the filterscript loads, whichever comes first) a list of removed buildings is built and saved for that player.

    If the filterscript reloads (perhaps to load an update to object data) any RemoveBuilding instructions that have already been called for each player are ignored. When a player disconnects, their data is discarded.

    This data is stored in binary format in ./scriptfiles/Maps/session/

    Options
    Custom 'function' for altering world, interior and stream distance. This updates the settings for the current file, any lines below this will use these settings when creating objects. This function can be used multiple times.

    Código:
    options(world, interior, stream distance)
    For example, to make all the objects after this line create in world 0, interior 1 and a stream distance of 300:

    Código:
    options(0, 1, 300)
    Comments
    Single line // comments are supported at the end of lines or on their own.

    Código:
    // comment
    options(0, 1, 200) // comment
    CreateObject(1337, 5.0, -5.0, 3.0, 90.0, 90.0, 90.0); // comment


    Debugging
    Create a file inside './scriptfiles/Maps/' called 'maps.cfg' Use debug option followed by level parameter to make the script load with debug mode enabled. Each 'level' of debugging offers different information:

    -d0 = Print information messages
    -d1 = Print each folder
    -d2 = Print each loaded file
    -d3 = Print each loaded data line in each file
    -d4 = Print each line in each file


    Testing
    To test, simply run the package:

    sampctl package run
    And connect to localhost:7777 to test.


    Credits: Unknown



    Samp-Object-Loader - Object Loader Filterscript (Southclaws) D07Xwqb
    Samp-Object-Loader - Object Loader Filterscript (Southclaws) Yjab9HN

      Data/hora atual: Sáb 27 Abr 2024 - 23:11