03.04.2013, 17:30
Okay, I changed format() to just returning the string and it cut the time in HALF.
Now. I have a new problem. Not really a scripting issue, more of a design issue. Let me explain:
The files are going to contain spawnpoints, for example:
scriptfiles/spawns/food/cluck/cluck_ls.txt
scriptfiles/spawns/food/cluck/cluck_sf.txt
scriptfiles/spawns/food/cluck/cluck_lv.txt
scriptfiles/spawns/police/lspd.txt
scriptfiles/spawns/police/sfpd.txt
scriptfiles/spawns/police/lvpd.txt
etc.
I don't want totally random spawns though, as players will end up spawning inside each other. I'm not sure how to get around this though. I've been thinking about various different ideas, such as 'watching' each spawnpoint and when the player that spawned there has moved away it becomes 'free'. But if I have 10 spawnpoints for cops at the LSPD and there are 11 cops online, what happens to the 11th person, who will be spawning at the exact same time as the other 10 cops?
I'm now totally re-thinking my spawn system. Here's my idea:
When you register you'll spawn at a pre-set place (as this idea was going towards) but there will be one per class. If you're a cop in LS, you spawn in front of the LSPD.
When you die, you respawn at a hospital.
When you join the server again, you respawn where you left off, in the vehicle you were in (if any).
When the city transitions, you also respawn where you started off. This one is the problem. There are 3 cities but not really 3 lives. The 'previous coordinates' won't exist if you only just registered then the city changes. I don't want players respawning in LS when the city changes to SF. Perhaps again just the 'initial spawns' could be used. It's just that maybe 20 people will have registered in the 168 minutes the server was in LS, then they're all going to be spawning at the same place..
Now. I have a new problem. Not really a scripting issue, more of a design issue. Let me explain:
The files are going to contain spawnpoints, for example:
scriptfiles/spawns/food/cluck/cluck_ls.txt
scriptfiles/spawns/food/cluck/cluck_sf.txt
scriptfiles/spawns/food/cluck/cluck_lv.txt
scriptfiles/spawns/police/lspd.txt
scriptfiles/spawns/police/sfpd.txt
scriptfiles/spawns/police/lvpd.txt
etc.
I don't want totally random spawns though, as players will end up spawning inside each other. I'm not sure how to get around this though. I've been thinking about various different ideas, such as 'watching' each spawnpoint and when the player that spawned there has moved away it becomes 'free'. But if I have 10 spawnpoints for cops at the LSPD and there are 11 cops online, what happens to the 11th person, who will be spawning at the exact same time as the other 10 cops?
I'm now totally re-thinking my spawn system. Here's my idea:
When you register you'll spawn at a pre-set place (as this idea was going towards) but there will be one per class. If you're a cop in LS, you spawn in front of the LSPD.
When you die, you respawn at a hospital.
When you join the server again, you respawn where you left off, in the vehicle you were in (if any).
When the city transitions, you also respawn where you started off. This one is the problem. There are 3 cities but not really 3 lives. The 'previous coordinates' won't exist if you only just registered then the city changes. I don't want players respawning in LS when the city changes to SF. Perhaps again just the 'initial spawns' could be used. It's just that maybe 20 people will have registered in the 168 minutes the server was in LS, then they're all going to be spawning at the same place..