samp.directory
← Skripte und Bibliotheken

rsetiawan7/samp-disabled-commands

An include that helps you to disable commands without re-compile your code.

Bibliothek★ 1aktualisiert Mai 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 rsetiawan7/samp-disabled-commands

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 5 Paketen ab

README.md

samp-disabled-commands

Introduction

Preview:

SA-MP Disabled Commands (click if not showed)

This include helps you to disable some commands because of maybe you're still fixing some bugs and you want disable it without re-compile your code.

Only support ZCMD for now.

Dependencies

  • zcmd
  • y_ini (from YSI 5.x)
  • (optional) y_debug
  • (optional) crashdetect

Installation

Simply install to your project:

sampctl package install rsetiawan7/samp-disabled-commands

Include in your code and begin using the library:

#include <disabled-commands>

Make sure you include this library in all of your gamemodes and filterscripts those have ZCMD.

Usage

Callbacks:

// Called when disabled commands reloaded.
public OnDisabledCommandsReloaded()
{
  SendClientMessageToAll(-1, "Disabled commands reloaded in GameMode.");
  return 1;
}

// Called when commands cancelled because of you disable it.
public OnPlayerCommandCancelled(playerid, cmdtext[])
{
  SendClientMessage(playerid, -1, "This command is disabled.");
  return 1;
}

Functions:

// Add a command to be disabled. Reloaded automatically if success.
AddDisabledCommands(const command[]);

// Remove a command and enable it. Reloaded automatically if success.
RemoveDisabledCommands(const command[]);

// Reload disabled commands manually. (perhaps there are many changes in external?)
ReloadDisabledCommands(const command[]);

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

rsetiawan7/samp-disabled-commands: SA-MP Bibliothek | samp.directory