samp.directory
← Skrypty i biblioteki

ScottasM/SAMP-SimpleIcons

A simple include that lets you define map icon destroy distance and/or time without changing anything in your code

Biblioteka★ 1zaktualizowano kwi 2022Brak licencjiPawn
Otwórz na GitHubie

To repozytorium nie ma pliku licencji. Jest publiczne do odczytu, ale samo to nie daje pozwolenia na ponowne użycie.

Wypróbuj w kompilatorze Pawn →

Dodaje jej pliki include, razem z bibliotekami, od których zależy, do kompilatora Pawn w twojej przeglądarce, gotowe do dołączenia w skrypcie.

README.md

SAMP-SimpleIcons

A simple include that lets you define map icon destroy distance and/or time without changing anything in your code

Instalation

Place SimpleIcons.inc in your pawno >> includes folder.

Ysi/y_iterate / y_foreach include required. You can get it here : https://github.com/YSI-Data/y_iterate

Add this next to your includes:

#include <SimpleIcons>

Usage

SetIconDistance(playerid,iconid,float:distance); // specify the distance at which the icon should be removed when player gets near it
SetIconTimeout(playerid,iconid,seconds); // specify the time (in seconds) after which the icon should be removed

Example

CMD:spawnpoint(playerid,params[]){ // a simple command to mark the spawn point on players map
  SetPlayerMapIcon(playerid, 45, 0.0,0.0,0.0, 0, 0xD44939FF, MAPICON_GLOBAL_CHECKPOINT);
  SetIconDistance(playerid,45,15.0); // when player gets less than 15.0 m from the 0.0,0.0,0.0 coordinates, the icon will be automatically removed
  SetIconTimeout(playerid,45,60); // After 60 seconds the icon will be automatically removed
  SendClientMessage(playerid,-1,"Spawn point successfully marked");
}

Ta strona jest zbudowana z tego, co GitHub publikuje o repozytorium. samp.directory nie hostuje kodu. Zgłoś problem z tym wpisem

ScottasM/SAMP-SimpleIcons: Biblioteka SA-MP | samp.directory