[Include] [INC] Entrances system.
#1

Yes, yes.. Another entrances creating system.. But, this have some functions, like...

Lock/unlock;
Uses y_ini, so you can edit any entrance info in .ini file.
Uses foreach, instead of normal loops,
3D Texts



FUNCTIONS


Quote:
LockEntrance( entranceid ) - Will lock/unlock. *entranceid*. If entrance is locked, it will be unlocked, if its unlocked, then it will be locked.

DeleteEntrance( entranceid )

CreateEntrance( name[ ], enterX, enterY, enterZ, exitX, exitY, exitZ, interiorid, virtualid, locked )


PARAMS

Name - text of 3d text label
enterX, enterY, enterZ - where player will be spawned when he exit any building, and where player need to enter building.
exitX, exitY, exitZ - where player will be spawned when he enter any building, and where player need to exit building
interiorid, virtualid - virtual world, interior ID's
locked: 1 - building will be closed, 0 - not.

LINES


Quote:

236.

BUGS


Quote:

None at this moment. If you found ANY BUG, report it, thanks!

CREDITS


Quote:

foreach, y_ini - ******
a_samp - samp devs

DOWNLOAD


[quote]http://pawn.pastebin.com/cTfykseS - 1.0

http://pawn.pastebin.com/Ebvp8bBT - 2.1

UPDATES


Quote:

2.0:

Added hours mode... If GMT in your country is < minh or > maxh - player will CANT enter building.. (You will set minh, maxh in CreateEntrance). Also, you can disable it in top of script.
Fixed small mistake with locked buildings

2.1:

Fixed mistake with loading entrances(thanks to Wups).
Added function: DeleteEntrance
Reply
#2

Congratulations!

have done well, from what I saw seems to be a great program, and better than usual, I would use this system in my server if it did not already created an equal xD
Reply
#3

Looks good. This will be used for many instances :P
Reply
#4

Thanks. :]
Reply
#5

v2.0 released
Reply
#6

File is not closed, when you write to it.
Reply
#7

Oh thanks.
Reply
#8

And i don't think loading will work. Because the itterator is empty when you load the filterscript, so foreach won't loop.
Better, loop for MAX_ENTRANCES, and check if file exists!
Reply
#9

Thanks you wups.

2.1 released
Reply
#10

Quote:
Originally Posted by Gh0sT_
Посмотреть сообщение
Thanks you wups.

2.1 released
Um.. You still forgot
eCount ++;
before
Itter_Add(fEntrances, eCount);
when loading entrances.
Reply
#11

Good Job.
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)