Giving shops their own ID
#1

Hello, I have came across a problem. When robbing lets say a burger shop, everyone will have to wait 2 minutes till they can rob it again (cooldown) the problem is, there are loads of these shops around sa with the same interior so therefore robbing one burger shop robs them all (in a sense).

I'm trying to think of a way to set each individual shop it's own unique id so i can only make the cooldown for that shop not all of them. I currently haven't thought of a way to do this (whole point of the thread) I have thought about getting the players position every second and then seeing if that position is relative to the position of a shop entrance then setting that shop an id but I'm not sure if that would work. I have also been thinking, because you can't see other players that are in the same shop but the shop they came from was lets say ls and yours was sf maybe entering a shop/interior sets you a different virtual world? I'm going to test that theory now, but if anyone knows a better method please reply.

EDIT: seems that they don't set a different vw.. I don't really know how else to do it.
Reply
#2

Well best way is to set unique vw for each one. So when the player type /rob you will get his vw and by that you will set the cooldown timer.

or if you want you can simply set ex:

when the player types /rob set the rob = 1;
When he leaves the shop get his pos and by that set the cooldown.

For that you will need defined shop exit/entrance points tho.
Reply
#3

first one wouldn't work without know what shop they are in, though the second one could be done but would take some time to get all the positions.. If anyone else knows a better way tell me.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)