logic help.. again ^_^ (Gangs)
#1

Hey,

I was wondering what would be the logic step to create gangs (/gang create name) and keep them saved.

I currently have a player Database, with a file per player, and 1 file with all server vehicles info.

but how would u make gangs, with their own file, being read by other players :P with all the what if all player quits and everything @_@

again, need more of a concept map rather than any code
Reply
#2

You can just have a file for a gang, (if these are permanent gangs).
Some servers don't store any gang data, they let the players deal with it, and just provide gang chat systems.

The only issue with permanant gangs is how do you control who creates them.

But lets saying you want to save gang data, just put a variable in players files like gang="gang name or id"

Then have a gang file. Then whenever a player joins check their gang and if needed load that gangs file.

if a player quits, well that shouldn't matter, but if it does you can just check if any existing gang members are still on, if not save or whatever.

You might want to save on a regular timer aswell.
Reply
#3

what u mean a regular timer? :P
Reply
#4

Like a timer every hour or something that saves gangs data.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)