samp.directory
← Skripte und Bibliotheken

Mergevos/samp-inline-objects

Inline object editing.

Bibliothek★ 2aktualisiert Nov. 2020Keine LizenzPawnsampctl
Auf GitHub öffnen

Dieses Repository hat keine Lizenzdatei. Es ist öffentlich lesbar, aber das allein gibt noch keine Erlaubnis, es weiterzuverwenden.

Mit sampctl installieren

sampctl package install Mergevos/samp-inline-objects

Führe das in deinem Projektordner aus. sampctl lädt das Paket und alles herunter, wovon es abhängt.

Im Pawn-Compiler ausprobieren →

Fügt seine Include-Dateien samt der Bibliotheken, von denen es abhängt, dem Pawn-Compiler in deinem Browser hinzu, bereit zum Einbinden in ein Skript.

Hängt von 2 Paketen ab

README.md

samp-inline-objects

Inline object editing.

Installation

Simply install to your project:

sampctl package install Mergevos/samp-inline-objects

Include in your code and begin using the library:

#include <inline-objects>

Usage

There's only one function to use, pretty simple.

EditObjectInline(playerid, objectid, Func: func<iiiiiiiiii>);

Where's:

playerid - Player who is editing an object.
objectid - The object which is edited.
func - Callback/Inline called after.

Returns value of EditObject. 1 for succes, 0 for fail.

Example


YCMD:test(playerid, params[], help)
{ 
    if(help) {
        return 0;
    }
    SelectObject(playerid);

    return 1;
}

public OnPlayerSelectObject(playerid, type, objectid, modelid, Float:fX, Float:fY, Float:fZ)
{
    inline Test(pid, playerobject, objid, response, Float:fXx, Float:fYy, Float:fZz, Float:fRotX, Float:fRotY, Float:fRotZ )
    {
        #pragma unused fRotZ, fRotY, fRotX, fZz, fYy, fXx, objid, playerobject, pid
        if(response == EDIT_RESPONSE_FINAL) {
            print("NOINDOINDIOW");
        }
        else if(response == EDIT_RESPONSE_CANCEL)  {
            print("PINOINDIO");
        }
        print("Test");
    }
    EditObjectInline(playerid, objectid, using inline Test);
    return 1;
}

Testing

To test, simply run the package and then connect to the server:

sampctl package run

Diese Seite wird aus dem erstellt, was GitHub über das Repository veröffentlicht. samp.directory hostet den Code nicht. Ein Problem mit diesem Eintrag melden

Mergevos/samp-inline-objects: SA-MP Bibliothek | samp.directory