Oh ok so lemme give u dat:
in the beginning of your gm:
[pawn]new Float:xbefore, Float:ybefore, Float:zbefore;
new playerisondm[MAX_PLAYERS];[/pawn]
then
[pawn]public OnPlayerDisconnect(playerid, reason)
{
playerisondm[playerid]=0;
return 0;
}[/pawn]
then
[pawn]public OnPlayerSpawn(playerid, classid)
{
if(playerisondm[playerid])
{
SetPlayerPos(playerid, 112.35513, -1150.53576, 31.30939, 0, 0);
}
return 1;
}[/pawn]
and then
[pawn]public OnPlayerText(playerid, text[])
{
if(strcmp(text, "!dm", true)==0)
{
GetPlayerPos(playerid, xbefore, ybefore, zbefore);
playerisondm[playerid]=1;
SetPlayerPos(playerid, 112.35513, -1150.53576, 31.30939, 0, 0);
SendClientMessage(playerid, 0xFF0000AA, "You have joined DM!");
}
else if(strcmp(text, "!leavedm", true)==0)
{
if(playerisondm[playerid])
{
playerisondm[playerid]=1;
SetPlayerPos(playerid, xbefore, ybefore, zbefore, 0, 0);
playerisondm[playerid]=0;
SendClientMessage(playerid, 0xFF0000AA, "You have left the DM!");
}
else
{
SendClientMessage(playerid, 0xFF0000AA, "You are not on DM!");
}
return 1;
}
return 1;
}[/pawn]