Posts: 176
Threads: 26
Joined: Jun 2016
Reputation:
0
I want to know how can i end a gm.
I mean that if all players of server become zombie then end gamemode by saying zombies win and if all players become survivours then automatic set a player zombie.
and i want to know how to set a timer to end gamemode.
Posts: 6,242
Threads: 8
Joined: Jun 2008
You're going to need to read the rules on posting in these sections, and start reading the wiki, examples around the forums, and the wider net, to give you faster results.
Only bump after 24 hours.
Posts: 6,242
Threads: 8
Joined: Jun 2008
If you look in the various examples in the server package (In particular manhunt.pwn) it shows exactly how to do this.
When you are looking at doing things like this you need a timer, you need to use that timer to countdown to the restart time, then when the restart hits, restart the round, or the server, depending on your actual target.
GamemodeExit and timers are what you want to look at, as well as the manhunt.pwn.
When you execute GamemodeInit it will switch to the next gamemode in the list, or it will go with the GM listed. It does however cause bugs to happen with the client, such as appearing to be banned, when they aren't.
It all depends on whether you are wishing to simply end the round, respawn the vehicles and reset player scores, or whether you really are wanting to restart the server entirely.
Posts: 6,242
Threads: 8
Joined: Jun 2008
Quote:
Originally Posted by Sew_Sumi
When you execute GamemodeInit it will switch to the next gamemode in the list, or it will go with the GM listed. It does however cause bugs to happen with the client, such as appearing to be banned, when they aren't.
|
GAH, GamemodeExit was what I meant there, not Init.
There is a way of having all the smaller gamemodes of SA-MP listed in the server.cfg, rolling over once each endgame requirement is met, either through timer, or through points/objective.