samp.directory
← Skripte und Bibliotheken

DignitySAMP/omp-playing-cards

Rudimentary library to access the card sprites provided by the GTA:SA base game (game/models/txd/LD_CARD.txd).

Bibliothek★ 6aktualisiert Dez. 2025MITPawnsampctl
Auf GitHub öffnen

Mit sampctl installieren

sampctl package install DignitySAMP/omp-playing-cards

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 1 Paket ab

Verwendet von 1 Paket

README.md

playing-cards.inc

Installation

Simply install to your project:

sampctl package install DignitySAMP/omp-playing-cards

Include in your code and begin using the library:

#include <playing-cards>

Usage

Constants

  • MAX_CARD_SPRITE_LEN = 16
    • The maximum length of a card sprite.
  • MAX_CARD_NAME_LEN = 18
    • The maximum length of a card name.

Functions

  • GetPlayingCardSprite

    • Retrieves the sprite for a specific card, passed by set and value.
  • GetPlayingCardName

    • Retrieves the name of a specific card, passed by set and value.

Examples

Getting a card sprite, referenced by set type and card value.

new sprite[MAX_CARD_SPRITE_LEN];
GetPlayingCardSprite(CARD_SET_SPADES, CARD_VALUE_THREE, sprite); // output: "LD_CARD:cd3s"

Getting a card name, referenced by set type and card value.

new name[MAX_CARD_NAME_LEN];
GetPlayingCardName(CARD_SET_SPADES, CARD_VALUE_THREE, name); // output: "3 of Spades"

Testing

To test, simply run the package:

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

DignitySAMP/omp-playing-cards: SA-MP Bibliothek | samp.directory