samp.directory
← Scripts et bibliothèques

medzvel/samp-job-framework

framework for easily creating jobs in sa-mp | WIP

Bibliothèque★ 4mis à jour janv. 2019Pas de licencePawnsampctl
Ouvrir sur GitHub

Ce dépôt n’a pas de fichier de licence. Il est public en lecture, mais cela ne donne pas à lui seul le droit de le réutiliser.

Installer avec sampctl

sampctl package install medzvel/samp-job-framework

Lance ceci dans le dossier de ton projet. sampctl télécharge le paquet et ce dont il dépend.

L’essayer dans le compilateur Pawn →

Ajoute ses fichiers include, avec les bibliothèques dont il dépend, au compilateur Pawn de ton navigateur, prêts à être inclus dans un script.

Dépend de 2 paquets

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

Cette page est construite à partir de ce que GitHub publie sur le dépôt. samp.directory n’héberge pas le code. Signaler un problème avec cette fiche

medzvel/samp-job-framework : Bibliothèque SA-MP | samp.directory