samp.directory
← Skripte und Bibliotheken

medzvel/samp-job-framework

framework for easily creating jobs in sa-mp | WIP

Bibliothek★ 4aktualisiert Jan. 2019Keine 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 medzvel/samp-job-framework

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-job-framework

Job Framework - Create Jobs Easily

Installation

sampctl

Simply install to your project:

sampctl package install medzvel/samp-job-framework

Include in your code and begin using the library:

#include <jobframework>

non-sampctl

Download that repository or git clone it, then copy/cut file jobframework.inc and job_framework folder and place them into pawno/includes directory

Include in your code and begin using the library:

#include <jobframework>

Usage

GLOBAL FUNCTIONS

  • JobType:DefineJobType(jTypWorkerStatus[], jTypPayment, jTypPickupID = 1239);
  • CreateJob(jobName[], JobType:jType, Float:jPosition_X, Float:jPosition_Y, Float:jPosition_Z);
  • CountJobWorkers(jobID);
  • GetJobPayment(jobID);
  • GetJobName(jobID, output[], len = sizeof(output));
  • GetJobWorkerStatus(jobID, output[], len = sizeof(output));
  • JobsCreated();

PLAYER FUNCTIONS

  • SetPlayerJob(playerid, jobid);
  • GetPlayerJob(playerid);
  • RemovePlayerFromJob(playerid);

CALLBACKS

  • forward OnJobCreate(jobID, Float:jPos_X, Float:jPos_Y, Float:jPos_Z); - Called after CreateJob function
  • forward OnPlayerPickupJobPickup(playerid, jobID); Called after a player pick ups job pickup
  • forward OnPlayerGetNewJob(playerid, jobID); Called after SetPlayerJob function
  • forward OnPlayerRemoveFromJob(playerid, jobID); Called after RemovePlayerFromJob function

Testing

sampctl package get medzvel/samp-job-framework

sampctl package build --forceEnsure

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

medzvel/samp-job-framework: SA-MP Bibliothek | samp.directory