Help with derby
#1

Hello there. Two days ago i made a simple derby system for my stunt server.
The problem is that, sometimes when i am in derby with another players the game freeze and all seems
to not work. Chat doesn't work, commands doesn't work nothing work. After re-log everything it is just fine.
Does someone know why this problem can appear ? It is not freezing all the server but today i tested with more players, and to some players the game just freeze and for them all players that are in derby minigame looks like they are afk (with that sign in fron of their name that means the player is afk), this thing appear instantly and it doesn't fix by himself just if u relog then everything goes right. I saw that this thing appear to 1, 2 players or to all players that are in derby, sometimes to all server. IDK Why.

*** There is not an infinite loop or something else.. the server don't freeze for all players just for 1, 2 players that are in derby, so i disabled the derby and everything is fine on server but, if i enable the derby back, if i play in it after 3 or 4 rounds this thing happen, the timmer goes very fast (countdown timmer) and it freeze.

If u need to see the code please reply.
Reply
#2

does the server freeze for the players when the cars are spawned already or after the cars spawn ?
Reply
#3

After the cars spawn, and the derby is started.. not everytime it is happen this thing.. after 3, 4 rounds or sometimes after just 1 round.. idk.. sometimes it's cool till from nowhere the game freeze.
Reply
#4

What you can try to do, let the players join the mini-game first and let the cars spawn in another virtual world for a couple seconds and then let them spawn back in the virtual world where the mini-game is.
Reply
#5

I already made this thing.. this is the mode how i made the minigame. I have the map already created, the vehicles spawns at OnGamemodeInit in virtual world 1, after this, when a player enter the minigame it will be placed in virtual world 2, and the vehicle already spawned in virtual world 1, and it is empty (empty slot = not ocuppied by anyone) it will be linked to the player virtual world (2), but the freeze.. appear.. sometimes..

! Also, the freeze appear when the minigame is already started.. when the players started to play to fall down in water to die.. etc.
Reply
#6

Is your OnPlayerUpdate returning 0 anywhere? Try debugging your script when this all starts happening.
Reply
#7

Quote:
Originally Posted by Logic_
Посмотреть сообщение
Is your OnPlayerUpdate returning 0 anywhere? Try debugging your script when this all starts happening.
How to debug if OnPlayerUpdate returns 0 ?
Reply
#8

Quote:
Originally Posted by FaLLenGirL
Посмотреть сообщение
How to debug if OnPlayerUpdate returns 0 ?
https://sampwiki.blast.hk/wiki/Debugging

You can see if OnPlayerUpdate is returning 0 by scrolling to the bottom where the callback ends and seeing what it returns.
Reply
#9

Quote:
Originally Posted by FreAkeD
Посмотреть сообщение
https://sampwiki.blast.hk/wiki/Debugging

You can see if OnPlayerUpdate is returning 0 by scrolling to the bottom where the callback ends and seeing what it returns.
Hello there. I solved the problem, everything was caused by OnPlayerUpdate public. Thanks.
But now, i have a little problem in + at this mingame. After the minigame will spawn the players in their vehicles sometimes they put the player in vehicle and after 1-2 sec they remove the players from vehicle and they lose the mingame, what can be ? Sometimes happens sometimes not. Sometimes to 5-6 players sometimes just to 1 player. I think is something with the "CreateVehicle" or with "PutPlayerInVehicle" IDK. I create the derby vehicles on public "OnGameModeInit" and the map too, and when a player will join the minigame the vehicles are already there, but he is not in a vehicle till the derby timer end. Then the player will be spawned in his slot derby vehicle, but how i said there sometimes it's a problem because sometimes the player is spawned corectly in the vehicle, and sometimes after 1-2 seconds he is removed from the vehicle. Thanks anyway if u can help me with this too it will be very great.. i'm really gratefull to you all guys.
Reply
#10

Sorry for the bump, are you still having the issue?
Reply


Forum Jump:


Users browsing this thread: 8 Guest(s)