SA-MP Forums Archive
Changing gamemode - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Changing gamemode (/showthread.php?tid=616076)



Changing gamemode - Maheerali - 31.08.2016

CMD:dm(playerid,params[])
{
//SetPlayerGameMode(playerid,deathmatch)
}

how to change gamemode of player.


Re: Changing gamemode - Shinja - 31.08.2016

Not change gamemode lol, you can do it with SetSpawnInfo
https://sampwiki.blast.hk/wiki/SetSpawnInfo


Re: Changing gamemode - Sew_Sumi - 31.08.2016

You can however get a gamemode to change and rotate, but it takes a lot of skill.

Код:
gamemode0 DM 3
gamemode1 TDM 1
gamemode2 RPG 1
If you have DM.amx, TDM.amx, and RPG.amx in the gamemode folder, when you invoke GameModeExit, the server will roll onto the next.

DM will run 3 times, TDM once, then RPG one time. It will loop back to DM after the last one.

This is where endgames come into it.

https://sampwiki.blast.hk/wiki/Server.cfg <== Where to put the gamemode lines.

https://sampwiki.blast.hk/wiki/GameModeExit <== What to invoke to roll over to the next gamemode.

Another option is
Quote:

/rcon changemode [mode] - This command will change the current gamemode to the given one (example: if you want to play sftdm: /rcon changemode sftdm).

You could also do that via a command, using
PHP код:
SendRconCommand("changemode DM");