samp.directory
← Skripte und Bibliotheken

aujiz11/samp-advanced-cp

Includes providing interactive functionality with multiple checkpoints

Bibliothek★ 1aktualisiert Juli 2024Keine LizenzPawn
Auf GitHub öffnen

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

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.

README.md

SAMP Advanced Checkpoint

Table of Contents

Introduction

The SetPlayerCheckpoint function only provides one checkpoint for the player, then one day I needed something that could manipulate and create multiple checkpoints at the same time so I created this library.

Installation

Simply install to your project:

sampctl package install aujiz11/samp-advanced-cp

Include in your code and begin using the library:

#include <advanced_cp>

Testing

To test, simply run the package:

sampctl package run

Usage

Functions

Function:
	CreateAdvancedCP

Info:
	Creates advanced checkpoints for players, previously created points will not be lost unless you do not use DestroyAdvancedCP

Params:
    * playerid -> Player ID
    * Float:centreX -> X coordinate of checkpoint
    * Float:centreY -> Y coordinate of checkpoint
    * Float:centreZ -> Z coordinate of checkpoint
    * Float:size -> Checkpoint size

Return:
    Returns checkpoint id, -1 if failed (player checkpoint ID starts at 0)

____________________________________________________________

Function:
	DestroyAdvancedCP

Info:
	Remove advanced checkpoint

Params:
    * playerid -> Player ID
    * checkpointid -> Checkpoint ID to delete (ADVANCEDCP_UKNOWN to delete all of the player)

Return:
    Returns true if the execution is successful, false if it fails

____________________________________________________________

Function:
	IsPlayerInAdvancedCP

Info:
	Check which players are inside the advanced 
    
Params:
    * playerid -> Player ID
    * checkpointid -> Checkpoint ID to check

Return:
    Returns true if the player is inside, returns false if the player is not inside

____________________________________________________________

Function:
	GetPlayerAdvancedCP

Info:
	Check which players are inside the advanced 
    
Params:
    * playerid -> Player ID
    * checkpointid -> Checkpoint ID to check
    * &Float:centreX -> Get the X coordinate value
    * &Float:centreY -> Get the Y coordinate value
    * &Float:centreZ -> Get the Z coordinate value

Return:
    Returns true if the execution is successful, false if it fails

Callbacks

// called when the player steps on the advanced checkpoint
forward OnPlayerEnterAdvancedCP(playerid, checkpointid);

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

aujiz11/samp-advanced-cp: SA-MP Bibliothek | samp.directory