[Map] Blocking Garages Realistically (well, something like that)/
#1

REALISTICALLY BLOCK GARAGES!

Description:
Umm, as the title says. These objects will make the garages unenterable, and it's better than most servers. An average server would block the garages with ugly gates that are very unrealistic considering the garage doors will close on top of it. I mean really, if your server is a roleplay server, why do something that unrealistic? Well check this out! Players can now try to drive into the garage because they think they can, when they get to the door it will open normally. What will they see when it opens? Nothing. That's right, NOTHING! So they will then try to drive into the garage (or walk) and it will not be possible. Conclusion: It looks realistic because it looks just like a regular garage.

Now it is all included in a more advanced include! Now you can add floating text on the garage entrance and block only certain garages!

Screenshots:
I don't really see any reason to post a screenshot but here you go!

Code:
EDIT: Code no longer needed. Check "Updates" section.

Updates:
Quote:

Update 1.01 [Jan 18, 15]
  • Converted to include.
  • Added BlockGarages(bool:block=true, GarageType:type=GARAGE_TYPE_ALL, text[]="") function.

    Types:
    pawn Код:
    GARAGE_TYPE_ALL
    GARAGE_TYPE_PAINT
    GARAGE_TYPE_BOMB
    GARAGE_TYPE_MODSHOP
    Usage:
    pawn Код:
    BlockGarages(); //Blocks garages of all types with no text.
    BlockGarages(false); //Unblocks all garages.
    BlockGarages(false, GARAGE_TYPE_PAINT); //Unblocks only Pay 'N Spray garages.
    BlockGarages(.text="DISABLED"); //Blocks all types of garages, and adds floating text to the garage entrance.
    BlockGarages(.type=GARAGE_TYPE_PAINT); //Blocks only Pay 'N Spray garages.
    BlockGarages(true, GARAGE_TYPE_MODSHOP, "MOD SHOPS\nARE DISABLED"); //Blocks all modshops, with floating text at the garage entrance.
Bugs:
  • Not sure if I've missed any garages, but this does not look like all of them. Please report any missing!
    Ps. I may go through the IPL files again to make sure I get them all.
Downloads:
GitHub
Reply
#2

Looks alright, but maybe make this as an include, and make functions such as BlockGarage(Float: x, Float: y, Float: z, Float: rx = 0.0, Float: ry = 0.0, Float: rz = 0.0).

Or atleast just something like this:

pawn Код:
BlockGarage(garageid=GARAGE_TYPE_ALL, bool: block);
pawn Код:
#define GARAGE_TYPE_ALL   1
#define GARAGE_TYPE_PNS  2
#define GARAGE_TYPE_BOMB 3
#define GARAGE_TYPE_PLAYER 4
#define GARAGE_TYPE_MODSHOP 5
And maybe even
pawn Код:
OnPlayerAttemptEnterGarage(playerid, garageid);
Reply
#3

great idea and thanks for releasing it.

i see one problem with invisible objects, there will be much reports about "hey, i found a bug!".
whats about to put a text in front of the entry what says "DISABLED" ?
in combination with the post from Abagail you can let the scripter choose what he want to say as a disable text. :3
Reply
#4

Actually guys I already have an include for this on pastebin, I took the objects from it and put them here. The only two functions were BlockGarages and UnblockGarages.

For proof look at the date of it. :P

http://pastebin.com/R86jr2zT





Anyways, thanks for the suggestion Abagail. I think it's a very good idea and I am going to do it tomorrow. And LadyNyuuu I was also thinking of adding text to them when I was reading Abagails suggestion. I think that will definitely come along with the include!





@Abagail: I'm considering the attempt to enter thing, how do you suggest I go about detecting the collision? Something like ColAndreas would make this easy, but ofc that is not released.





EDIT: Just finished, scripted it all (except the onplayerattempbleh thing) on my ipad and I can't test until tomorrow.
Reply
#5

Quote:
Originally Posted by Crayder
Посмотреть сообщение
Actually guys I already have an include for this on pastebin, I took the objects from it and put them here. The only two functions were BlockGarages and UnblockGarages.
For proof look at the date of it. :P
http://pastebin.com/R86jr2zT
Anyways, thanks for the suggestion Abagail. I think it's a very good idea and I am going to do it tomorrow. And LadyNyuuu I was also thinking of adding text to them when I was reading Abagails suggestion. I think that will definitely come along with the include!
@Abagail: I'm considering the attempt to enter thing, how do you suggest I go about detecting the collision? Something like ColAndreas would make this easy, but ofc that is not released.
EDIT: Just finished, scripted it all (except the onplayerattempbleh thing) on my ipad and I can't test until tomorrow.
Added include.

@Beta Testers and etc: Please set thread tag to [Include], and change title to "Realistically Block Garages!".
Reply
#6

Quote:
Originally Posted by Crayder
Посмотреть сообщение
Actually guys I already have an include for this on pastebin, I took the objects from it and put them here. The only two functions were BlockGarages and UnblockGarages.

For proof look at the date of it. :P

http://pastebin.com/R86jr2zT





Anyways, thanks for the suggestion Abagail. I think it's a very good idea and I am going to do it tomorrow. And LadyNyuuu I was also thinking of adding text to them when I was reading Abagails suggestion. I think that will definitely come along with the include!





@Abagail: I'm considering the attempt to enter thing, how do you suggest I go about detecting the collision? Something like ColAndreas would make this easy, but ofc that is not released.





EDIT: Just finished, scripted it all (except the onplayerattempbleh thing) on my ipad and I can't test until tomorrow.
You can detect if the vehicle / player is considerably close(maybe a range of 1.25). As for the OnPlayerAttemptEnter: - the same goes: if they are very close, it'd be accurate enough(somewhere near 0.5 for onfoot players, and around 1.25 for players in a vehicle).
Reply
#7

Good job useful!
Reply
#8

Quote:
Originally Posted by Abagail
Посмотреть сообщение
You can detect if the vehicle / player is considerably close(maybe a range of 1.25). As for the OnPlayerAttemptEnter: - the same goes: if they are very close, it'd be accurate enough(somewhere near 0.5 for onfoot players, and around 1.25 for players in a vehicle).
So a good way would be OnVehicleDamageStatusUpdate, Take range, if near any door they attempted entering. That's what I was thinking.


EDIT: Well, I can't hook OnVehicleDamageStatusUpdate with any ALS method. y_hooks compiles with no errors, but everything in the hooked OnVehicleDamageStatusUpdate is never called. Debugging.
Reply
#9

Not that bad. Good job
Reply
#10

i love it
Reply
#11

Nice
Reply
#12

Sweet! Now players will have no change to get pass through these mod shops & pay n sprays, The players in my server back then uses a trick to pass through these blockage on the Mod Shops & Pay N Sprays.
Reply
#13

Update from SimonItaly; 2 missing garages added.
Reply
#14

Looks good, props to you for getting all the garage coords. The only problem I could think of would be latency, no? If it just so happens that the object doesn't load quickly for them (or they desync?), they could still enter the garage, right?
Reply
#15

Quote:
Originally Posted by Virtual1ty
View Post
Looks good, props to you for getting all the garage coords. The only problem I could think of would be latency, no? If it just so happens that the object doesn't load quickly for them (or they desync?), they could still enter the garage, right?
Technically that's always a possibility, no matter the method. In this case, it's not very likely given these are static objects. If someone is lagging bad enough for the static objects to not stream in then they shouldn't be allowed in your server. That would be like seeing someone airbreak and letting them get away with it.
Reply
#16

Quote:
Originally Posted by Crayder
View Post
Technically that's always a possibility, no matter the method. In this case, it's not very likely given these are static objects. If someone is lagging bad enough for the static objects to not stream in then they shouldn't be allowed in your server. That would be like seeing someone airbreak and letting them get away with it.
You're right

Helpfull include. Gonna use it instead of those ugly fences
Reply
#17

Lit. Before people would put some gate to block entrance.
Reply
#18

How do I install it on my GM?
Reply
#19

great work
Reply
#20

Great! Would be using it soon.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)