Help please!
#1

I making Prison Break [GameMode] server.
I need script:
Connected on server new player ant:
People have individual cell right away!
People takes individually cell.

Sorry, i'm bad English. Please help.
Reply
#2

That sounds easy! We can totally make you a script without you telling us your file saving system, variables, functions, and other includes and defines!

I am totally going to help you with this, because that's what us people that have no script given do, even when the person who requests for it wants us to script this all from apparently scratch!

Below post, something like that could work.

I'd do something like this if you don't even have a cell system:

What I would do is make an enum like so:

pawn Код:
enum CellInfo
{
    Owner, //OWner of the cell
    Price, //Cell Price
    PosX, //Enterance PositonX
    PosY, //Enterance PositionY
    PosZ, //Enterance PositionZ
    PosEX, //Exit PositionX
    PosEY, //Exit PositionY
    PosEZ //Exit PositionZ
}
new cInfo[MAX_CELLS][CellInfo];
Then, set owner to "None" and save it to a file, and load all the variables on GameModeInit.

When this is done, you can also add variables to the enum such as Pickup and 3DTextLabel, which you can then create when loading the cellinfo.

Then, when a player joins, it loops through all the cells and checks to see if any are available, and then it will get the first one.


Then you can add a /enter or /exit command, which checks if they are near the PosX, PosY, PosZ, and/or PosEX, PosEY, and PosEZ which will then take them to the other coordinates. (Of course, you could also just have a label and positions so that the doors can be opened by anyone, but you will still know who the owner is.
Reply
#3

Quote:
Originally Posted by Kindred
Посмотреть сообщение
That sounds easy! We can totally make you a script without you telling us your file saving system, variables, functions, and other includes and defines!

I am totally going to help you with this, because that's what us people that have no script given do, even when the person who requests for it wants us to script this all from apparently scratch!
+ rep for you

But to help the main person
The thing you'll need to do to see if a player use a cell is to make a array with like bool:cells[20] and for every player that take a cell you'll set that variable to true and when they leave it you'll set it to false. If you don't understand anything what I'm talking about you should watch some videos on basic scripting or basic c++

Hope i helped
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)