[Include] samp-player-gangzones | Per player gangzones
#1

samp-player-gangzones

About

Creating per player gangzones to avoid normal (global) samp gangzones limit (1024). Uses Pawn.RakNet to send RPCs.
PS: Yes. I know test.pwn file isn’t actually a unit test script. You need to go in game and use those commands. sorry!

NOTE: Client has a limit itself, and it's 1024 so you can not have more than that; This include is only for avoiding global gangzones limits (you can only create 1024 global gangzones on server-side, but now 1024 for each player with this include that uses only client-side slots) (credits to J0sh... cause I thought game has a limit for drawing gangzones)



Installation

Simply install to your project:

Код:
sampctl package install AmyrAhmady/samp-player-gangzones
Include in your code and begin using the library:

Код:
#include <samp-player-gangzones>
Functions

Код:
PlayerGangZoneCreate(playerid, Float:minx, Float:miny, Float:maxx, Float:maxy);
PlayerGangZoneDestroy(playerid, gangzoneid);
PlayerGangZoneShow(playerid, gangzoneid, color = PLAYER_GZ_DEFAULT_COLOR);
PlayerGangZoneHide(playerid, gangzoneid);
Testing

To test, simply run the package:

Код:
sampctl package run
and use these commands in game:

Код:
/gzcreate
/gzshow
/gzhide
/gzdelete
Todo

Flash and some new gangzone related functions (i.e: IsPlayerInPlayerGangZone)
Get rid of pawn and make a plugin for it for better performance

For non-sampctl-users:

Just go to its repository and use samp-player-gangzones.inc file, there's test.pwn for... well.. test script?

Github link:

(I assume you couldn't find it in top of this post, so I'm just gonna put it here again)
https://github.com/AmyrAhmady/samp-player-gangzones
Reply
#2

mashallah brother Amir
Reply
#3

Another useful release from you! Keep it up
Reply
#4

Welldone ma friend tnx its usefull for me
Reply
#5

credit me for fixing your dumb note that wasn't accurate

thank u
Reply
#6

Quote:
Originally Posted by J0sh...
Посмотреть сообщение
credit me for fixing your dumb note that wasn't accurate

thank u
omg sorry borther, added now
Reply
#7

Credit me for commenting
Reply
#8

Credit me for using this
Reply
#9

Okay....
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)