Yes, please remove the codes as you created for YG. And, I've a suggestion too:
It would be good if player gets back to his position on
/exit command rather than on the spawn point.
Also if player is alone in DMs, it's better not to give that "Coward" xD. But yes, it must too be there. So creating a loop and getting how many people joined or is in the DM would be good.
Example:
new Float:pXpos[MAX_PLAYERS],
Float:pYpos[MAX_PLAYERS],
Float:pZpos[MAX_PLAYERS],
pInterior[MAX_PLAYERS];
//Whenever the go on DMing.
CMD:mgcommands(playerid, params[])
{
GetPlayerPos(playerid, pXpos[playerid], pYpos[playerid], pZpos[playerid]);
pInterior[playerid] = GetPlayerInterior(playerid);
//Other DM stuffs
return 1;
}
CMD:exit(playerid, params[])
{
new Count = 0;
for(new i; i< GetMaxPlayers(); i++)
{
if(!IsPlayerConnected(i)) continue;
if(InDM[i] == 1) {
Count++;
break;
}
}
if(Count == 1) {
//Then he's leaving because there are no players in DM, except him.
}
else
{
//There are...
}
SetPlayerPos(playerid, pXpos[playerid], pYpos[playerid], pZpos[playerid]);
SetPlayerInterior(playerid, pInterior[playerid]);
return 1;
}Just an example to show you, I haven't tested it. So if mistakes, sorry. Once again, nice work. Keep it up!
