samp.directory
← Skripte und Bibliotheken

emmett-white/samp-multiple-checkpoints

by KJasonMontgomery || https://github.com/KJasonMontgomery

Bibliothek★ 3aktualisiert Feb. 2021Keine 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 emmett-white/samp-multiple-checkpoints

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

multiple-checkpoints-samp

This include lets you create more than one checkpoint at the same time!(Requires Incognito's Streamer)

Installation

Simply install to your project:

sampctl package install emmett-white/multiple-checkpoints-samp

Include in your code and begin using the library:

#include <multiple-checkpoints-samp>

Functions:

ShowCP(playerid, Float:x, Float:y, Float:z)
  • Parameters:
  playerid - The id of the player to create checkpoint for
  Float:x, Float:y, Float:z - The position of the checkpoint
  • Returns:
  INVALID_CP_ID(-1) if failed to create the checkpoint
  The id of the checkpoint if successful
  • Remarks:
  It will print an error message if it fails to create the checkpoint(player is not connected or there's no available free map icon for that player)
DestroyCP(playerid, cpid)
  • Parameters:
  playerid - The id of the player to destroy the checkpoint for
  cpid - The id of the checkpoint to destroy(Returned by ShowCP)
  • Returns:
  0 if didn't execute successfully(Invalid checkpoint id)
  1 if function executed successfully
  • Remarks:
  It will print an error message if it fails to destroy the checkpoint(cpid is invalid or player is not connected)

Callbacks:

OnPlayerEnterCP(playerid, cpid)
  • Parameters:
  playerid - The id of the player who triggered the checkpoint
  cpid - The id of the checkpoint player has triggered
OnPlayerLeaveCP(playerid, cpid)
  • Parameters:
  playerid - The id of the player who triggered the checkpoint
  cpid - The id of the checkpoint player has triggered

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

emmett-white/samp-multiple-checkpoints: SA-MP Bibliothek | samp.directory